Repository navigation
Conversation
The relay is the cloud API for accounts, workspaces and machines. This first slice verifies Clerk session tokens and serves GET /v1/me, which creates the account and its default workspace on first sight, exactly once even under concurrent first calls. Postgres runs locally from compose.yaml; the E2E suite boots the real relay against it with a real Clerk test user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds @codeworksh/schema, a private package bundled into its consumers, holding the relay API and Ed25519 request signing shared by the relay and the CLI. The relay gains machine links, pairings and replay-guarded assertions: machines pair with a key they generate, a workspace member approves the code, and later requests are signed with that per-workspace key. Heartbeats keep a 90-second online lease; a machine can revoke its own link. The CLI gains `codework connect` and `codework disconnect`, keeps its identity and links in <home>/machine.json, and `codework serve` sends heartbeats for every connected workspace without ever blocking local work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The desktop app now requires a signed-in account. Clerk's Electron bridge registers the renderer scheme (now codeworkdev://app for unpackaged runs), keeps the session encrypted under the app's data folder, and the renderer gates the app behind Clerk's sign-in. When Clerk is unreachable the app still opens, so local work never waits on the cloud. Once signed in, the sidebar shows the account's workspaces from the relay and remembers the one picked. The relay allows CORS from the desktop origins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CodeWork RPC gains machine.info, machine.rename and a streaming machine.connect, whose shapes live in @codeworksh/schema and are shared by the codework contract, the widget mirror and the app contract. From the workspace menu the desktop connects this machine (it shows the code and approves it as the signed-in member) or approves a code another machine printed with `codework connect`. Settings > Machines lists the workspace's machines with their online status from the relay, and names this machine; a rename reaches the relay with an immediate heartbeat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When no codework is found, Settings > Providers offers Install CodeWork. The app server runs the same script as `curl -fsSL https://codework.sh/install | sh` into the install folder, without touching the shell's startup file, then starts the local server. Development and canary builds install the newest development build. CODEWORK_INSTALL_SCRIPT points it at another script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clicking Sign up sent the window to Clerk's hosted Account Portal, which cannot return to an Electron window. Sign-in and sign-up now render in the app on their own paths, and Clerk navigates between them and their steps through the app's handlers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
POST /v1/workspaces creates a workspace the signed-in person owns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- /workspaces/join: a full-window page to name and create a workspace; the app switches to it. - The workspace menu holds Settings, Invite & Manage Members (disabled until invites), Switch Workspace and Sign Out; it stays as CodeWork while the relay is unreachable. The sidebar's Settings link is gone. - Connect This Machine and Approve a Machine move to Settings > Machines. - Menu rows highlight at once and fade out over 150ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clerk is briefly not loaded while it signs out, after the splash is gone; the sign-in backdrop holds the window, and signing out goes straight to the sign-in page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Settings groups pages under Personal, Application and Workspace; Personal > Profile, at /workspaces/<id>/settings/account/profile, edits the picture and name. - Light theme follows Linear's palette; primary actions use the indigo accent. - Primitives follow Linear: settings page and cards, 28px inputs (44px large), 32px pill and 28px compact buttons, 32px menu rows with a soft shadow, sidebar rows and headings, the main panel. - Lilex is the mono font (ligatures only in code blocks); Inter uses optical sizes; descriptions use a 450 weight. - dark: styles follow the app theme, not the system's. - Fix: opening Create a Workspace no longer crashes or bounces home while its page loads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GET /v1/workspaces/:id/pairings lists connects started for the workspace, with their codes. - POST /v1/pairings/decline expires a pending code. - POST /v1/workspaces/:id/machines/:machineId/remove revokes a machine; its owner or a workspace owner or admin may. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Settings > Machines moves to /workspaces/<id>/settings/machines under Administration: machines waiting to join with Approve, Decline and Approve All; Enter a Code Instead; the machine list with Disconnect for this machine and Remove for others; placeholders while loading. - machine.disconnect leaves a workspace from the app. - The account retries while the relay is unreachable instead of staying failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- relay: declining a connect sets a declined status (new migration), so the CLI says it was declined instead of expired; approve and decline accept a code in any case, with or without its dash - cli: connect explains an unreachable relay instead of a transport error; the server sends a heartbeat right after a connect so the machine shows online at once - desktop: setup opens once per sign-in, not once per launch; Machines re-reads this machine's links while they disagree with the relay; relay failures read as "Can't reach CodeWork's servers"; pending rows and menus name the machine id; setup's connect command names the workspace and its copy uses one product name - relay E2E covers decline, a typed code and removing a machine Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atus slot Relay and machines: - a link goes live only when the machine's next poll, signed with the new key, takes it; approval just marks the pairing, sibling connects are superseded, and a connect that stops polling drops out of Waiting to Join after 20 s, so an abandoned code can never replace a working link - links record the relay they were made with; heartbeat and disconnect go there, and a refused link is removed only while it still holds the refused key - accounts are keyed on the auth subject alone; email is display only, so signing up again with a known email works - the relay answers 503 when its sign-in vendor is unreachable and 401 only for tokens the vendor refuses - workspace and machine ids are checked at the wire; connect names a bad or unknown workspace plainly - polls retry through transient failures; heartbeats run in parallel with a timeout and log refusals Desktop: - one status slot in the sidebar footer: Offline, Can't Reach CodeWork, Sign-In Unavailable or Signed Out, with Reconnect; it retries on its own - the account is remembered on the device, and the machine list keeps what CodeWork last said while it can't be reached - a row with this machine's id under a key it doesn't hold can be removed; disconnect falls back to removing it when the relay can't confirm - Approve All is gone; approved connects show Connecting…, replacements are marked - a shared Collapse clips only while it moves, so Enter a Code Instead opens without jitter or a cut-off focus ring E2E covers abandoned and competing connects, a second relay, re-signup, the sign-in vendor down, and bad workspace ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…visit - codework connect says how to start the server when none runs for the home, with --home when one was given - Setup's terminal commands carry --home when the server's home was chosen in Settings - the relay answers 503, not 500, when its sign-in vendor can't give a new person's profile on their first visit - the connect E2E normalises the temp home in its artifacts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page body had become max-w-27 (108px), squeezing every card into a strip. The header, loading skeleton and body now share one container token, so their widths cannot drift apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dark takes Linear's dark palette through the theme tokens: its border and text scale, indigo accent and primary buttons, full-strength focus rings, hairline field borders, lighter row selection and its status colours. Destructive buttons stay solid red in dark. Light is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A CLI that fails to run, or a server this app can't read, now replaces the step's line in the error colour, matching the step's other errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Milestone 1 of CodeWork's cloud identity: people sign in, belong to workspaces, and connect their machines to them through a new relay service.
Relay (
infra/relay,packages/schema)relay.codework.shwith Clerk sign-in. Accounts are keyed on the Clerk subject (email is display only); a new account gets a default workspace, and people can create more.@effect/sql-pg, code-first migrations. Runs on Node against the compose Postgres; the production deploy is a follow-up.CLI (
packages/codework)codework connect [--workspace <id>] [--machine-id <id>]andcodework disconnect. Links record the relay they were made with, and heartbeat/disconnect go there. Polls retry through transient failures; heartbeats run in parallel with a timeout.connectnames a bad or unknown workspace, an unreachable relay, and how to start the server when none runs.machine.info,machine.rename,machine.connectandmachine.disconnecton the server RPC (disconnect reports whether the relay confirmed), mirrored in the widget and app contracts.Desktop (
apps/web,apps/desktop,apps/server)--workspaceand, for a home chosen in Settings,--home.Collapse.Testing
infra/relay/test, real relay on Docker Postgres + real CLI + a Clerk test user): sign-in and default workspace, re-signup with a known email, the sign-in vendor down, pair → heartbeat → disconnect, a forged heartbeat, decline, a code typed without its dash, remove, an abandoned connect approved late, two competing connects, a second relay, and bad workspace ids. Artifacts ininfra/relay/test/__artifacts__/.vp check,vp run typecheckandvp run knip:checkpass.Not in this PR
Production deploy of the relay and Clerk production instance, local listener auth, pairing hardening (fingerprints, rate limits, owner on replace), offline revocation retry, stale-lock recovery, invites and member management, and scoping machine data by workspace.
🤖 Generated with Claude Code