refactor(sessions): unify workspace shell under sessions table #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/workspace-shell-unification"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per spec at
docs/superpowers/specs/2026-05-24-workspace-shell-unification.md.Summary
sessions.kindcolumn ('session' | 'workspace_shell', migration0006_workspace_shell_session). The workspace shell now occupies a realsessionsrow instead of being state-probed from/proc.POST/DELETE /api/workers/:id/sessions/workspace; the previousworkspace-sessionendpoint is gone.createSessionreserves the nameworkspace; the generic POST rejects it with a clear "reserved" error.checkSessionHealthdispatches onkind: regular sessions match the full--remote-control "<workspace> · <name>"argv; the workspace shell matches bycwd=/workspace(its argument is just<label>, a substring of every regular session's).WorkerHealthDTO.workspaceShellRunningremoved — UI now derives the toggle state from the workspace_shell row's presence vialistSessions.ExplorerScopeis now{ kind: 'workspace' | 'session', ... } | nullinstead of a three-state union, and lives on the workspace card click (workspace scope) or session row click (session scope).UI shape
The spec proposed showing the workspace shell as a pinned row in the sessions list. Reverted at user's request — the workspace card keeps its original
start agent/stop agenttoggle plus atermbutton that opens a terminal on the boot pane whether claude is running there or not (the workspace terminal endpoint is preserved for that reason).Reviewed edge cases
alreadyOpen=trueinstead of surfacing the raw SQLite UNIQUE error.workspacewindow still filtered from the orphan-warning list; aworkspace_shellrow whose pane the operator kills externally is reaped after 2 strikes.Test plan
pnpm typecheckclean;pnpm test330 pass / 65 skip (SQLite-bound tests skip on the Windows host per AGENTS.md; runs in CI image).🤖 Generated with Claude Code