🤖 feat: configurable Coder workspace action on archive (keep/stop/delete)#3052
🤖 feat: configurable Coder workspace action on archive (keep/stop/delete)#3052ibetitsmike wants to merge 6 commits intomainfrom
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c98bb8601b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@codex review Fixed the P1: simplified |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ 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". |
Summary
Replaces the boolean
stopCoderWorkspaceOnArchivesetting with a"keep" | "stop" | "delete"enum, giving users control over what happens to dedicated Coder workspaces when archiving a chat.Closes #3042
Background
Previously, archiving a chat could only stop or leave running the associated Coder workspace. Users want the option to delete the workspace entirely on archive, freeing up resources automatically.
Implementation
src/common/config/coderArchiveBehavior.ts): newCoderWorkspaceArchiveBehaviorunion type, values array, and default constant.coderWorkspaceArchiveBehaviorfield on disk schema + in-memory config. Normalization resolves new enum → legacy boolean fallback →"stop"default. Save writes a legacy boolean shim for downgrade safety ("keep"→false,"stop"/"delete"→ omit).createStopCoderOnArchiveHook→createCoderArchiveHookwith behavior dispatch:keepno-ops,stoppreserves existing behavior,deletecallscoderService.deleteWorkspace(). Unarchive only auto-starts forstop;keepanddeleteno-op (deleted workspace is safely handled via existingnot_foundguard).coderWorkspaceArchiveBehaviorenum.SelectPrimitivepattern.Risks
stoporkeepbehavior correctly.Generated with
mux• Model:anthropic:claude-opus-4-6• Thinking:xhigh• Cost:$8.68