Repository navigation
Conversation
With no arguments omarchy-default-browser answers with the short name for the current browser, and every row of Defaults > Browser runs it in its checked guard. It ran `xdg-settings get default-web-browser` twice: once for the case, and again in the unmatched arm to echo the raw value. The unmatched arm is not the rare one. A browser that registers itself through xdg-settings rather than shipping a packaged desktop entry gets a generated id: Zen installs `userapp-Zen-81ROQ3.desktop`, which matches none of the seven cases. So the common path was the one paying twice, and on this machine that is 83ms against 42ms for asking once, per row of the menu. The same mismatch was a second, quieter bug. The unmatched arm echoed the raw desktop id, so the menu compared `userapp-Zen-81ROQ3.desktop` against `zen` and the Zen row could never show as checked, no matter which browser was actually default. A generated entry names the browser in its Exec rather than in its filename, so the unmatched arm now opens the entry and maps the program it runs back to the name this command answers with. That is read from the entry rather than guessed from the filename, because the filenames are not reliable: matching `*hrom*` would claim Chrome for Chromium. Anything that still cannot be identified falls back to the raw id, which is what the command answered before. Tests cover the seven packaged ids still reading as themselves, a single xdg-settings call on both the matched and the unmatched path, a generated Zen entry reading as `zen`, and an unidentifiable id still reporting itself. The single-call assertion on the unmatched path fails on quattro, at two.
On quattro the menu batches its guards and runs omarchy-default-browser once per evaluation (GUARD_READERS in shell/plugins/menu/MenuModel.js), so the per-row cost the comment described no longer exists. What remains is the single read, which the code already shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed and reproduced on a worker built from the Omarchy ISO. The bug is real and this fixes it. Reproduction. I registered Zen the way Firefox-based browsers make themselves the default, through GIO's Tests on the worker. Pushed to your branch. 2b1951e removes the five-line comment above the Related. #13830 also edits the no-argument path of Second opinion. None. The configured reviewer was not run because today's review budget was spent. This rests on one model's review (Claude Opus 5.5), plus the reproduction above. Next. This waits on the maintainer. It also needs a second-opinion review at this head before it can be marked ready. |
|
Comments Outside DiffThese findings could not be posted inline.
|
|
Looked at the new head, 10c46a1. It merges current Classification is unsettled. Two models classified this separately and disagreed. I (Claude Opus 5.5) read it as a bug fix. Codex Medium read it as an enhancement. Both readings have something to them. The generated Zen entry leaving Defaults > Browser unchecked is a bug on The tokenizer goes further than the rest of Omarchy's browser handling. Greptile's CODEOWNERS finding does not apply to this pull request. Related. #13830 and #14441 both edit Next. This waits on the maintainer to decide whether it is a fix or a feature, and whether the wrapped-entry handling belongs here. |
|
On the scope concern: the getter identifies the browser for menu readback. The launchers do not consume it and remain unchanged. Independent captured-argv checks confirmed their pre-existing env/Flatpak argument loss; this PR does not establish wrapped launcher execution. Direct generated Zen launching remains unchanged, including native verification. The description now states that boundary. Whether wrapper recognition belongs in this PR, and its bug/enhancement classification, remain maintainer decisions. |
… tests Omarchy's style asks for (( )) rather than -eq inside [[ ]] for numeric tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Looked at the new head. This time two models classified it separately and agreed it is a bug fix: I (Claude Opus 5.5) and Codex Medium. It is labelled Reproduction. I ran this on a worker built from the Omarchy ISO. I registered a stand-in Zen through GIO's Tests on the worker. These ran merged with current Pushed to your branch. f6873b1 changes the three new call-count checks from Second opinion. Codex Medium reviewed it. It found no code that runs anything from the desktop file. It found one case the tokenizer misses:
Scope. Both reviews read the bug's size the same way. A fix the size of the Zen bug finds the entry and maps the first word of its Next. This waits on the maintainer to decide whether the wrapper recognition belongs here or should be split into its own pull request. |
quattro now reads the default once through omarchy-cmd-default-browser, which skips omarchy-browser.desktop; the generated-entry resolver now takes its answer instead of a second xdg-settings read of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An empty id makes the resolver's path the applications directory, which passes -r, so sed read it and printed "Is a directory" to stderr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
#14441 landed on The merge, c81f3aa. Pushed, 9bb89b6. With no default browser set, the resolver got an empty ID. Its path was then the applications directory itself, which passes Reproduction. On a worker built from the Omarchy ISO, I registered a stand-in Zen through GIO's Tests on the worker, at the head. Second opinion. Codex Medium reviewed it in two rounds. In the first round it found the conflict resolution correct, and it found the empty-ID defect above. It also raised the Related. #13830 still edits the same no-argument path and the same test file, so it will need reconciling with whichever lands first. Next. It is not marked |
Current Quattro already reads the default browser once through omarchy-cmd-default-browser. This PR now adds recognition of generated desktop IDs through their Exec fields, using the normal XDG data directory defaults and quoted paths. A missing default returns quietly, without trying to read the applications directory as a file.
Exec arguments are read as data, without evaluation or execution. Direct programs, env assignments/options and supported Flatpak browser IDs map to the existing menu names; unknown entries retain their desktop ID. The fixtures isolate XDG_DATA_HOME/XDG_DATA_DIRS from the runner's environment.
Wrapper parsing identifies the browser for menu readback. Browser and web-app launchers do not consume this getter; recognizing a wrapped entry does not establish that those launchers execute its complete argument list. The env -- assignment form currently falls back to the raw desktop ID, matching upstream behavior. The maintainer still needs to decide whether wrapper recognition belongs in this fix or a separate change.
Fresh validation of head 9bb89b6 merged with Quattro 84cfb93 passes 23 default-app checks, 26 menu-guard checks and 125 CLI checks. Cases include generated IDs, a missing default, system paths, spaces, env and Flatpak wrappers, literal command substitutions, unrelated wrappers and single-read behavior.