Skip to content

omamobile-shell 0.2.107: a Hotspot page behind the tile's chevron - #539

Open
den-kloot wants to merge 5 commits into
derekross:mainfrom
den-kloot:omamobile-shell-hotspot-page
Open

den-kloot wants to merge 5 commits into
derekross:mainfrom
den-kloot:omamobile-shell-hotspot-page

Conversation

@den-kloot

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

Copy link
Copy Markdown
Contributor

What and why

The Hotspot tile only switched the hotspot on and off, and its long-press opened the Wi-Fi picker, which says nothing about the hotspot itself. This gives the tile a chevron, like Wi-Fi and Bluetooth, and a page behind it (HotspotPanel.qml):

  • the switch, with the number of connected devices;
  • the network name and the password (hidden, an eye shows it), and a pencil that makes both editable; a running hotspot restarts with the new values;
  • a QR code that joins another phone (the usual WIFI: string, drawn with qrencode, a new dependency of omamobile-shell);
  • two boxes, Share VPN (devices on the hotspot reach what the phone's VPN reaches) and Route all traffic through the VPN, drawn only when the hotspot backend reports them.

Data and actions go through hotspot-panel.sh next to the page, as the tiles go through tile-state.sh and tile-action.sh. By default it reads NetworkManager's Hotspot connection (the one tile-action.sh makes) and changes it with nmcli connection modify. NetworkManager's shared mode has no switch for sharing a VPN, so the two boxes stay hidden there. A device that brings its own hotspot (hostapd, its own firewall) can answer the page's verbs from an executable at /etc/omamobile/hotspot-backend (or ~/.config/omamobile/hotspot-backend) and gets the boxes, plus an optional uplink_note (the sentence under the switch on where its devices' traffic goes; NetworkManager's backend gives none); the script still adds the QR code for it. The script's header documents the verbs and the state line.

Why the boxes at all: on the 9a the hotspot is hostapd on ap0 (#523, #525), and sharing a VPN with the hotspot's devices turned out to be something you want to decide visibly, per device, not have as a side effect of the forwarding rules. The page is where that decision belongs, so the hook for it is here, without any device's own service in the shell.

Follows the Wi-Fi and Bluetooth pages' pattern (its own layer-shell window, the same back glyph). omarchy-shell shell summon omamobile.quicksettings '{"page":"hotspot"}' opens it, like wifi and bluetooth.

The Hotspot tile with its chevron The Hotspot page: switch, name, password, QR code, the two VPN boxes

(The network name and the password in the QR code are demo values set for these screenshots; the Wi-Fi tile's network is masked.)

Device and build

Checks (no phone needed)

  • tools/pr-check origin/main passes
  • tests/all passes (488 ok)
  • tests/packages passes (or the packages I touched: omamobile-shell test/all, with the new test/hotspot-panel.sh)
  • Each changed package has its version bumped, and the new version is in the commit subject
  • Commits have area prefixes and bodies that say why; any AI help is a Co-Authored-By: or Assisted-by: trailer, never a Signed-off-by:

On the phone

  • I ran this on my own phone, booted into this build
  • Runbook steps passed (plan, step, result): no plan section; the page was used on the 9a through its own backend (hostapd on ap0): open from the chevron and from summon, back to the sheet, the switch, the eye, the pencil with a name change and a password change (the hotspot restarted, a joined phone reconnected, the QR code followed the change), both boxes on and off. The NetworkManager path is covered by test/hotspot-panel.sh (state, name and password change on a running and a stopped hotspot, the boxes refused, no qrencode, a device's own backend).
  • What I did not test: the NetworkManager backend on a phone (the 9a's hotspot is hostapd); a theme other than the dark one in the screenshots; the offscreen render (test/quicksettings-render) for the new page, which I couldn't run here (no OWL container on this laptop).
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)

The two not ok rows in the report are known on this phone and not from this change: the cpif lines come with the modem's start at boot, and omamobile-bt-addr@hci0 is #512's neighbour (the bootloader address isn't where the unit looks).

tools/phone-smoke report

phone-smoke: tegu

Kernel 7.3.0-rc6-omamobile-push1-g7423da0736b1, tools at 0e32235, 2026-11-08T22:03Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-push1-g7423da0736b1, slot b, up 9153s
storage guard (required) ok 62 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 91G free
kernel health (required) ok no oops or BUG; 0 WARN, 3 error lines in dmesg (0 known, 3 new)
new dmesg errors not ok cpif: rx_demux: PCIE: ERR! N is not opened x1; cpif: pass_skb_to_demux: PCIE: N<N: ERR! N>recv_skb fail (N) x1; cpif: io_dev_recv_skb_single_from_link_dev: N<-PCIE: ERR! rx_demux fail (err N) x1
systemd units not ok failed: omamobile-bt-addr@hci0.service
USB gadget (required) ok bound to 11210000.usb
display ok card1-DSI-1 connected, 1080x2424
GPU ok render node on panthor
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked false)
touch ok Synaptics TouchComm Touchscreen
buttons ok gpio-keys
Wi-Fi ok wlp1s0 on brcmfmac, link up
Bluetooth ok hci0, powered false
battery ok 57% Discharging, 39 °C
sound cards ok googleteguaocsn
sensors ok Accelerometer AmbientLight Proximity
cameras skip no libcamera tools
thermal ok hottest zone 54 °C

Packages: hyprland 0.57.0-3.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.15-1, omamobile-device-tegu 0.2.9-1, omamobile-firstboot 0.1.3-1, omamobile-gnss 0.2.7-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-mmd 0.1.2-1, omamobile-modem 0.1.16-1, omamobile-modem-sit 0.3.31-1, omamobile-omarchy 0.1.32-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.100-1, omamobile-voice 0.1.0-1, omaphone 0.2.3-1, omarchy 4.0.6-1, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1

🤖 Generated with Claude Code

The Hotspot tile only switched the hotspot on and off; its long-press
opened the Wi-Fi picker, which says nothing about the hotspot itself. The
tile now has a chevron, like Wi-Fi and Bluetooth, and behind it a page
(HotspotPanel.qml): the switch with the number of connected devices, the
network name and the password (hidden, an eye shows it), a QR code that
joins another phone (the usual WIFI: string, drawn with qrencode, now a
dependency), and a pencil that makes name and password editable; a running
hotspot restarts with the new values.

Data and actions go through hotspot-panel.sh next to the page, as the
tiles' tile-state.sh and tile-action.sh. It reads NetworkManager's
"Hotspot" connection (the one tile-action.sh makes) and changes it with
`nmcli connection modify`. Two more boxes, "Share VPN" (devices on the
hotspot reach what the phone's VPN reaches) and "Route all traffic
through the VPN", are drawn only when the backend reports them:
NetworkManager's shared mode has no such switch, so they stay hidden
there. A device that brings its own hotspot (hostapd, its own firewall)
can answer the page's verbs from an executable at
/etc/omamobile/hotspot-backend (or ~/.config/omamobile/hotspot-backend)
and gets the boxes; the script still adds the QR code for it. This is
what the Pixel 9a runs today (its hotspot is hostapd on ap0, derekross#523), so
the whole page, boxes included, was used there; the NetworkManager path
is covered by the test.

The page is a layer-shell window of its own, like the Wi-Fi picker, with
the same back glyph, and `omarchy-shell shell summon
omamobile.quicksettings '{"page":"hotspot"}'` opens it.

Tests: test/hotspot-panel.sh (the NetworkManager state line, the QR code
drawn once and dropped after a change, name and password checks, a change
on a running and on a stopped hotspot, the VPN boxes refused there, no
qrencode, a device's own backend), and test/all checks that the tile's
chevron opens the page, that the page runs the script next to it and that
the password field is masked.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01176vSgL9PRmxFqbaB3D9vk
@derekross

Copy link
Copy Markdown
Owner

Thanks for this. It's a nice page, and the script is careful: the QR code drawn only when the string changes and kept private in the runtime directory, the name and password checked before any backend sees them, and a test that covers both a running and a stopped hotspot and a device's own backend. I checked that the default path needs no password prompt: NetworkManager's polkit rule lets local wheel users read and change the connection, and firstboot puts the user in wheel.

A few things before it can go in:

  1. A run of the NetworkManager path on a phone. On the 9a the page ran against your own hostapd backend, which isn't in the repository, so the code everyone else gets (the 7 Pro included) has only run against the fake nmcli. The page also changes what the tile's long-press does on every phone. I can do this run on my 7 Pro: open from the chevron and a long-press, change name and password with the hotspot off and on, and join another phone from the QR code. If you'd rather, a run on any NetworkManager-hotspot phone works too.
  2. shareAvailable should start false (HotspotPanel.qml:38). As it is, the VPN boxes show on every open until the first state line arrives, and stay if the line can't be parsed; on NetworkManager phones a tap in that moment ticks a box whose "error" answer nobody reads. Letting the backend claim the feature keeps them away where it can't.
  3. "Shares mobile data only." is shown for every backend. With NetworkManager's shared mode I believe the clients follow the phone's default route, so with a full-tunnel VPN up they'd go through it. I haven't confirmed that, so take it as a question: is the sentence true there? If not, the backend could supply that line in its state.

Smaller ones: qr_escape() in hotspot-panel.sh is unused; qrencode can take the string on stdin, which keeps the password out of /proc/*/cmdline; and a line in the README on where a device's hotspot-backend comes from (and whether the 9a's will go into its device package) would help the next porter. Your smoke report lists omamobile-shell 0.2.100, so I take it the files were copied over it, as in your other two PRs; could you say so in the body?

Versions: main shipped 0.2.107 with #420 after you branched, and git merges your identical 0.2.106 → 0.2.107 line without a conflict, so I'll renumber at merge (likely 0.2.111, after #553, #557 and #542). If #553 lands first, this page should also get its swipe up from the bottom edge, so the three pages close the same way.

- shareAvailable starts false and only a backend's share_available: true
  shows the VPN boxes, so they no longer flash on open or stay when the
  state line can't be parsed.
- "Shares mobile data only." is no longer shown for every backend: a
  backend that knows says where its devices' traffic goes in a new
  optional uplink_note; NetworkManager's gives none (its devices follow
  the phone's default route, a full-tunnel VPN included), and the
  stopped hotspot reads "Shares the phone's internet connection over
  Wi-Fi."
- qrencode gets the WIFI: string on stdin, keeping the password out of
  /proc/*/cmdline; the unused qr_escape() is gone.
- README: a Hotspot page section on hotspot-panel.sh and where a
  device's hotspot-backend comes from.

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

Copy link
Copy Markdown
Contributor Author

Thanks for the careful read, and for checking the polkit side.

  1. NetworkManager run: yes please, on your 7 Pro. I have no phone with NetworkManager's hotspot here, so that run is the one that counts.
  2. shareAvailable: starts false now, and only share_available: true from the backend shows the boxes.
  3. "Shares mobile data only.": I think you're right that it isn't true with NetworkManager's shared mode (the devices follow the default route, a full-tunnel VPN included), but I haven't confirmed it on a phone either. So the sentence now comes from the backend: a new optional uplink_note in the state line, shown after the device count. The NetworkManager backend gives none, and the stopped hotspot reads "Shares the phone's internet connection over Wi-Fi." The 9a's backend says "Shares mobile data only." (or that traffic goes through the VPN when both boxes are on).

Smaller ones: qr_escape() is gone; qrencode gets the string on stdin (the test checks it's no longer an argument); the README has a Hotspot page section on hotspot-panel.sh and where a device's hotspot-backend comes from. The 9a's isn't in its device package: it's mine for now and would go in as its own PR together with the hostapd unit. The body now says the files were copied over 0.2.100.

Screenshots of the updated page, both with demo values from a stand-in backend: left a device's own backend (the boxes and its "Shares mobile data only."), right what the NetworkManager backend's state line gives (no boxes, no sentence after the device count):

Hotspot page with a device's own backend: VPN boxes and the uplink note Hotspot page with the NetworkManager backend's state: no VPN boxes, no uplink note

test/all and tools/pr-check pass. On the 9a the updated page runs through its own backend; the NetworkManager path again only against the fake nmcli.

Renumbering at merge and the swipe-up once #553 is in: both fine with me.

@derekross

Copy link
Copy Markdown
Owner

Thank you for turning these around so quickly. Every point is answered, and well. The VPN boxes now wait for the backend to claim them. The uplink_note is a better design than a fixed sentence. The README now tells the next porter where a backend comes from. And the password stays out of qrencode's command line.

One small thing in the test, not blocking: the fake qrencode logs $* $(cat), so the WIFI: string lands in the same place whether it came as an argument or on stdin. When I put it back as an argument, the new "on stdin" check still passed. Logging the two separately (say args: $* and stdin: $(cat) on their own lines) and checking that only the stdin line has WIFI: would make it catch that. Happy to take this as a follow-up.

What's left is on my side: the NetworkManager run on my 7 Pro. I'll open the page from the chevron and from a long-press, change the name and password with the hotspot off and on, and join a second phone from the QR code. I'll post the result here. Main has moved to 0.2.108 since your last push, so the version file now conflicts. No need to rebase for that: I'll set the next free number at merge (most likely 0.2.111, after #553 and #557), and if #553 lands first, I'll make sure this page gets the same swipe up to close.

The owner asked that the full-screen pages behind quick settings' tiles
close the same way. The Wi-Fi and Bluetooth pages get a swipe-up strip
at their bottom edge in derekross#553; the Hotspot page now has the same one:
max(28, Style.space(36)) high, a swipe up past 24 px closes it, and the
page's body ends above the strip, so nothing on the page lies under it.

test/all on a PC: 304 ok.

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

Copy link
Copy Markdown
Contributor Author

7b0b7a7 adds a swipe-up strip at the page's bottom edge, the same one the Wi-Fi and Bluetooth pages get in #553. That way all the full-screen pages behind the tiles close the same way, which is what I (the owner) asked for. The page's body ends above the strip. test/all on a PC: 304 ok, and the page opens with no QML errors on my 9a.

@derekross

Copy link
Copy Markdown
Owner

Thanks for adding the swipe up here too. I read it against #553's final
version: the same strip, and the page's header and scrolling body both sit
inside the item that now ends above it, so nothing on the page is under
the strip.

Two things before this can go in, one for you and one for me:

  1. The test file trips a lint that landed on main after your last CI
    run.
    tests/grep-q-pipes (bin/omamobile, tools, rootfs: no pipe into grep -q under pipefail #587) refuses a pipe into grep -q in any
    script that sets pipefail, because grep -q can exit before the
    writer has finished and fail the pipeline at random.
    test/hotspot-panel.sh has eleven of them, for example
    (run set "" "longenough" || true) | grep -q '^error:' and
    echo "$out" | grep -q '^ok: hotspot restarted'. Could you change them
    to grep -c ... >/dev/null and rebase onto main? The branch conflicts
    with main in the version file, and GitHub runs no checks on a
    conflicting pull request, so your last two commits have never been
    through CI. Any number above main's is fine for the rebase; I'll set the
    final one at merge. While you're in that file: the fake qrencode still
    logs its arguments and its stdin on one line, so the "on stdin" check
    passes either way. Two lines (args: $*, stdin: $(cat)) would make it
    mean something.
  2. The NetworkManager run on my 7 Pro is still mine to do. I haven't
    done it yet. I'll open the page from the chevron, a long-press and
    summon, change the name and password with the hotspot off and on,
    join a second phone from the QR code and check it gets out to the
    internet, and close the page each way including the new swipe. I'll
    post the result here.

One small thing for the merge, nothing for you to do: your first commit
ends with a Claude-Session: link, which I'll leave out of the squashed
message.

I'd like #553 to land first, so the three pages get the same strip in one
order.

den-kloot and others added 2 commits November 10, 2026 20:40
…de fake tells arguments from stdin

Review of derekross#539. tests/grep-q-pipes (derekross#587) refuses a pipe into grep -q in a
script that sets pipefail: grep -q exits at the first match, the writer can
get SIGPIPE, and pipefail then fails the pipeline at random.
test/hotspot-panel.sh had eleven; they now use grep -c ... >/dev/null,
which reads all its input.

The fake qrencode logged its arguments and its stdin on one line, so the
check that the WIFI: string goes to qrencode on stdin passed either way. It
now writes "qrencode args:" and "qrencode stdin:" lines, and the test checks
that the string arrives on stdin, that the arguments are only the options,
and that the string is never an argument (it would show in
/proc/*/cmdline). With the script changed to pass the string as an
argument, the old test still passed and the new one fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main is at omamobile-shell 0.2.115; this branch takes 0.2.116 so the
version file no longer conflicts and CI runs again. The final number is
set at merge.

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

Copy link
Copy Markdown
Contributor Author

Thanks. Both points are in:

  • b704604: the eleven pipes into grep -q in test/hotspot-panel.sh now use grep -c ... >/dev/null; tests/grep-q-pipes from main passes. The fake qrencode writes qrencode args: and qrencode stdin: on lines of their own, and the test now checks that the WIFI: string arrives on stdin, that the arguments are only -o <file> -s 8 -m 2 -l M, and that the string is never an argument. With the script changed to pass the string as an argument, the old test still passed and the new one fails.
  • a0112ac: I merged main into the branch rather than rebasing, so nothing is force-pushed; the only conflict was the version file, now 0.2.116 (yours to set at merge). GitHub reports it mergeable and CI is running on it. tools/pr-check upstream/main passes, and packages/omamobile-shell/test/all passes on the merged head (313 ok).

One thing I noticed while running it on the 9a: test/hotspot-panel.sh isn't hermetic against a system backend. The script looks at /etc/omamobile/hotspot-backend after the user's own, so on a phone that has one (mine does, hand-installed), the NetworkManager checks fail; CI has none. I ran the suite with that file hidden in a private mount namespace. I left the script as it is; a variable for the system path would make the test independent of the host, if you'd like that here or separately.

Fine with #553 going in first.

@derekross

Copy link
Copy Markdown
Owner

Thanks, both points are in and I checked them: tests/grep-q-pipes passes
on a merge with today's main, and the fake qrencode now tells arguments
from stdin, so that check means something.

Main moved under you again this evening, in a way that matters for this
page:

  1. Back is now phone-wide (omamobile-shell 0.2.116: the back gesture sends Escape by its key code #637, omamobile-shell 0.2.117, omamobile-settings 0.1.1: Back goes back one level, and home from an app's top level #643, omamobile-shell 0.2.117). The
    back gesture sends Escape to whatever has the keyboard focus, and the
    rule is that it goes back one level. The Wi-Fi, Bluetooth and Record
    pages now answer Escape with root.backRequested(), the same as their
    header arrow, so Back returns to quick settings. The Hotspot page still
    has Keys.onEscapePressed: root.close() (HotspotPanel.qml, on the
    panel), which closes everything. Could you make it:

    Keys.onEscapePressed: {
      if (root.editing) root.cancelEdit()
      else root.backRequested()
    }

    and add HotspotPanel to the loop in test/all that checks this for
    Wi-Fi and Bluetooth (around line 134 on main), and to the sentence in
    plugins/README.md that lists the pages that go back to quick settings?
    The scrim tap and your swipe strip keep root.close(): those leave, they
    aren't Back. Nothing to register in BackLink.js, since the page takes
    the keyboard focus like the others.

  2. The version file conflicts again (omamobile-shell 0.2.116: the back gesture sends Escape by its key code #637 took 0.2.116, main is at
    0.2.117), so GitHub won't run checks on a new push until it's merged or
    rebased. Any number above 0.2.117; I'll set the final one.

Two small things while you're there:

  • When the quick settings sheet opens, open() closes the Wi-Fi and
    Bluetooth pages but not the Hotspot one, so pulling the sheet down over an
    open Hotspot page leaves the page behind it. hotspotPanelItem.close()
    next to the other two.
  • Yes please to the variable for the system backend path. A package test
    that reads /etc on the machine it runs on fails in makepkg on exactly
    the phones that have a backend. Have the test point it at a scratch path.

The NetworkManager run on my 7 Pro is still mine and still not done; I'll do
it on your next push, since Back from the page is now part of it. #553 goes
in first, as before.

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