Skip to content

Say which machine a session is on, and which one is here - #136

Merged
karngyan merged 1 commit into
mainfrom
feat/machine-indicator
Aug 20, 2026
Merged

Say which machine a session is on, and which one is here#136
karngyan merged 1 commit into
mainfrom
feat/machine-indicator

Conversation

@karngyan

Copy link
Copy Markdown
Contributor

Why

Machines take their name from os.Hostname when they join a relay, and a hostname is not a string anybody has memorised. On a fleet of more than one that leaves two questions open on the screens that matter: which machine is this session on — answerable, but only in the sessions list — and am I looking at the box in front of me, which nothing answered at all.

What

Two marks, one shared component (machine-mark.tsx), so the glyphs mean the same thing wherever they land:

  • a desktop for the machine this browser is running on
  • the Cloudflare cloud — the mark this UI already uses for remote access, in the same orange — for a machine reached through the relay

Where they show:

  • Sessions list: on machine group headings, beside the fold toggle rather than inside it, so the control keeps its own accessible name; and on every row's machine badge, ahead of the name.
  • Terminal: a new chip in the corner column, above the tag strip. The tags and the chip now share one right-edge column, which is what carries the position the tags used to carry themselves.

All of it is behind the rule the machine column already follows: a fleet of one is not a question, so a single-machine screen is exactly as bare as it was.

"This machine" is not LOCAL_MACHINE_ID

local means the machine this tab rides, which on a relay origin is a box in another room reached exactly like the others. So the loopback flag the router already threads into the fleet is exposed as useLoopbackTab(), and a relay tab (a phone, say) marks every machine — its own ride included — as remote. That is the truth from there, and a house on any of them would point somewhere the reader is not.

Tests

machineOfGroup (both levels of a two-cut key), the table's marks and their absence, the terminal chip's placement/wording/absence, the sessions route across loopback and relay tabs, and machineChipFor for the route rule that decides whether a chip exists at all.

pnpm vitest run — 91 files, 1917 tests, all green. pnpm run lint clean.

🤖 Generated with Claude Code

Machines are named after their hostnames when they join a relay, and a
hostname is not a string anybody has memorised — so a fleet of more than
one leaves "which machine is this?" answered by a word that means little
and "am I looking at the box in front of me?" not answered at all.

Two marks answer both, in one shared component so the glyphs mean the
same thing wherever they land: a desktop for the machine this browser is
running on, and the Cloudflare cloud — the mark this UI already uses for
remote access — for a machine reached through the relay.

They appear on the sessions list, on machine headings and on every row's
machine badge, and in a new chip above the terminal's tag strip. All of
it is behind the same rule the machine column already follows: a fleet of
one is not a question, so nothing is drawn.

"This machine" needs more than LOCAL_MACHINE_ID, which means the machine
a tab rides — on a relay origin that is a box in another room, reached
exactly like the others. So the loopback flag the router already threads
to the fleet is exposed as useLoopbackTab, and a relay tab marks every
machine, its own ride included, as remote.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@karngyan
karngyan merged commit 84d6701 into main Aug 20, 2026
1 check passed
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