Repository navigation
Notice a newer copy of the plugin and offer to restart the shell - #10
Merged
Merged
Conversation
`omarchy plugin update` puts newer code on disk, but the shell keeps running the widget it loaded until it restarts, and nothing said so. The helper's new plugin-info fingerprints the manifest and QML; the widget records the fingerprint it was loaded from and compares every minute and when the panel opens. Newer code shows "Varlatch for Omarchy 0.5.0 is installed" with restart in the panel, a "Restart to load" row in the launcher menu, a line in the tooltip, and one notification per newer copy with "Restart now" (omarchy restart shell). A sign-in under way survives the restart, since its helper runs outside the shell. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… widget's The shell re-creates the widget when plugin files change, but from the copy it cached at start, so a fingerprint taken by the new instance named the new code as loaded and the notice never showed. plugin-info now records the loaded fingerprint once per shell process (keyed by the parent's id and start time, pruned when it exits) and reports both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Omarchy counterpart of the macOS app's 0.2.0 restart prompt.
Why
omarchy plugin updatepulls newer code into~/.config/omarchy/plugins/varlatch, and the shell (Omarchy 4.0.4) notices the change throughinotifywaitand re-creates the widget, but from the component it cached when it started: tested live by swapping commits whosedebugStatediffers, the old fields stayed for 10+ seconds after the reload. Onlyomarchy restart shellloads the new code, and nothing told you.Changes
varlatch-menu plugin-infofingerprints the code the shell loads (manifest.jsonand*.qml; the helper runs fresh on every call, sobin/is left out) and reports the version and fingerprint on disk plus the ones the running shell loaded. The first call from a shell process records what it loaded, keyed by the parent process's id and start time (the widget runs the helper directly, so the shell is the parent); later calls from the same shell, re-created widgets included, get the same answer. Records of exited processes are dropped. Without this, a re-created widget would fingerprint the new files as "loaded" and never notice.sync-menu --restart <version>), and one notification per newer copy with Restart now. Restart runsomarchy restart shell. A sign-in under way survives it, since its helper runs outside the shell.loadedVersion,installedVersion, andpluginUpdated.Testing
tests/run.sh: 78 passed. New: the fingerprint and version, a README change keeping it, a QML change giving newer code on disk while the same parent keeps the old loaded fingerprint, a new parent process recording what is on disk, pruning of exited parents, the notification's Restart now runningomarchy restart shell(and nothing when dismissed), and the menu row present only with newer code.omarchy plugin updatedoes it: loaded this branch with a shell restart (loaded 0.4.0, installed 0.4.0, no notice), then moved the plugin checkout to a throwaway commit bumping the manifest to 0.5.0 without restarting. Within seconds:pluginUpdatedtrue, the panel footer showed "Varlatch for Omarchy 0.5.0 is installed" with restart (screenshot), the menu had the restart row, and the shell's notification history has the notification. Afteromarchy restart shell: loaded 0.5.0, no notice, no menu row.🤖 Generated with Claude Code