Skip to content

Launch web apps in a Chromium-based browser the launcher has no name for - #17985

Open
kyoto-aircon wants to merge 1 commit into
omacom:quattrofrom
kyoto-aircon:webapp-chromium-family
Open

kyoto-aircon wants to merge 1 commit into
omacom:quattrofrom
kyoto-aircon:webapp-chromium-family

Conversation

@kyoto-aircon

@kyoto-aircon kyoto-aircon commented Nov 7, 2026 •

Copy link
Copy Markdown

What changes

omarchy-launch-webapp decides 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 with chromium.desktop whether 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:

  • The default browser is judged from its entry, not its name. Every Chromium build generates its desktop entry from chrome/installer/linux/common/desktop.template, the only one that spells the MIME type application/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.
  • When the default cannot open app windows, fall back to the Chromium browsers Omarchy can install — chromium, Chrome, Brave, Brave Origin, Vivaldi, Helium, Edge, Opera — in the order it prefers them, rather than requiring chromium.desktop to 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 --> H
Loading

Scope: this does not follow a wrapper Exec= such as env FOO=bar brave %U or a custom .desktop that itself launches Chromium (that is #13986, handled by #15591), and it does not touch omarchy-launch-browser, omarchy-default-browser or omarchy-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-Exec review that entry_exec follows.

Verification

bash test/shell.d/launch-browser-test.sh → 10 passes, including the three added here:

ok - web app launcher keeps a Chromium default browser it has no name for
ok - web app launcher falls back to an installed Chromium-based browser
ok - web app launcher falls back to Brave Origin
  • The first installs a kestrel.desktop with no name Omarchy knows, carrying the template's MIME type, and a chromium.desktop, then makes kestrel the default: the launcher starts kestrel --app=…, which fails if the default is discarded for the fallback.
  • The second removes chromium.desktop, keeps firefox.desktop as the default and installs helium.desktop: the launcher starts helium-browser --app=….
  • The third keeps the Firefox default and installs only brave-origin.desktop: the launcher starts brave-origin --app=…, so the fallback covers every Chromium browser Omarchy installs, the old brave* case included.
  • Against quattro the 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-bin installed, no chromium.desktop) the launcher resolves helium.desktop's Exec=helium-browser and starts it with --app=<url>; the window is class chrome-<host>_<path>-Default, which omarchy-webapp-window-class already writes into StartupWMClass.

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.

@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The 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.

  • Web apps keep a Chromium default even when its name is unknown.
  • Web apps try installed Chromium browsers when the default cannot open them.

Reviews (4) · Last reviewed commit: "Recognise a Chromium-based browser by it..." · Reviewed by Greptile

Comment thread bin/omarchy-launch-webapp Resolved
Comment thread bin/omarchy-launch-webapp Resolved
Comment thread test/shell.d/launch-browser-test.sh Resolved
@kyoto-aircon
kyoto-aircon force-pushed the webapp-chromium-family branch from 53db2b3 to 46086af Compare November 7, 2026 06:46
@kyoto-aircon

Copy link
Copy Markdown
Author

Greptile's three findings are in 46086af:

  • Local entry ignored: https_entries now records every desktop id as it walks the data dirs and only then applies the http(s) filter, so a user entry that replaces the system one still shadows it even when the user's copy claims no http(s). Falling through to the system copy would have launched a browser the user replaced.
  • Required command helper: command -v is gone; the candidate check is omarchy-cmd-present "$app_exec" per AGENTS.md.
  • Weak assertion: the "keeps the default" case restores chromium.desktop first and asserts kestrel still wins, and a new case covers the shadowed entry (user kestrel.desktop without MIME types over a system one with them → exit 1, nothing launched).

bash test/shell.d/launch-browser-test.sh passes 10/10; the shadow case fails against the previous head, and the selector still resolves helium-browser on a LibreWolf-default machine.

@kyoto-aircon
kyoto-aircon force-pushed the webapp-chromium-family branch from 46086af to e606ee1 Compare November 7, 2026 06:53
@kyoto-aircon

Copy link
Copy Markdown
Author

Simplified since the last push: the installed-entry scan is gone. The default browser is judged from its entry (the installer template's application/xhtml_xml spelling), and the fallback is the short list of Chromium browsers Omarchy can install, so there is no scan, no ordering rule and no shadow bookkeeping. Tests are now "keeps a Chromium default it has no name for" (with chromium.desktop installed to prove the default wins) and "falls back to an installed Chromium-based browser" (Firefox default, helium.desktop installed).

Comment thread bin/omarchy-launch-webapp Outdated
Comment on lines +53 to +54
for candidate in chromium.desktop google-chrome.desktop brave-browser.desktop \
vivaldi-stable.desktop helium.desktop microsoft-edge.desktop opera.desktop; do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Brave Origin gets skipped

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.

Suggested change
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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@omarchybot

Copy link
Copy Markdown
Collaborator

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.

@omarchybot omarchybot added the bug Something isn't working label Nov 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

The classification is now agreed as a bug fix. I compared this diff with #9206, #11164, #13879, #14200 and #15591, and read the current quattro launcher, browser resolver, linked reports and existing review discussion. For the installed-browser fallback, #13879 is the older implementation with the same candidate browsers and a check that the selected command exists. These are competing fixes, so this PR stays open.

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 quattro. It waits on the maintainer's choice between the overlapping changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

2 participants