Repository navigation
Keep the browser chosen on 3.x through the Quattro upgrade - #15074
Conversation
The user transition reset the default browser to Chromium unconditionally, after the retire step had deliberately kept a customized ~/.config/mimeapps.list. Fall back to Chromium only when no default browser resolves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
[Medium impact] The PR appears safe to merge; the remaining test-coverage concern is non-blocking. Findings
SummaryThe Quattro upgrade now sets Chromium only when
Reviews (2) · Last reviewed commit: "Merge quattro: read the browser past the..." · Reviewed by Greptile |
| grep -B1 -F 'env -u BROWSER xdg-settings set default-web-browser chromium.desktop' "$upgrade_to_quattro" | | ||
| grep -F '[[ -z $(env -u BROWSER xdg-settings get default-web-browser 2>/dev/null) ]]; then' >/dev/null || | ||
| fail "Omarchy 4 upgrade keeps the default browser the user chose" |
There was a problem hiding this comment.
Browser behavior stays untested
The new test checks source text but never runs the browser fallback. It does not verify that an existing choice stays unchanged, that an empty lookup sets Chromium, or that removing BROWSER prevents it from affecting the lookup. A later change could break those behaviors without this test catching it.
Add tests that run this block with a mock xdg-settings and check which calls occur. Keep a separate fixture for the claimed missing-browser fallback.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Quattro now keeps omarchy-browser.desktop in hyprland-mimeapps.list and sets the browser with XDG_CURRENT_DESKTOP cleared, so the check that a browser already resolves has to clear it too, or under Hyprland it would always find omarchy-browser.desktop and the fallback could never fire. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed and verified at b154425. This branch conflicted with Reproduced on a worker (Omarchy ISO) by running the upgrade's default-browser block against test home directories:
Second opinion: Codex Medium reviewed the merged change and found no defects. It agreed the problem is real and the fix is proportionate. That is agreement with a conclusion already written down, so independence is not guaranteed. It also noted that the new test only checks the source text and does not run the block; that matches the rest of This fixes the browser half of #11632, so it does not close that issue. The terminal half is still open there for a maintainer decision. This pull request now waits on the maintainer. |
The Quattro upgrade resets every user's default browser to Chromium. Near the end of the user transition,
bin/omarchy-upgrade-to-quattroranxdg-settings set default-web-browser chromium.desktopunconditionally. By then the retire step has already done the right thing with~/.config/mimeapps.list: an untouched stock file is removed so/usr/share/applications/mimeapps.listapplies, and a customized one is kept. On 3.x,omarchy default browser firefoxrewrites the http, https andtext/htmlhandlers in that file, so its hash no longer matches the retire entry and it is kept, and then this line overwrote the choice it had just preserved.Now Chromium is only set when
xdg-settings get default-web-browserresolves to nothing. An untouched install still lands on Chromium through the package-ownedmimeapps.list, and no longer has a usermimeapps.listre-created after the retire step removed it. A user file naming a browser that is no longer installed also still resolves to Chromium, because xdg-utils skips handlers whose desktop file is missing.This addresses the browser half of #11632. The terminal half of that issue —
xdg-terminals.listfiles written byomarchy default terminal ghosttyoralacrittyare byte-identical to the stock files 3.x shipped, so the retire step cannot tell a choice from an untouched default — is a decision about who gets moved to foot, and is left on the issue for the maintainer.