Skip to content

feat(desktop): one Machines page for paired and linked machines - #176

Open
sanchitrk wants to merge 6 commits into
feat/pairingfrom
feat/machines-paired
Open

sanchitrk wants to merge 6 commits into
feat/pairingfrom
feat/machines-paired

Conversation

@sanchitrk

@sanchitrk sanchitrk commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #175.

The model

  • Hostname: the computer's own name. Read-only everywhere.
  • Label: one friendly name per machine, stored on the machine.
  • Paired: this computer reaches a machine directly, with a pairing code. It is direct access, as an SSH key is, so a paired computer may set the machine's label and link it to a workspace.
  • Linked: a machine belongs to a workspace. A workspace is a member boundary, not a set of paired machines.

Application → Machines

One page replaces Paired Machines and Workspaces → Machines. Every machine appears once, grouped by what this computer can do with it. The workspace is the one selected in the app; without one, only the first two sections show.

  1. This Machine: Label, Hostname with copy, ID. Its last row is "Not Linked" with Set Up, or "Linked to " with Unlink.
  2. Paired Machines: name, address, whether it is linked, and Online, Last Seen, or Not Paired. A row opens the machine's page. Pair a Machine is a dialog: the command to run, Address, Pairing Code, each error under its own field.
  3. Waiting to Join : machines that ran codework connect, each with its code to approve.
  4. Linked to , Not Paired: the workspace's machines this computer is not paired with, each with Unlink in its menu.

A paired machine's page

  • Label is written to the machine itself. Hostname and Version are read-only. Address can be changed.
  • Workspace: "Link to " starts the connect on that machine and approves its code as the signed-in person, in one click. Once linked, the row offers Unlink, which is confirmed. A failure shows in the row.
  • Pair Again appears when the machine no longer accepts this computer.
  • Remove is confirmed, and ends the pairing on the machine too.
  • An id that matches nothing shows a not-found card with a way to the list.

Settings as a whole

  • The sidebar is Profile, Tabs, Themes, Providers, Machines. The Workspaces group is gone, and so are the pages that only showed mock data (General, Keybindings, Models, Chat, MCP, Skills, Plugins, Sandboxes, Archive), with the two "Manage" links that led to the MCP one.
  • Setup lives under the Machines page, and Set Up Later returns there.
  • Sections take a description line and a count, with more room between sections. Descriptions do not end with a full stop.
  • Escape no longer leaves Settings. The sidebar keeps a section highlighted on its sub-pages.

App server

  • machine.connect and machine.disconnect take an optional serverId, so they reach a paired machine as well as the default one. A machine that is not paired any more, or does not answer, fails in the app's own words; the machine's own connect error passes through unchanged.
  • A paired machine's status carries label, host, version, online, seenAt, machineId and the workspaces it is linked to. They are stored, so they show while the machine is offline, and are refreshed after a link or an unlink.
  • servers.label sets the label on the machine over its paired connection. servers.update refuses a name on a paired machine.
  • servers.remove tells the machine to end the pairing, best effort.
  • Migrations 202611200002_label and 202611210001_identity add the columns.

Also

  • codework service pair notes on stderr that the code gives full access to the machine. Stdout is still only the code.

Verified

Check Result
vp check, vp run typecheck pass
apps/server non-live suite 45 passed
knip for apps/web clean

Driven by hand in the Electron app against a local relay and an OrbStack machine: Link, the row turning Linked, Unlink with its confirmation, and the machine's own error shown in the row when it cannot reach the relay. Earlier on this branch: labels, offline and online, revoke and pair again, pairing through the dialog, changing an address, removing, keyboard only, a narrow window, dark theme.

The packages/codework and live suites last ran before this commit; it changes nothing under packages/.

Known gaps

  • No automated test links a machine through a real relay, because no harness starts one. The suite covers the new status fields and the error paths.
  • A paired machine linked or unlinked from elsewhere (the CLI, or Approve) shows it only after it reconnects.
  • A machine links through the relay it is configured with; with a different relay than the app's, the link fails with the machine's own message.
  • A link to a stopped machine waits without a timeout, as the default machine's does.
  • A paired device may do everything a local caller may, except manage pairing.
  • No machine label on threads in the sidebar yet, and no pairing again from inside a thread.

🤖 Generated with Claude Code

sanchitrk and others added 6 commits November 20, 2026 19:03
- Rename the settings group to Workspaces and drop Setup from the
  sidebar. Setup is reached from the Machines page, where its row is
  always present, and Set Up Later returns there.
- Show the hostname in its own row with a copy button, since it is the
  name used when none is given, and shorten the row descriptions so a
  long hostname cannot wrap them.
- Show the ID in the copy field once assigned, and as "Not Assigned"
  until then.
- Hold the card's four rows while it loads and wait for the workspace
  before showing them, so the sections below no longer jump.
- The copy field truncates a long value and shows it in full on hover.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Escape on a settings page returned to the app, which also fired when a
key press missed the dialog or field it was meant for. Settings is left
with Back to App or the close button.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A paired machine's status now carries its label, hostname and version as
the machine last reported them, whether it is answering, and when it
last did. They are kept in the app database, so they show while the
machine is offline, and a change reaches watchers without a manual check.

- `servers.label` sets the label stored on the machine, over its paired
  connection. Pairing is direct access to the machine, so nothing more is
  asked.
- The private per-app name of a paired machine is gone; its label
  replaces it. A migration clears the old names.
- An address nobody answers at now says so in plain words.
- `codework service pair` notes on stderr that the code gives full access
  to the machine.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A machine has a hostname, which is the computer's own name, and one
label, which is stored on the machine. Pairing reaches a machine
directly; linking puts it in a workspace.

- Application > Paired Machines lists the machines this computer is
  paired with. Each opens a page of its own with its label, hostname,
  address and version, pairing again when the machine no longer accepts
  this computer, and removal.
- Pair a Machine is a dialog laid out like Add Provider's, with each
  error under its own field.
- Workspaces > Machines says Label, Linked and Unlink.
- The settings sidebar keeps a section highlighted on its sub-pages.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Removing a paired machine only forgot it in the app, so the machine kept
listing the computer as a device until the session lapsed.

- A paired device can end its own pairing with `device.leave`. It
  removes that device alone and closes its sockets, the one the call
  came in on included, so a client takes a reply or the connection
  ending as done.
- The app calls it before removing the row, for at most three seconds,
  and removes the row whether the machine answers or not.
- The empty Paired Machines list has one Pair a Machine button, in the
  header.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…page

Settings has one Machines page under Application. Every machine appears
once: This Machine, Paired Machines, Waiting to Join, and the workspace's
machines this computer is not paired with. A paired machine's page links
it to the selected workspace, or unlinks it.

- The app server's machine.connect and machine.disconnect take an
  optional server id, so they reach a paired machine as well as the
  default one.
- A paired machine's status carries its machine id and the workspaces it
  is linked to; both are stored and refreshed after a link or an unlink.
- Setup moves under the new page. The Workspaces group and the Paired
  Machines entry leave the settings sidebar.
- Settings sections gain a description line and more room between them.
  Descriptions no longer end with a full stop.
- The settings pages that only showed mock data are removed, with the
  controls only they used.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sanchitrk sanchitrk changed the title feat(desktop): Paired Machines, labels, and Linked wording in settings feat(desktop): one Machines page for paired and linked machines Nov 20, 2026

This branch has not been deployed

No deployments
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