Repository navigation
Conversation
The plugin reload path relied on Qt.clearComponentCache() to force a recompile of edited plugin QML, but that method is C++-only (QQmlEngine::clearComponentCache) and is not exposed on the QML `Qt` object, so the guard was silently always false. Qt.createComponent() then returned the stale compiled component for the plugin's unchanged URL, and edits under ~/.config/omarchy/plugins never took effect until a full shell restart. When the cache can't be cleared, fall back to a supervised shell restart via omarchy-restart-shell so the fresh engine recompiles from source. Reference: omacom#6981
|
Reviewed on a disposable worker VM built from the Omarchy ISO (quickshell 0.3.1-1, qt6-declarative 6.11.2-1, hyprland 0.56.2-1), running this branch as the live session shell. Reviewed by Claude Opus 5 in Claude Code, with an independent second opinion from Codex at xhigh reasoning; codex can read this session's transcript, so its agreement is not guaranteed to be independent, but two of the findings below are its own and are marked as such. Nothing was pushed to your branch — the defects here are not ones I should paper over, and whether a whole-shell restart is the right answer at all is the maintainer's call. Your premise checks out. On the worker, It breaks the repo's own runtime smoke test. The restart is not scoped to the instance that asked for it. A save while the screen is locked drops the session lock. Hyprland's If the restart does not happen, the shell stays broken for the rest of the session. The early return skips The coalescing flag does not bound restarts. Codex found two things I had not reasoned about. One small thing: Worth reading before you go further: #8766 replaces the same guard with Also worth rebasing: |
|
Re-reviewed at
The commit deleted the Measured on a disposable worker built from the Omarchy ISO, with the branch linked in as the live session tree:
Worth saying why nothing caught this: Below the parse error, three things in the same commit would still need fixing once it does parse. None is reachable today, so none is verified live:
Two things that did improve since the last pass, both from merging On @h3nr1-d14z's corroboration on #6981 that service-kind plugins are affected too: confirmed in source. Services load through Suggestion, for whatever it is worth: revert Reviewed by Claude Opus 5 in Claude Code, with an independent second opinion from Codex at xhigh reasoning. Codex reached the parse failure, the always-true predicate, the flag aliasing and the missing cache call on its own read of the tree at Nothing was pushed to your branch. This is waiting on you for the parse error, and on the maintainer for the choice between this approach and #8766. |
Fixes #6981.
Problem
Edits to bar-widget plugin
.qmlunder~/.config/omarchy/plugins/are detected (the watcher fires, the shell re-registers the plugin), but the widget keeps rendering the old compiled QML until a fullomarchy restart shell.The reload path in
shell/qml/shell.qml:757relied on:Qt.clearComponentCacheis a C++-only method onQQmlEngineand is not exposed to the QMLQtobject, so the guard is silently alwaysfalse. The engine's in-memory component cache (keyed by URL, not mtime-invalidated) is never dropped, and the subsequentQt.createComponent(url)inloadPluginWidget()returns the cached staleComponentfor the same URL.Fix
When the cache cannot be cleared from QML, fall back to a supervised shell restart — the only way to force the engine to drop its compiled-component cache and recompile from source — delegating to
omarchy-restart-shellso lock-client, session-environment, and no-duplicate-launch handling already implemented there is preserved.A
pluginRestartPendingflag coalesces the reload so rapid saves (one save can fire several inotify events) do not pile up restarts.Notes
This is the documented workaround made automatic: every save under
~/.config/omarchy/plugins/now takes effect immediately (with a journal warning when a restart is used) instead of silently showing stale code.