Skip to content

Bring back New session and always offer Install app in the sidebar - #13

Merged
devswha merged 1 commit into
mainfrom
feat/sidebar-new-session-install
Sep 24, 2026
Merged

devswha merged 1 commit into
mainfrom
feat/sidebar-new-session-install

Conversation

@devswha

@devswha devswha commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Summary

New session. After the PC sidebar arrived, the top bar held only Add PC. New session was left as the small + on each PC header. It now leads the top bar again: it opens on the selected PC, the same as Mod+Shift+N, and it's disabled while that PC isn't connected. Add PC sits beside it, and the per-PC + stays for the other PCs.

Install app. The footer button used to appear only after the browser fired beforeinstallprompt. iOS never fires it, and Chrome skips it over plain HTTP, so on those the button never showed. It now shows unless the app is already installed:

  • When the browser has a prompt, the button opens it, as before.
  • Otherwise the button expands the platform's own steps from the new installHelp: Share → Add to Home Screen on iOS, "use HTTPS" on an insecure origin, and separate steps for Android, desktop Chrome/Edge, Mac Safari and Firefox.
  • Settings → Install shows the same text in place of the old generic hint.

Testing

  • bun run typecheck passes.
  • bun test passes 260/260, including the new src/lib/install.test.ts.
  • bun run test:ui passes 7/7. Its New session step now clicks the top-bar button by its exact name. The old /^New session/ pattern also matched the per-PC + button, so it no longer picked out a single button.
  • Checked in headless Chrome at 1280px and at iPhone width (390px, iOS user agent). Both buttons fit in the top bar, and the iOS install steps expand under the button.

🤖 Generated with Claude Code

The PC sidebar's top bar only had Add PC, so New session survived only as
the small + on each PC header. It now leads the top bar again, opening on
the selected PC like Mod+Shift+N, with Add PC beside it.

Install app only showed when the browser fired beforeinstallprompt, which
iOS never does and Chrome skips over plain HTTP. It now shows unless the
app is installed: the browser prompt when there is one, otherwise the
platform's own steps (installHelp), also used in Settings.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@devswha
devswha merged commit 993affb into main Sep 24, 2026
@devswha
devswha deleted the feat/sidebar-new-session-install branch September 26, 2026 14:48
devswha added a commit that referenced this pull request Nov 21, 2026
A block record (Not me included) or a member's remove that drops a row now blocks the nodes recorded on that row in
the same step, journalled (commitBlock, removeAccountKey). Its deny is already on disk, so a node block that fails
does not undo the drop: the node list fails closed instead, and keepOutTailnetNodes fails it closed on any error.
Security-triage change (b) to owner decision #13.
devswha added a commit that referenced this pull request Nov 21, 2026
Every connection and stream let in from a tailnet node (by the owner's login or a device's credential over the
tailnet) subscribes to that node; writing a block (dialog, Revoke, Revoke all, ovis recover --remove, an account
record's drop) ends them as a Revoke ends a row's sessions (1008 "Device access revoked"), and a list that fails closed
ends them all. Security-triage change (c) to owner decision #13.
devswha added a commit that referenced this pull request Nov 21, 2026
…estart still keeps them out

An account record's drop (a block, Not me included, or a member's remove) now writes the dropped rows' Tailscale
StableNodeIDs inside its removal evidence entry (Removal.tailnet_nodes), in the same write as its deny. At start the
node list is rebuilt from the standing removals (DeviceStore.attachTailnetNodes -> TailnetNodes.takeDenials); an Allow
written after a denial stands. So a node-list write that fails at the drop only keeps the list closed until the next
start, which blocks those nodes from the deny. The flag-off branch of removeAccountKey, which writes no deny before
its drop, blocks the nodes first and drops nothing when that fails. Security-triage follow-up to (b), owner decision #13.
devswha added a commit that referenced this pull request Nov 21, 2026
A source without a WhoIs reader of its own asks `tailscaleWhois.read`, which the bun test preload replaces with one
that answers nothing (scripts/test-herdr.ts, beside the ssh -G stand-in), so fixtures that pass only a status reader,
and servers made with no tailnet at all, never spawn the real CLI. A guard test spies Bun.spawn. A WhoIs that names
nothing is now kept five seconds, so a broken CLI is not spawned once per request. Gate notes 1 and 4, owner decision #13.
devswha added a commit that referenced this pull request Nov 23, 2026
…that stay, codes kept

From the adversarial review of #4492:
- #1 #2 #7 #10 One open attempt for the whole connect screen, tracked from the tap
  (before the Tailscale question, whose wait is bounded and takes only an
  explicit off as off): a newer tap, Cancel or leaving drops an earlier one's late
  answer, no second open runs while one does, both panes show the one status,
  open is called only where the app has it, Cancel shows only where it can stop
  it, and the plain wait and the removed screen show a scanned PC's open too.
- #3 #4 My PCs and Add a PC stay mounted under one parent across 1024 px, so the
  tab, what is typed, the focus, the search and an open survive a resize; a
  pairing dialog stays the top of the history when the window narrows under it.
- #5 Each desktop pane scrolls on its own; checked at 1024x400 with the wheel.
- #6 A code is looked up in its own field, kept through a failure to correct.
- #8 Tailscale's IPv6 range counts as a Tailscale address.
- #9 Android's no-answer is explained; an unknown reason never shows the app's words.
- #11 #12 A PC the app keeps open while choosing shows My PCs with its Back, and
  only its own scope on a self-hosted relay's origin is marked.
- #13 One alert for a failed sign-in on a wide screen. #14 The Cancel test presses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
devswha added a commit that referenced this pull request Nov 29, 2026
…ock (#5027)

Fixes #5022

## What was wrong
Removing a paired device blocks the tailnet nodes it came from (owner
decision #13). A device paired again with a code from that node was let
in over HTTP by `tailnetNodeGate` (the `via === "device"` branch never
checked `isBlocked`), but every WebSocket was then ended at once by
`tailnetNodes.onBlocked` with 1008 "Device access revoked". The only way
to lift the block was the Allow card, which appears only for a
Tailscale-grant arrival, so a tagged node (no `Tailscale-User-Login`)
could never get back in.

## Change
In `tailnetNodeGate`'s device branch, when the row's node is blocked:
- a row admitted at or after the node's block (paired again with a code:
the owner let it in again) lifts the block through
`DeviceStore.allowTailnetNode`, journalled as `tailnet` / `allow` like
the PC's Allow card. Not while the account lock stands, matching the
Allow route.
- a row paired before the block is refused with the existing
`tailnet_blocked` reason and the node is put on the PC's Allow card
(`nodes.ask`), so HTTP and the stream agree instead of a half-admitted
state. The client's existing tailnet_blocked text already says "Allow it
on the PC's own screen, or pair it with a code."

Decision #13 otherwise stands: a removed device stays out until it is
paired again or allowed. No UI change and no HTTP/WS contract change
(`tailnet_blocked` is an existing refusal reason).

## Tests
`server/tailnet-nodes.contract.test.ts`, against a real server with
isolated state, for a node by the owner's login and a tagged node: pair
twice, remove one row, the earlier row is refused on `/api/health` and
`/ws` (401) and the card asks; pair again -> the new row's WebSocket
gets its first frame, the node is unblocked, the earlier row is in
again, the journal holds `block` then `allow`. Both cases fail on main
(the earlier row is admitted over HTTP).
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.

1 participant