Skip to content

fix(desktop): show running CLI version, check for updates, and squash relay init migration - #194

Merged
sanchitrk merged 1 commit into
canaryfrom
fix/cli-version-update-and-relay-migration
Dec 3, 2026
Merged

sanchitrk merged 1 commit into
canaryfrom
fix/cli-version-update-and-relay-migration

Conversation

@sanchitrk

@sanchitrk sanchitrk commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Distinguishes the running CodeWork server's version from the installed CLI binary in Setup and Settings → Machines, adds non-blocking CLI update detection with a one-click Update Now action that restarts an already-running server, and squashes Relay's pre-release database migrations into a single initial migration.

App Server & Contract

  • Added latestCliVersion to LocalServerStatus in apps/contract/src/contract.ts.
  • Added cached, non-blocking release version lookup (Cli.latestVersion) in apps/server/src/cli.ts and apps/server/src/health.ts (HEAD .../releases/latest redirect on latest, releases/tags/devel on dev/canary; 1h TTL, 5m retry when unreachable; overridable via CODEWORK_RELEASE_URL).
  • Updated Cli.install to restart the local server automatically when one is already running instead of leaving the previous process alive.

Desktop UI

  • Added shared versionOf helper in apps/web/src/settings/machines/service.tsx (semver-aware update check, prefers running server version over installed CLI version) and updated stateOf / whereOf so a running server always reports Running even if no default CLI binary is installed.
  • Made Setup Step 1 (Install the CodeWork CLI) reopenable, added a muted warning triangle indicator when a newer CLI release is available, and wired Update Now (with live running version shown in Step 2 as Running · v<version> and mismatch warning when installed and running versions differ).
  • Updated Settings → Machines (This Machine row and detail page) to show the running server version, surface mismatches with the installed CLI, and offer Update Now when an update is available.

Relay

  • Folded 2026113001_workspace_slug (slug column and workspace_account_slug unique constraint) into 2026112901_init in infra/relay/src/migrations.ts so fresh deployments start from a single initial migration.

Testing

  • vp run verify (all package builds, vp check, package typechecks, knip): passed.
  • vp check on all 7 modified apps/ files and typecheck on @codeworksh/contract, @codeworksh/server, and @codeworksh/web: passed.
  • infra/relay: vp check, typecheck, and pnpm test (2 test files, 10/10 tests): passed.
  • apps/server: vp test test/health.test.ts test/launch.test.ts (2 test files, 4/4 tests): passed.
  • Live Electron verification via CDP (agent-browser --cdp 9222): verified v0.8.0 installed with the warning triangle + Running · v0.10.0, clicked Update Now, and confirmed ~/.codework/bin/codework upgraded to v0.10.0, the server restarted automatically, and the warning cleared.

Built with Gemini (Antigravity).


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

@sanchitrk
sanchitrk merged commit 5f29cde into canary Dec 3, 2026
3 checks passed
@sanchitrk
sanchitrk deleted the fix/cli-version-update-and-relay-migration branch December 3, 2026 18:50
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