Repository navigation
Launch web apps in a Chromium-based browser the launcher has no name for - #17985
kyoto-aircon wants to merge 1 commit into
Conversation
[Medium impact] The PR appears safe to merge. SummaryThe launcher now checks the default browser’s desktop entry for Chromium’s MIME marker. If the default cannot open app windows, it tries installed Chromium browsers in a fixed order.
Reviews (4) · Last reviewed commit: "Recognise a Chromium-based browser by it..." · Reviewed by Greptile |
53db2b3 to
46086af
Compare
|
Greptile's three findings are in 46086af:
|
46086af to
e606ee1
Compare
|
Simplified since the last push: the installed-entry scan is gone. The default browser is judged from its entry (the installer template's |
| for candidate in chromium.desktop google-chrome.desktop brave-browser.desktop \ | ||
| vivaldi-stable.desktop helium.desktop microsoft-edge.desktop opera.desktop; do |
There was a problem hiding this comment.
The new fallback list omits brave-origin.desktop, although omarchy-install-browser installs Brave Origin and omarchy-default-browser uses that desktop ID. With Firefox or Zen as the default and Brave Origin as the only installed Chromium browser, web apps still fail with the install-Chromium message. Add brave-origin.desktop to the candidates so the fallback covers this supported browser too.
| for candidate in chromium.desktop google-chrome.desktop brave-browser.desktop \ | |
| vivaldi-stable.desktop helium.desktop microsoft-edge.desktop opera.desktop; do | |
| for candidate in chromium.desktop google-chrome.desktop brave-browser.desktop brave-origin.desktop \ | |
| vivaldi-stable.desktop helium.desktop microsoft-edge.desktop opera.desktop; do |
There was a problem hiding this comment.
Added brave-origin.desktop to the candidates — it is in the list right after brave-browser.desktop, and a test now covers the Firefox-default + Brave-Origin-only case (it fails without the entry). The list also now covers everything the old case did: chromium, chrome, brave, brave-origin, vivaldi, helium, edge, opera.
e606ee1 to
e7c3dd0
Compare
|
This pass stopped at classification. I read the launcher diff, browser resolution code, linked reports #7034 and #14163, and the existing review discussion. From that code, GPT-6 in Codex (reasoning effort not exposed) classified this as a bug fix: a non-Chromium default can prevent web apps from using another installed Chromium-based browser. The second classification model, deepseek-v4p1-flash (reasoning effort not reported), returned no usable classification, so the classification remains unsettled and no class label was added. No worker tests or second-opinion code review ran, and no changes were pushed. This waits on the maintainer to settle the classification before verification continues. |
|
The classification is now agreed as a bug fix. I compared this diff with #9206, #11164, #13879, #14200 and #15591, and read the current GPT-6 in Codex (reasoning effort not exposed), Opus 5.5 High and muse-wonder via pi (thinking high) reviewed that comparison. Both second-opinion models recommended continuing with #13879 for the shared fallback; their agreement is not guaranteed independent. They differed on whether this PR's MIME-based default recognition belongs with #13879 or the earlier default-recognition work in #15591. I handed #13879 the additional unknown-default and Brave Origin test cases from this PR for its own review, including consideration of MIME recognition alongside the existing supported-browser checks. That handoff must account for #15591 and preserve known defaults. No branch changes were pushed, and no worker tests ran: this pass stopped at the competing-fix decision. This PR also conflicts with current |
What changes
omarchy-launch-webappdecides whether it can hand--app=to a browser by matching the desktop id against a list of product names, and replaces any browser outside that list withchromium.desktopwhether or not Chromium is installed. So a web app either opens as an ordinary tab or fails with "web apps need a Chromium-based browser" while a perfectly good Chromium-based browser sits installed — a Chromium fork Omarchy has no name for, or any Chromium browser when the default is Firefox, Zen or LibreWolf.Two changes, both small:
chrome/installer/linux/common/desktop.template, the only one that spells the MIME typeapplication/xhtml_xml(underscore). Chrome, Chromium, Brave, Vivaldi, Edge and forks Omarchy has never been told about carry it; Firefox, Zen and LibreWolf do not. A fork works as the default browser without being added anywhere.chromium.desktopto be the one installed. Before, an installed Brave/Vivaldi/Helium was ignored.How it decides
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Resolve default browser] --> B{Entry lists<br/>application/xhtml_xml?} B -->|Yes| C[Keep the default browser] B -->|No| D[Try chromium, chrome, brave,<br/>brave-origin, vivaldi, helium,<br/>edge, opera] D --> E{Entry installed and<br/>its command resolves?} E -->|Yes| C E -->|None| F[Notify: install a Chromium browser] C --> G{Running browser accepts handoff?} G -->|Yes| H[App window in that browser] G -->|No| I[Launch through uwsm-app] I --> HScope: this does not follow a wrapper
Exec=such asenv FOO=bar brave %Uor a custom.desktopthat itself launches Chromium (that is #13986, handled by #15591), and it does not touchomarchy-launch-browser,omarchy-default-browseroromarchy-install-browser, so Helium still cannot be set as the default or installed from the menu (#16016, #16439).Fixes #7034, fixes #14163.
Supersedes #13879, which fixes the same fallback but keeps the name list as its only family test and has been conflicted since 2026-10-13. Credit to @satchlj for the installed-browser fallback and to @jandrusk for the stale-
Execreview thatentry_execfollows.Verification
bash test/shell.d/launch-browser-test.sh→ 10 passes, including the three added here:kestrel.desktopwith no name Omarchy knows, carrying the template's MIME type, and achromium.desktop, then makeskestrelthe default: the launcher startskestrel --app=…, which fails if the default is discarded for the fallback.chromium.desktop, keepsfirefox.desktopas the default and installshelium.desktop: the launcher startshelium-browser --app=….brave-origin.desktop: the launcher startsbrave-origin --app=…, so the fallback covers every Chromium browser Omarchy installs, the oldbrave*case included.quattrothe first fails (not ok - web app launcher keeps an unlisted Chromium default), so it guards the change.On a real machine (Omarchy 4.5.0-3, LibreWolf the default,
helium-browser-bininstalled, nochromium.desktop) the launcher resolveshelium.desktop'sExec=helium-browserand starts it with--app=<url>; the window is classchrome-<host>_<path>-Default, whichomarchy-webapp-window-classalready writes intoStartupWMClass.I did not run the graphical acceptance suite; these tests mock the compositor and the browsers.
Screenshots
No visible change: this picks a browser before the same frameless app window appears.