Say which machine a session is on, and which one is here - #136
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Machines take their name from
os.Hostnamewhen 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:Where they show:
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_IDlocalmeans the machine this tab rides, which on a relay origin is a box in another room reached exactly like the others. So theloopbackflag the router already threads into the fleet is exposed asuseLoopbackTab(), 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, andmachineChipForfor the route rule that decides whether a chip exists at all.pnpm vitest run— 91 files, 1917 tests, all green.pnpm run lintclean.🤖 Generated with Claude Code