Run web apps on Helium, on one shared profile #29

Merged
arne merged 2 commits from helium-webapps into main 2026-11-07 22:28:58 +01:00
Owner

fjordxy-pwa didn't work: it launched LibreWolf with --class, but the request goes to the running browser, so web app windows came up with app-id librewolf. niri couldn't tell them apart from the browser.

What changes

  • Web apps run on Helium, whatever the user browses with: --app= windows on one profile shared by all web apps (~/.local/share/fjordxy/webapps). Chromium gives each window an app-id built from its URL even when the browser is already running: chrome-<host>_<path>-Default, / as _, query dropped.
  • One shared profile because on Linux a password manager is a browser extension. Users install it and sign in once, using fjordxy-pwa setup (pwa setup in the launcher). That command lets Helium's onboarding run, because the Web Store installs nothing until the user agrees to Helium's services there.
  • nix/helium.nix packages Helium from the release tarball, linked against the machine's nixpkgs. The AppImage loses GPU acceleration: its glibc is older than the one Mesa needs. dev/update-helium bumps the version and hashes, then builds.
  • fjordxy-pwa rewritten in Python, with add, remove, list, open and setup. Entries run fjordxy-pwa open <slug> instead of naming a store path, which used to break after garbage collection. The URL stays out of Exec=, where % has a special meaning. Icons come from the site's manifest, then apple-touch-icon, then the favicon. A second entry with the same app-id is refused. Old LibreWolf entries are marked in list and can be replaced.
  • Docs: APPS.me.md ("Web apps") and PLAN.md.

Tested on niri (Helium 0.21.1.1)

  • Two web apps on one running profile get different app-ids. StartupWMClass matches the real app-id, including for a path containing %20.
  • Built against the system's nixpkgs: no Mesa or EGL errors, and the GPU process loads the hardware driver (libgallium).
  • add, the duplicate checks, list and remove work. Entries pass desktop-file-validate.
  • Proton Pass passkey login works in Helium, so far only tested in a normal window, not an --app= window.
  • nix flake check passes for x86_64-linux only. aarch64-linux was neither built nor checked.

Not in this PR

  • No runtime niri rules for web apps. A rule is still a programs.fjordxy.apps entry plus a rebuild (APPS.me.md lists this under open questions).
  • Helium adds to the closure of programs.fjordxy.package for every user, whether they use web apps or not.

🤖 Generated with Claude Code

`fjordxy-pwa` didn't work: it launched LibreWolf with `--class`, but the request goes to the running browser, so web app windows came up with app-id `librewolf`. niri couldn't tell them apart from the browser. ## What changes - **Web apps run on Helium**, whatever the user browses with: `--app=` windows on **one profile shared by all web apps** (`~/.local/share/fjordxy/webapps`). Chromium gives each window an app-id built from its URL even when the browser is already running: `chrome-<host>_<path>-Default`, `/` as `_`, query dropped. - **One shared profile** because on Linux a password manager is a browser extension. Users install it and sign in once, using `fjordxy-pwa setup` (`pwa setup` in the launcher). That command lets Helium's onboarding run, because the Web Store installs nothing until the user agrees to Helium's services there. - **`nix/helium.nix`** packages Helium from the release tarball, linked against the machine's nixpkgs. The AppImage loses GPU acceleration: its glibc is older than the one Mesa needs. **`dev/update-helium`** bumps the version and hashes, then builds. - **`fjordxy-pwa` rewritten in Python**, with `add`, `remove`, `list`, `open` and `setup`. Entries run `fjordxy-pwa open <slug>` instead of naming a store path, which used to break after garbage collection. The URL stays out of `Exec=`, where `%` has a special meaning. Icons come from the site's manifest, then `apple-touch-icon`, then the favicon. A second entry with the same app-id is refused. Old LibreWolf entries are marked in `list` and can be replaced. - Docs: `APPS.me.md` ("Web apps") and `PLAN.md`. ## Tested on niri (Helium 0.21.1.1) - Two web apps on one running profile get different app-ids. `StartupWMClass` matches the real app-id, including for a path containing `%20`. - Built against the system's nixpkgs: no Mesa or EGL errors, and the GPU process loads the hardware driver (`libgallium`). - `add`, the duplicate checks, `list` and `remove` work. Entries pass `desktop-file-validate`. - Proton Pass passkey login works in Helium, **so far only tested in a normal window, not an `--app=` window.** - `nix flake check` passes for x86_64-linux only. aarch64-linux was neither built nor checked. ## Not in this PR - No runtime niri rules for web apps. A rule is still a `programs.fjordxy.apps` entry plus a rebuild (APPS.me.md lists this under open questions). - Helium adds to the closure of `programs.fjordxy.package` for every user, whether they use web apps or not. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fjordxy-pwa opened LibreWolf with --class, and the windows came up as
`librewolf`: the request goes to the running browser, so web apps were
caught by the browser's window rule and niri could not tell them apart.

Web apps now open as Helium --app= windows on one profile shared by all
of them. Chromium names each such window after its URL even with the
browser running, so the app-id is computable and goes in StartupWMClass.
One profile because a password manager is an extension: install it and
sign in once, via `fjordxy-pwa setup` / `pwa setup` in the launcher.

Helium is not in nixpkgs, so nix/helium.nix carries it, patched from the
release tarball against the machine's nixpkgs (the AppImage loses the GPU
to a glibc mismatch with Mesa). dev/update-helium bumps it.

fjordxy-pwa is now Python: add/remove/list/open/setup, entries run
`fjordxy-pwa open <slug>` instead of a store path, the URL is kept out of
Exec=, icons come from the manifest or apple-touch-icon, and a second
entry on the same app-id is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arne force-pushed helium-webapps from af71333111 to 6451d324b4 2026-11-07 22:19:29 +01:00 Compare
arne merged commit f69613ae9e into main 2026-11-07 22:28:58 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bases/fjord!29
No description provided.