Skip to content

Restore missing machine actions to /settings/machines with compact card design#1619

Draft
pulzzejaehoon wants to merge 6 commits into
mainfrom
goal/e5b7fdbf
Draft

Restore missing machine actions to /settings/machines with compact card design#1619
pulzzejaehoon wants to merge 6 commits into
mainfrom
goal/e5b7fdbf

Conversation

@pulzzejaehoon

Copy link
Copy Markdown
Contributor

Integration PR for this goal — its tasks commit onto this branch (one PR per goal). Opened automatically by the engine on first push; left as a draft until the goal completes.

pulzzejaehoon and others added 6 commits June 30, 2026 07:43
…reason, working state

- Augment GET /api/v1/me/machines to include `working` boolean (active EngineRun
  or activeSessionId check, matching the fleet endpoint logic)
- Rewrite machines-content.tsx with a compact 2-line card design:
  - Inline status dot (pulsing green when online)
  - Machine name links to detail page; Working badge when executing a run
  - Bot/GitBranch auth badges (green when authed, gray when not)
  - Amber blocking-reason strip when blockedReason is set
  - Inline Remove button → confirm strip → DELETE /api/v1/me/machines/{id}
  - DockerPendingCard shown while new Docker agent is connecting
  - 60s polling + 10s during pending-card state
- Update test suite: mock DockerPendingCard, expand fixture to new fields,
  add Remove/confirm/cancel/delete tests (11 tests total, all passing)
Add shellTunnelConnectedAt to MACHINE_SELECT so the list rows know whether
each machine's container shell tunnel is up. The field flows through the GET
response map (`...m` spread) and is typed on MachineListItem, readying the
upcoming "Open Terminal" row action to gate on reachability — mirroring the
legacy MachineCard's `hasShell = Boolean(machine.shellTunnelConnectedAt)`.

Additive, no behavior change. No PM-agent config update needed (no new tool
or domain entity).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a GET test where engineRun.findMany returns an active run, exercising
the engineRun id map/filter (route.ts:92-93) and the activeRunMachineIds.has
branch of the `working` flag. These were the two changed lines uncovered by
the existing suite, dropping patch coverage to 60% (3/5). Now 5/5 covered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a per-row overflow menu to MachineRow on /settings/machines with two
actions dropped relative to the legacy MachineCard, keeping the row compact:

- Rename: inline name input that PATCHes /api/v1/me/machines/:id with { name }
  (server maps to customName via renameSchema) and optimistically updates the
  row's displayName on success.
- Open Terminal: opens <MachineTerminal mode="shell"> against the account-scoped
  daemon relay, gated on shellTunnelConnectedAt — enabled when the tunnel is up,
  otherwise a disabled 'Terminal starting…' affordance (mirrors canOpenTerminal).

Preserves the existing Remove confirm flow and the name Details link. Covers
rename success/failure and terminal open/gated/close states in tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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