Repository navigation
Conversation
The menu watches omarchy-menu.jsonc so live edits apply without a shell restart, but git updates the file by inode swap, and a reload could land in the gap: the read came back empty or failed outright, the menu blanked, and no further watch event arrived to recover it. Dev-channel machines hit this every time a checkout or rebase touched the file. Treat a failed load or an empty parse of the default file as a torn read: keep the current rows and retry shortly, the same retry-timer idiom Style.qml uses for its watched files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Prevents the menu from blanking during Git inode swaps by retaining existing rows and retrying failed or empty default-menu loads.
Changes:
- Preserve the last valid default menu.
- Retry loading after 500 ms.
- Leave user-extension loading unchanged.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // and read nothing. The shipped menu is never empty: keep the current | ||
| // rows and retry instead of blanking the menu until a shell restart. | ||
| var items = root.parseMenuJsonc(text()) | ||
| if (items.length === 0) { defaultMenuRetry.restart(); return } |
|
Reviewed at 3c5ab70, run on a worker built from the Omarchy ISO with the shell loaded from this branch. Nothing found that needs changing. Reproduction. Deleting What I could not reproduce is the menu staying blank once the file has settled. On Tests. Second opinion. Codex at medium effort reviewed the diff and found no correctness problem; independence from this review is not guaranteed. It noted two things I am leaving as they are, since neither changes what a user sees: a default file that stays missing or malformed is retried every 500ms indefinitely, and a successful reload does not cancel a retry already pending, which costs one redundant rebuild. It also pointed out that git's checkout unlinks and rewrites rather than swapping inodes by rename, so "inode swap" in the description is loose, though the gap it describes is real. The change is proportionate: a retry on the one file that must never be empty, in the idiom |
|
This no longer merges into What conflicts. #15048 (f3cdce2, "Run the menu's guard batch once at startup") rewrote the same two handlers this changes, The fix is still needed. Why I have not resolved it. Combining the two takes a decision rather than a merge: whether a torn read or a failed load counts as the default file having answered. If it does not, a default file that stays missing leaves the startup guards held until the menu is opened, since Checked by reading the source and a three-way merge of this head against Waiting on the author to resolve the conflict. Once it merges cleanly it will be run on a worker again. |
chessing234
left a comment
There was a problem hiding this comment.
an empty or unreadable menu restarts defaultMenuRetry from onLoaded with no cap. a file that stays empty reloads every 500ms for the life of the shell. stop after a few tries and keep the last good rows.
|
What landed. #16268 (c39fd2a, merged 2026-10-22) keeps the menu's rows when a read of What this one still adds. Only the 500ms re-read. After a torn read, Checked by reading This waits on the maintainer: close it, or say if the retry should come across to |
The menu watches
omarchy-menu.jsoncso live edits apply without a shell restart, but git updates the file by inode swap, and a reload can land in the gap: the read comes back empty or fails outright, the menu blanks, and no further watch event arrives to recover it. Dev-channel machines hit this every time a checkout or rebase touches the file.This treats a failed load or an empty parse of the default file as a torn read: keep the current rows and arm a 500ms retry instead of blanking the menu — the same retry-timer idiom
Style.qmlalready uses for its watched files. The user-extension file keeps its existing behavior, since that file legitimately may not exist.Verified live: moved the definition file away for two seconds and back (a harsher version of git's swap — the exact sequence that emptied the menu on my machine today); the menu recovered on its own and summoned fully populated.
./test/shellpasses.🤖 Generated with Claude Code