🤖 feat: add init + delete in-flight feedback in sidebar#2199
Open
ethanndickson wants to merge 15 commits intomainfrom
Open
🤖 feat: add init + delete in-flight feedback in sidebar#2199ethanndickson wants to merge 15 commits intomainfrom
ethanndickson wants to merge 15 commits intomainfrom
Conversation
P0 hardening for init cancellation: - RemoteRuntime: pass explicit SIGTERM to SSH2 kill() (required for remote signal) - RemoteRuntime: clean up abort listener when process exits - DisposableProcess: treat pid <= 0 like missing pid (SSH2 shims use pid=0) - WorkspaceListItem: add type=button and stopKeyboardPropagation to action buttons - Integration test: increase timeouts, stop collector before removal, add stronger assertions
Remove dead metadata.status === "creating" fallbacks and rely on FrontendWorkspaceMetadata.isInitializing instead. Also remove the unused WorkspaceMetadata.status field from the schema and update UI/tests that referenced it. --- _Generated with `mux` • Model: `openai:gpt-5.2` • Thinking: `medium` • Cost: `$40.91`_ <!-- mux-attribution: model=openai:gpt-5.2 thinking=medium costs=40.91 -->
- Make cancel-creation affordance match other delete/archive buttons (hover-only trash icon) and keep row hover styles during initialization. - Optimistically drop workspace metadata on remove so cancelled workspaces disappear immediately. - Add CoderService.deleteWorkspaceEventually to retry `coder delete` across transitional states and avoid not_found races during cancel-init. - Update Coder runtime + unit tests accordingly. --- _Generated with `mux` • Model: `openai:gpt-5.2` • Thinking: `medium` • Cost: `$45.88`_ <!-- mux-attribution: model=openai:gpt-5.2 thinking=medium costs=45.88 -->
- enrichFrontendMetadata now populates status: "creating" when isInitializing is true, so the frontend's isCreating check works - Add missing on/getInitState mocks to all test harnesses that construct WorkspaceService (constructor now subscribes to init-end)
Archive should abort init and still archive; update unit tests + lint.
…eoutMs When canceling a Coder workspace that was never actually created server-side, the 'deleting…' state previously persisted for the full 60s timeout. The root cause: waitForExistence=true treats initial not_found as inconclusive and keeps polling until timeout. Add a new waitForExistenceTimeoutMs option (set to 10s at the cancel-creation callsite). If only not_found responses are seen within this shorter window—without ever observing the workspace exist—treat it as success and return early. The overall 60s timeout still applies when the workspace has been observed on the server. This trades a small risk of leaking a late-appearing workspace for much faster cancel UX (~10s vs ~60s).
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves workspace lifecycle UX and safety in the left sidebar: initialization and removal states are now visible, cancellation semantics are tightened, and Coder workspace deletion is hardened.
Background
Several workspace lifecycle gaps affected UX and safety:
allowNonMuxPrefixescape hatch weakened the safety guard against deleting non-mux Coder workspacesstatus: "creating"field duplicated theisInitializingsignalImplementation
Sidebar lifecycle feedback
WorkspaceListItemshows "starting…" / "deleting…" / "archiving…" states with muted stylingCoder deletion safety
allowNonMuxPrefixentirely — themux-prefix guard is now absolute with no bypassmux-${branch}(set inCoderSSHRuntime.finalizeConfig())Cancel-creation fast path (
waitForExistenceTimeoutMs)waitForExistenceTimeoutMsoption ondeleteWorkspaceEventually()Cleanup
WorkspaceMetadata.status: "creating"field;isInitializingis the single canonical signalgetWorkspaceSidebarKey()to use onlyisInitializingValidation
make static-checkpasses (typecheck, lint, fmt, docs links)bun test src/node/services/coderService.test.ts— 68 tests pass (includes newwaitForExistenceTimeoutMsshort-circuit test)bun test src/node/runtime/CoderSSHRuntime.test.ts— 32 tests passRisks
Low. The
waitForExistenceTimeoutMstrades a small risk of orphaning a late-appearing Coder workspace for faster cancel UX. The 10s window is generous for detecting server-side creates that complete after CLI abort.Generated with
mux• Model:anthropic:claude-opus-4-6• Thinking:xhigh• Cost:$173.31