Skip to content

feat: require sign-in, add fault pages, and show server settings in setup - #182

Merged
sanchitrk merged 6 commits into
canaryfrom
claude/dev-services-setup-eb17c5
Nov 27, 2026
Merged

sanchitrk merged 6 commits into
canaryfrom
claude/dev-services-setup-eb17c5

Conversation

@sanchitrk

@sanchitrk sanchitrk commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

The app now always signs in, has proper Not Found and crash pages, and its Setup page shows and edits how the local server starts. The CLI gives a machine its id when its server starts, and Relay starts from .env.local for local development.

Web

  • Setup, Start the Server: the step shows the command it runs on one line (cut off with "…", copied in full, secrets read from the shell) and an Advanced section with the Providers runtime settings: executable, home directory, launch arguments and environment, saved the same way. Once the server runs, the step reopens from its summary and offers Restart Server, since changes apply on restart.
  • Sign-in required: a build without CLERK_PUBLISHABLE_KEY stops with a message instead of starting an app that hides every account feature. The desktop job in publish.yml reads it from a repository variable, which is now set.
  • Fault pages: Not Found and crash pages in the app's style, with Try Again, Go Home or Reload, and the trace behind Show Details.
  • Collapse: settles when no transition end arrives (a hidden window), and keeps its column to its parent's width so long content truncates.

CLI

  • codework serve writes machine.json with the id and identity key before it listens, so This Machine no longer shows "Not Assigned". A generated id no workspace has seen can still be reclaimed with codework connect --machine-id.

Relay

  • pnpm start loads the repo root's .env.local and falls back to the compose Postgres. The development doc and AGENTS.md start Relay first.

Testing

  • New apps/server/test/launch.test.ts: a real app server and CLI start, restart and stop a server with a custom executable, home, arguments and two variables (one sensitive), then reset to defaults. Passed twice with the same artifact, no servers left running.
  • vp test --project server in apps/server: 16 files passed (51 tests, 1 existing skip).
  • vp test test/door.test.ts in packages/codework: passed.
  • vp run verify, vp check over apps/web/src and apps/server/test, and the web and server typechecks: passed.
  • Real Electron app with the dev servers: set a custom executable, home, port and variables from Setup, started, restarted on a new port and reset, all from the page; checked dark mode and the fault pages.
  • Not re-run here: the Relay E2E case added for machine-id reclaim (needs Docker and a Clerk test user).

Opus 5.5 in Claude Code.

🤖 Generated with Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

sanchitrk and others added 6 commits November 27, 2026 07:01
Replace the router's bare defaults with pages in the app's own style: the
pixel terminal mascot shows 404 for an unknown address, and a crossed-out
prompt when something throws. A page error stays inside the frame with
Try Again and Go Home; an error in the root layout, or above the router,
takes the whole window with Reload. Both keep the trace behind Show
Details, with library frames folded and a copy button for bug reports.

The terminal sprite moves to components/pixel.ts so the sidebar's empty
state and these pages share it, and the settings wrapper now fills its
viewport so a full-height page centers there too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A build without CLERK_PUBLISHABLE_KEY used to start an app that quietly
hid every account feature: the workspace menu, Sign Out, the Relay
status, the setup check and the workspace settings. That confused both
developers and users, so the key is now required.

Vite stops the dev server and the build with a message naming the
variable and where to put it, and the app throws to the crash page if a
build gets past that. isSignedInApp and all its branches are gone; the
app always wraps itself in sign-in. The plain-browser mode goes with it,
since the UI has no app server outside Electron.

The desktop job in publish.yml reads the key from a repo variable, which
has to be added before canary builds pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`pnpm start` now loads the repo root's .env.local with Node's own parser,
as the tests already do, so quoted values work and no secret has to be
exported by hand. Without DATABASE_URL the Node entry uses compose.yaml's
Postgres. Running Relay locally is `pnpm db` then `pnpm start`.

The app now signs everyone in and asks Relay for workspaces, so Relay is
the first dev server to start: the development doc and AGENTS.md say so,
with CODEWORK_RELAY_URL for the RPC server and the desktop app. Relay's
README also notes how to start over when a migration edited in place
leaves a local database behind.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This Machine showed "Not Assigned" until something first wrote
machine.json: a Relay link, a pairing check or a label rename. The local
machine is already part of its server, so `codework serve` now creates
the file, with the id and identity key, before it listens. A file it
can't read or write is logged, not fatal.

`codework connect --machine-id` lets a rebuilt machine take its old id
back, and the server now generates one first. A generated id that no
workspace has seen can therefore still be replaced; once the home links,
the id is fixed as before.

The Machines page's fallback copy and the relay doc say when the id is
made. A new relay E2E case covers serve-then-reclaim, and the door test
records the generated id.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Setup's Start the Server step now shows the command it runs, on one line
with the full command copied, and an Advanced section with the Providers
runtime settings: executable, home directory, launch arguments and
environment, saved the same way. Once the server runs, the step reopens
from its summary and offers Restart Server, since changes apply on restart.

Collapse now settles when no transition end arrives and keeps its column
to its parent's width, so long content truncates instead of overflowing.

A new launch E2E starts, restarts and stops a server through the app
server with a custom executable, home, arguments and variables.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sanchitrk
sanchitrk merged commit b17fe56 into canary Nov 27, 2026
2 checks passed
@sanchitrk
sanchitrk deleted the claude/dev-services-setup-eb17c5 branch November 27, 2026 07:00
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