Skip to content

omamobile-omarchy 0.1.49: the WhatsApp web app gets a desktop user agent - #610

Open
den-kloot wants to merge 4 commits into
derekross:mainfrom
den-kloot:omamobile-omarchy-whatsapp-desktop-ua
Open

den-kloot wants to merge 4 commits into
derekross:mainfrom
den-kloot:omamobile-omarchy-whatsapp-desktop-ua

Conversation

@den-kloot

@den-kloot den-kloot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What and why

omamobile-setup-user gives Chromium an Android user agent so sites send their phone versions. WhatsApp Web answers that with "Use WhatsApp Web by going to web.whatsapp.com from a browser on your computer" and shows no sign-in code. So the WhatsApp web app is no use on a phone. docs/TOUCH-PLAN.md 3.1 already expected this and suggested a per-site flag in omarchy-launch-webapp. This is that.

A new Omarchy patch in both families (legacy-4.0.6/0031, patches/0029) makes omarchy-launch-webapp start https://web.whatsapp.com differently:

  • Its own profile: ~/.local/share/omamobile/webapps/web.whatsapp.com ($XDG_DATA_HOME honoured). Not under ~/.local/share/omarchy: Omarchy's upgrade tools still treat that as the old checkout and move it aside.
  • A desktop user agent: X11; Linux x86_64, as desktop Chromium on Linux sends on every CPU, with the browser's major version.

A user agent is per browser process, and the own profile is what lets this one differ. It also skips the hand-off to a running browser. The window class stays chrome-web.whatsapp.com__-Default, which the shell's launch matching (test/launch.py) expects. Every other web app launches as before. Google Messages for Web shows the same page with either user agent, so it isn't listed.

WhatsApp web app before (use a computer) and after (Scan to log in)

Before and after, on a Pixel 9a. The QR code was still loading in the "after" shot, so no sign-in code is published.

