Skip to content

Show the caller's development workspaces in a My workspaces drawer - #49

Open
reoring wants to merge 2 commits into
mainfrom
work/20261121/my-workspaces
Open

reoring wants to merge 2 commits into
mainfrom
work/20261121/my-workspaces

Conversation

@reoring

@reoring reoring commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Why

A developer cannot see from Builder Console which of their development workspaces are still running, sleeping, or holding source data. #7164 and #7290 in appthrust/platform added the Platform API contract for this: owner=me, summary, lease, runtime, retired, allowedActions and extend-lease.

Design: Nexus features/devworkspace/builder-console.md and decisions.md.

What

  • Header entry: a laptop icon whose badge counts running workspaces. It is hidden for callers who cannot create apps and own no workspaces.
  • Drawer (GET …/dev-workspaces?owner=me): Running / Sleeping / Stopped · Retired · Failed. Unknown states fall into the last group.
    • Each row shows its target, state and one line of lease or retention.
    • The header line shows retained and idle counts; 片づける pre-checks idle rows.
  • Actions come only from allowedActions:
    • 開く / 再開する; start or restart both call the restart route, because Platform has no start route.
    • 延長する: owner only, POST …/extend-lease.
    • 停止する: asks first.
    • 削除する: uses the Dashboard's warning, marks rows never pushed, and sends one Idempotency-Key per row.
    • Retired rows offer only 削除する.
  • Lease hint in the build, console-build and improve headers: 「あと N 分で休止」, amber from 5 minutes before expiry. The owner can click it to extend.
  • Unknown state, scope and volume-state values degrade to "unknown". A server without state gets one derived from phase.
  • Japanese copy with English siblings. Mock platform: six workspaces (Running 2, Sleeping 2, Stopped 1, Retired 1), with extend-lease, stop and delete, and restart answers 409 for Retired.
  • Phone-only header tweak: + 新しいアプリ is smaller and the 「所属:」 label is visually hidden (still read by screen readers), so the new icon fits.

No Go change: the server already proxies /api/v1/projects/{pj}/dev-workspaces* to Platform.

Dependency

@appthrust/api-schema@0.1.8 is published (tag npm/v0.1.8 on appthrust/platform b19ece4003, publish run 44866846368). web/bun.lock pins it (cfd3aae).

Verification (local, against the published 0.1.8)

  • bun run typecheck, bun run typecheck:e2e, bun run check:response-boundaries (0 violations), bun run check:console-schema: pass.
  • bun install --frozen-lockfile: ok.
  • bun run test: 2257 pass, 0 fail.
  • bun run test:e2e:mock, full suite: 87 passed (run against the locally built 0.1.8-equivalent before publication; the published package is the same source).
  • Root go build ./... && go test ./...: ok.

Not yet shown:

  • Resuming a Sleeping workspace end to end: the mock's only Resume link goes to a draft that does not exist.
  • The appthrust.ink readback: releaseAt should equal the Dashboard Workspaces tab, after a console release.

- Header entry (running count) opens a drawer grouped into Running, Sleeping and Stopped/Retired/Failed, from GET dev-workspaces?owner=me
- Row actions come only from allowedActions: open/resume, extend lease, stop, delete (Dashboard warning, per-row Idempotency-Key); start or restart both call the restart route
- Build and improve headers show the remaining lease, amber from five minutes before expiry; the owner can extend it
- Requires @appthrust/api-schema 0.1.8 (platform #7290 + #7296); bun.lock is refreshed after that version is published
0.1.8 (npm/v0.1.8, platform b19ece4003) carries the DevWorkspace owner filter, summary, lease, runtime and extend-lease contract.
@reoring
reoring marked this pull request as ready for review November 21, 2026 04:39
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