Repository navigation
Run the menu's guard batch once at startup, not once per menu file - #15048
Merged
Merged
Conversation
The default and user menu files load separately, and each load evaluated every guard, so startup ran the whole batch twice, the second queued behind the first. Wait until both have answered, loaded or missing; an open before then evaluates on its own as always. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhh
force-pushed
the
menu-open-startup-work
branch
from
October 11, 2026 14:47
0b2b642 to
60ad492
Compare
This was referenced Oct 12, 2026
Closed
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.
defaultMenuFileanduserMenuFileeach callrebuildItemsFromSources()from their ownonLoaded/onLoadFailed, and each rebuild calledevaluateGuards(); the second run queued behind the first viaguardsPending, so startup paid for the whole guard batch twice (~410ms of background work on the current batch).Rebuilds now evaluate only once both files have answered at least once: loaded, or the user file missing, or the default failing (which also runs a user rebuild's held evaluation). Later edits to either file still re-evaluate, and
openExistingMenu()still evaluates on every open, so a summon before both files land is unaffected.An earlier revision also gated
appLibrary.refreshIcons()on an unresolved icon. Codex showed that leaves a removed or relocated user icon cached until the next app-list change, and there is no cheap staleness signal for nested icon directories. That rescan runs async and off the open path, so it is left as it was.Verification
menu-test.shasserts the settled gating on all four FileView handlers and thatopenExistingMenu()still evaluates; passes.app-search-test.shpasses.qmllintreports no syntax errors.~/.config/omarchy/extensions/omarchy-menu.jsoncshould still re-evaluate.🤖 Generated with Claude Code