Device and build

  • Phone: Pixel 9a (tegu), Chromium as the web-app browser with the chromium-flags.conf from setup-user (Android user agent, scale 0.83)
  • Kernel release (uname -r): 7.3.0-rc6-omamobile-push1-gcbb1a7eb0a78 (a local build; unrelated)
  • Packages changed, with versions: omamobile-omarchy 0.1.41 (omamobile-omarchy 0.1.40: swap on zram at half the RAM (#528) #599 takes 0.1.40)

Checks (no phone needed)

  • tools/pr-check upstream/main passes
  • tests/all: not run
  • packages/omamobile-omarchy/test/all with OMARCHY_PKG set to the signed aarch64 omarchy-4.0.6-1 (30 applied, none upstream) and omarchy-4.5.0-3 (every shipped runtime patch applied). After the review change, on the phone, one check fails in both runs, and the same way on unchanged upstream/main: the qmlformat parse of Omarchy's Background.qml (and, with 4.0.6, notifications/Service.qml), which this pull request doesn't touch. Both patches were regenerated from the launcher in those two packages and apply with --fuzz=0.
  • test/source-family.py now counts 30 legacy patches
  • Commit has an area prefix and a body that says why; AI help is a Co-Authored-By: trailer, no Signed-off-by:

On the phone

  • Ran the patched 4.0.6 omarchy-launch-webapp with Chromium as the web-app browser, against a fresh profile each time (again after the review change: profile under omamobile/webapps/, x86_64 in the user agent, still "Scan to log in"):
    • before: WhatsApp's "use a computer" page;
    • after: "Scan to log in", in a chrome-web.whatsapp.com__-Default window.
  • How it was tested: the agent (Claude Code, on the phone) reproduced the problem, wrote and applied the patch, and took the screenshots; the test profile was removed afterwards. I (the owner) run the same workaround as a local launcher since 2026-11-09.
  • What I did not test: signing in and day-to-day use in the new profile (the owner's own WhatsApp stays in its own launcher), another phone.
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)

Not fixed here, the window width: on the 9a, Chromium at setup-user's 0.83 lays out wider than the 405 px screen, so the right edge of the page is cut off. That shows in the "after" shot and affects every Chromium window on narrower phones. #581 (browser scale from the output geometry) covers it, and this patch doesn't set a scale.

🤖 Generated with Claude Code

omamobile-setup-user gives Chromium an Android user agent so sites send
their phone versions. WhatsApp Web answers it with "Use WhatsApp Web by
going to web.whatsapp.com from a browser on your computer" and no
sign-in code, so the WhatsApp web app was no use on a phone
(docs/TOUCH-PLAN.md 3.1 expected this).

A new patch in both families (legacy-4.0.6/0031, patches/0029) makes
omarchy-launch-webapp start https://web.whatsapp.com with its own
profile (~/.local/share/omarchy/webapps/web.whatsapp.com) and a desktop
user agent for the browser's major version and the machine. A user agent
is per browser process, so the own profile is what lets it differ; it
also skips the hand-off to a running browser. The window class stays
chrome-web.whatsapp.com__-Default, which the shell's launch matching
expects. Every other web app launches as before. Google Messages for Web
shows the same page with either user agent, so it is not listed.

Tested on a Pixel 9a with Chromium as the web-app browser and the
setup-user flags: before, WhatsApp's "use a computer" page; with the
patched launcher, its "Scan to log in" page, in a
chrome-web.whatsapp.com__-Default window. test/all: 165 ok; with
OMARCHY_PKG set to the signed aarch64 omarchy 4.0.6-1 (30 patches
applied, none upstream) and 4.5.0-3 (the 4.5 series applies): pass.
test/source-family.py counts 30 legacy patches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekross

Copy link
Copy Markdown
Owner

Thanks for this. TOUCH-PLAN 3.1 has been waiting for exactly this patch,
and it is nicely contained: one case for one site, the window class kept
so the shell still finds the window, and both families covered. CI can't
run the series against a real Omarchy package, so I checked it myself:
each family's patch applies with no fuzz to the launcher in the signed
4.0.6-1 and 4.5.0-3 packages.

One change before I merge, where the profile lives. The patch puts it
in ~/.local/share/omarchy/webapps/<host>, and ~/.local/share/omarchy
isn't a free name: it is where Omarchy kept its checkout before it became
a package, and its own tools still treat it that way.
omarchy-upgrade-to-quattro moves a directory there aside to
omarchy.omarchy-upgrade-to-quattro.<date>.bak and leaves a symlink to
/usr/share/omarchy. On a phone where that has happened (or ever does),
the WhatsApp login ends up in a backup and Chromium is asked to create
its profile under /usr/share/omarchy, which it can't. Could you use a
directory of ours instead, say
${XDG_DATA_HOME:-$HOME/.local/share}/omamobile/webapps/$site, in both
patches and their comments?

Two smaller things, as you like:

  • Desktop Chromium on Linux sends X11; Linux x86_64 in its user agent on
    every CPU, so $(uname -m) gives aarch64, a string hardly any real
    desktop sends. WhatsApp accepts it today; a fixed x86_64 is the safer
    bet for the day it gets stricter.
  • docs/TOUCH-PLAN.md still lists 3.1's per-site flags as open; a line
    there would record that WhatsApp is done and Google Messages needed
    nothing.

On the version: #599 goes in first as 0.1.40, so 0.1.41 is right for this
one. The version file will conflict by one line after that; rebase when
you push the fix, or I'll resolve it at merge. I'll try the WhatsApp icon
on my 7 Pro before it goes out.

… name x86_64 in its user agent

Review of derekross#610. ~/.local/share/omarchy is not a free name: Omarchy's
upgrade tools still treat it as the old checkout, and
omarchy-upgrade-to-quattro moves it aside and leaves a symlink to
/usr/share/omarchy. On a phone where that happens, the WhatsApp sign-in
would end up in the backup and Chromium would be asked to create its
profile under /usr/share/omarchy. The profile now lives in a directory of
ours, ${XDG_DATA_HOME:-$HOME/.local/share}/omamobile/webapps/<host>, in
both families and their comments.

Desktop Chromium on Linux sends "X11; Linux x86_64" on every CPU, so the
user agent names x86_64 instead of $(uname -m), which gave aarch64, a
string hardly any real desktop sends.

Both patches were regenerated from the launcher in the signed aarch64
omarchy 4.0.6-1 and 4.5.0-3 packages and apply to them with --fuzz=0.
On the Pixel 9a the new 4.0.6 launcher, with a throwaway profile, opened
WhatsApp at "Scan to log in" in a chrome-web.whatsapp.com__-Default
window, its profile under omamobile/webapps/web.whatsapp.com.

docs/TOUCH-PLAN.md 3.1 records that WhatsApp is done and Google Messages
needed nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@den-kloot

Copy link
Copy Markdown
Contributor Author

Thanks for the review. All three are in 6c1a09b:

  • The profile now lives in ${XDG_DATA_HOME:-$HOME/.local/share}/omamobile/webapps/$site, in both patches and their comments, which also say why it isn't under omarchy/.
  • The user agent names X11; Linux x86_64 instead of $(uname -m).
  • docs/TOUCH-PLAN.md 3.1 records that WhatsApp is done and Google Messages needed nothing, and item 5 of the Omarchy patches list points at 0029.

Both patches were regenerated from the launcher in the signed aarch64 omarchy-4.0.6-1 and omarchy-4.5.0-3 packages and apply to them with --fuzz=0; packages/omamobile-omarchy/test/all applies the full series against each. On the 9a, the new 4.0.6 launcher with a throwaway profile opened WhatsApp at "Scan to log in" in a chrome-web.whatsapp.com__-Default window, with the profile under omamobile/webapps/web.whatsapp.com.

I didn't rebase, so the version file still conflicts by one line with 0.1.40 from #599: 0.1.41 is right, as you said. One unrelated note from the test runs on the phone: the qmlformat parse check of Omarchy's Background.qml fails there on unchanged upstream/main as well, so it's this phone's qmlformat, not this change.

@derekross

Copy link
Copy Markdown
Owner

Thanks, all three are in and I checked them: the profile is under
omamobile/webapps/, the user agent names x86_64, and TOUCH-PLAN records
it. I ran the package's suite on a merge with today's main against the
signed aarch64 omarchy-4.0.6-1 package (the series applies, 30 patches),
and applied the 4.5 patch to the launcher from the signed 4.5.0-3 package
with no fuzz.

One thing left, and it's main's doing, not yours: 0.1.41 was taken this
afternoon
by #632, after I told you it was right. Because your version
file and main's now hold the same line, GitHub shows the pull request as
mergeable, but it would merge with no version bump at all, and a phone that
already has 0.1.41 would never get the patch. Could you make it 0.1.42,
in three places: the version file, and the two mentions of "omamobile-omarchy
0.1.41" in docs/TOUCH-PLAN.md (3.1 and item 5)? Merging main in or
rebasing are both fine.

That push will also give this head its first CI run: your last commit
arrived while the version line conflicted, so GitHub never ran the checks on
it.

After that I'll try the WhatsApp icon on my 7 Pro, sign-in included, and
merge.

den-kloot and others added 2 commits November 15, 2026 16:32
… after main's 0029 and 0030

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… after main's 0031

Main took 0.1.41 (derekross#632) and then went on to 0.1.48, and its 0031 is the
first-run unit skip, so the WhatsApp patch moves to 0032 in the 4.5
family. The 4.0.6 family keeps 0031. TOUCH-PLAN 3.1 and item 5 name
the new number and version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@den-kloot

Copy link
Copy Markdown
Contributor Author

Thanks @derekross, and sorry this took a while. Main moved on in the meantime, so 0.1.42 was taken too: I merged today's main (c4623572, omamobile-omarchy 0.1.48) into the branch.

  • The version is 0.1.49 now (version, and TOUCH-PLAN 3.1 and item 5).
  • Main's 4.5 family has its own 0031 (the first-run unit skip), so the WhatsApp patch is 0032 there. The 4.0.6 family keeps 0031, since main added nothing after 0030 there. TOUCH-PLAN says both.
  • The patch itself is unchanged. packages/omamobile-omarchy/test/all passes on the merge (208 checks).

Head 7361bfde; this push should give it its first CI run. Set the number at merge as you like.

@den-kloot den-kloot changed the title omamobile-omarchy 0.1.41: the WhatsApp web app gets a desktop user agent omamobile-omarchy 0.1.49: the WhatsApp web app gets a desktop user agent Nov 17, 2026
@derekross

Copy link
Copy Markdown
Owner

Thank you, @den-kloot, and no need to apologise: main moved three times under this one. 0.1.49 is right today, in the version file and both TOUCH-PLAN lines, and this head has its first CI run, green.

I checked the patches again against the signed packages: the 4.5 one (0032) and the 4.0.6 one both apply to their launchers with no fuzz. I also ran the patched 4.5 launcher against stand-ins: WhatsApp's URLs get the own profile under omamobile/webapps/ and the X11; Linux x86_64 user agent with the browser's major version, and a look-alike host such as web.whatsapp.com.evil.example goes down the ordinary path.

One change, and it comes from a rule that landed after my last comment, not from anything you did. Since phones moved to Omarchy 4.5, legacy-4.0.6/ takes only what a phone needs to get through that update, and fixes go in patches/ alone. So please drop legacy-4.0.6/0031-…, put test/source-family.py's count back to 29, and have the two TOUCH-PLAN lines name patch 0032 only. I asked for both families in the first round; that was right then.

After that the remaining step is mine: the WhatsApp icon on my 7 Pro, on Omarchy 4.5 with the package built from your branch, sign-in included. Your runs on the 9a used the 4.0.6 launcher, so this will be the 4.5 patch's first run on a phone. I'll post what I see, then merge.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants