fix(desktop): drop setup-script prompt from new-workspace modal on dismiss
Closed
PR
3mo ago+154+154+012345678901234567890123456789-5-5-0123456789
Description
Configure on the "Setup scripts" card seeds a setup-script prompt into the new-workspace draft. The draft was only cleared on a successful create, so dismissing the modal left the prompt behind, and the next New Workspace open showed it. The seed is now flagged ephemeral and dropped on dismiss. Prompts you type yourself still persist across reopen.
Related Issues
closes #5372
Type of Change
- Bug fix
Testing
- Added unit tests for the draft store seed flag lifecycle (7 tests).
bun test,bun run typecheck, andbiome checkpass.- Verified at unit level. Not yet clicked through the running Electron app.
Video
Summary by cubic
Fixed a bug where the setup-script prompt from the “Setup scripts” card stuck around after closing the New Workspace modal. Seeded prompts are now ephemeral and dropped on any modal close; user-typed prompts and other draft fields persist.
- Bug Fixes
- Seeding uses
seedSetupPrompt+promptSeededFromSetupCard;closeModalclears only an unedited seed across all close paths, dropping just the prompt and keeping other fields. - Guarded
updateDraftto clear the seed flag only when the prompt actually changes; same-value writes keep it. - Added store tests for close-path cleanup, seed-flag lifecycle, persistence of other fields, and the same-value regression.
- Seeding uses
Summary by CodeRabbit
-
New Features
- Workspace drafts seeded from the setup card now track whether the prompt is auto-filled or user-edited.
- Added support for seeding the draft prompt from the setup card as a dedicated draft action.
-
Bug Fixes
- Closing the new workspace modal now clears only an untouched, setup-seeded prompt.
- User-edited prompts are preserved, and manually entered prompts remain unchanged.