Repository navigation
Give plugin enable longer than 2s to reach a reloading shell - #14710
omarchybot wants to merge 1 commit into
Conversation
Adding a plugin sets off two full reloads, one from the rescan and one from the file watcher, and a plugin add --enable discovers the plugin between them, so its one enablePlugin call lands in the second. On a bar with many plugins that rebuild holds the shell past omarchy-shell's 2s default, and the enable reports the shell as not responding and exits 1, though the shell is only busy. Wait up to 10s for this call, unless a timeout is set explicitly. Co-Authored-By: Codex Medium <codex@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
This looks right to me: It should also cover #14429 (same "omarchy-shell is not responding" on |
|
Queue pass on a364187: this one is not reviewed yet. Classifying a pull request needs two models to agree, and the second, Codex Medium, did not run, because omabot's review budget for today was already spent. Claude Opus 5.5 read the diff and called it a bug fix, but one model's call does not set a label. So there is no class label, and nothing was run on a worker or verified this pass. Next step: the queue takes it round again once the second opinion is available. |
omarchy plugin add <url> --enablecan install a plugin and then fail the enable withomarchy-shell is not responding, exiting 1. The shell is only busy, not hung.Adding a plugin sets off two full plugin reloads: one from the explicit
rescanPlugins, and one from the plugins directory watcher, 150ms after themv(shell/shell.qml,localPluginReloadTimer). Whichever arrives second while the first is running is kept as pending and runs as soon as the first scan finishes (reloadPluginsandonScanFinished). The discovery poll inomarchy-plugin-addsees the new id after the first reload, so the oneenablePlugincall arrives while the second reload is unloading and recreating every panel, service and bar widget. On a bar with many plugins that rebuild takes longer thanomarchy-shell's 2s default, and the call times out. The same can happen to a bareomarchy plugin enablerun straight after a write under~/.config/omarchy/plugins/.omarchy-plugin-enablenow gives itsenablePlugincall up to 10s, unlessOMARCHY_SHELL_IPC_TIMEOUTis set explicitly. That coversplugin add --enable,plugin cloneand a bareplugin enable. It waits longer and does not retry:omarchy-shellreports a timed-out call rather than resending it, because the shell may already be running it. A shell that is really hung now takes 10s rather than 2s to report as not responding.This does not fix the other way #9304 happens, where the
rescanPluginscall before discovery times out andset -estopsplugin addbefore it tries to enable. #11117 makes that rescan best-effort. Between the two,plugin add --enablefinishes the enable instead of leaving the plugin installed but disabled.A worker on the Omarchy ISO ran a throwaway shell from this tree, with a test plugin that keeps the event loop busy for 3.5s on each reload.
omarchy plugin enablesent 0.3s after a reload failed at 2.0s onquattroin 3 runs out of 3, and succeeded at 3.5–3.6s with this change in 5 runs out of 5. Codex Medium reviewed the mechanism and the change and found no defect. The code comment and test name here take its wording corrections.Fixes #9304