Repository navigation
Conversation
- 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
…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 <[email protected]>
- A machine's pairing routes are POST /api/v1/devices and POST /api/v1/tickets, and answer 201. They were /pair and /ticket, with no version. The socket stays at /rpc/v1. - The relay's approve and decline sit under their workspace, beside the list of pending pairings; the workspace leaves the body. Both stay POST. The routes a machine signs are unchanged. Co-Authored-By: Claude Fable 5.2 <[email protected]>
The server stays plain HTTP; TLS ends at a proxy or tunnel in front of it. - Drop the Host check from the door, so a proxied request is not refused. The Origin and credential checks are unchanged. - Believe X-Forwarded-Proto only from loopback or a trusted proxy, named by --trusted-proxy, CODEWORK_TRUSTED_PROXY or server.trustedProxy in the user settings, in that order. A project's settings cannot set it, and an entry that is not an address or range stops startup. - Record on each paired device whether its last connection was encrypted, and show it in `codework service devices`. - The pair dialog takes a scheme: a domain name defaults to wss, an IP, .local or single-word name to ws, and a typed scheme wins. A plain address shows "This connection is not encrypted". - Document the proxy setup. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…othing The link fails as not answering within a bound, on the connection's own liveness check. Co-Authored-By: Claude Fable 5.2 <[email protected]>
sanchitrk
added a commit
that referenced
this pull request
Nov 23, 2026
…rue (#177) Lands #173, #174, #175 and #176 with it: a per-home token on the RPC listener, plain CLI errors, a session per paired client, one Machines page and machines behind a TLS proxy. - Every remote client pairs a key of its own: a one-time code from `codework service pair`, then short-lived tickets signed with that key. - Relay alone decides whether a machine is in a workspace; while it can't be reached, its last status shows, or Unknown Link. - An unlink while Relay can't be reached keeps the link, marked leaving, until a heartbeat's revoke is confirmed. - Setup's last step is Link, and it can be skipped. User-facing copy calls the broker Relay. - The relay listens on HOST; a new E2E test links a paired machine through a real Relay. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
sanchitrk
added a commit
that referenced
this pull request
Nov 23, 2026
Accounts and workspaces through Clerk and the relay, and machines that connect, link and pair: - The relay holds accounts, workspaces and machine links; machines pair with it by a code a member approves, bound to one identity key per home (#172). - Local listeners take a per-home token; remote clients pair keys of their own and use short-lived tickets (#173, #175, #177). - One Machines page for this machine, paired machines and the workspace's machines (#176, #177). Relay alone decides membership; an unlink while Relay can't be reached finishes once it can. - Plain CLI errors for bad ids, flag checks and refused connections (#174). - E2E coverage: the relay suite, and a paired machine linked through a real Relay from the app server. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Stacked on #175.
The model
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.
codework connect, each with its code to approve.A paired machine's page
Settings as a whole
App server
machine.connectandmachine.disconnecttake an optionalserverId, 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.label,host,version,online,seenAt,machineIdand 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.labelsets the label on the machine over its paired connection.servers.updaterefuses anameon a paired machine.servers.removetells the machine to end the pairing, best effort.202611200002_labeland202611210001_identityadd the columns.Also
codework service pairnotes on stderr that the code gives full access to the machine. Stdout is still only the code.Reaching a machine behind a proxy
codework servestays plain HTTP; TLS ends at a proxy or tunnel in front of it.X-Forwarded-Protois believed only from loopback or a trusted proxy. A trusted proxy is an address or CIDR range from--trusted-proxy, thenCODEWORK_TRUSTED_PROXY, thenserver.trustedProxyin the user settings. A project's settings cannot set it, and a bad entry stops startup with the value named.serveris a new block in the user settings file, holding onlytrustedProxyfor now.codework service devicesshows it in an ENCRYPTED column.wsson 443; an IP,.localor single-word name defaults towson 7433; a typed scheme wins. A plain address shows "This connection is not encrypted".Routes
POST /api/v1/devicesandPOST /api/v1/tickets, both answering 201. The socket stays at/rpc/v1./v1/workspaces/:workspaceId/...); approve, decline and remove stayPOST.Verified
vp check,vp run typecheckapps/servernon-live suiteapps/webpackages/codeworkpairing and door testsinfra/relaysuiteDriven 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.
New E2E cases put a real reverse proxy in front of a real server: a device paired through it is recorded as encrypted, a forged header from an untrusted peer is ignored, a foreign Host is admitted with a valid credential, a foreign Origin is refused, and the flag, environment and settings precedence holds through the real CLI.
A link to a paired machine that is stopped, or that holds its connection open and says nothing, fails as not answering within seconds; the suite covers both.
Driven by hand in the Electron app against a remote Linux machine behind a hosting provider's HTTPS proxy: pairing by domain name, the machine Online over
wss, the device recorded as encrypted only when the proxy is trusted, changing the address between a direct port and the HTTPS name without pairing again, and a chat that read a file and ran a command on the machine.Known gaps
🤖 Generated with Claude Code