feat(desktop): let users dismiss the new-workspace sample prompts
Merged
KI
3mo ago+72+72+01234567890123456789-26-26-01234567890123456789
Summary
- Adds a hover-reveal ✕ to the sample-prompt suggestions on the new-workspace screen (both experiment arms — cards tray and rows). Dismissing hides them permanently; the rotating ghost-text placeholder remains as the suggestion surface.
Why / Context
Follow-up to #6537. The template cards target cold-start users, but they render for every user on every empty composer, forever — Codex, by comparison, only shows its template cards until you have task history. Power users get a way to clear them; the analytics keep measuring whether veterans use them at all.
How It Works
samplePromptsDismissedboolean on the existingv2-workspace-create-defaultspersisted store (already allowlisted in the persisted-key registry; fixed-size singleton, zustand persist shallow-merges the new field tofalsefor existing profiles — no version bump).NewWorkspaceScreengates the suggestion block on the flag and passesonDismissto both layouts; dismissal firesnew_workspace_sample_prompts_dismissedwith the active layout so the cards-vs-rows experiment can account for lost exposure.- The ✕ is
opacity-0until container hover (or keyboard focus), so it adds no visual noise.
Manual QA Checklist
Verified live via CDP against the dev desktop:
- ✕ appears on hover at the tray's top-right, hidden otherwise
- Clicking it removes the suggestions; composer + ghost text unaffected
-
samplePromptsDismissed: truelands in the persisted store - Suggestions stay gone after
location.reload() - Persisted-key registry tests pass (no unregistered writer)
Testing
bun run typecheckbiome checkon touched filesbun test src/renderer/lib/persisted-keys
Known Limitations
- No un-dismiss UI yet — deliberate until the dismissal-rate data says whether anyone wants them back (a Settings → Behavior toggle is the natural home if so).
Summary by cubic
Let users dismiss sample prompt suggestions on the new-workspace screen. Previously they showed on every empty composer; now a hover-reveal X hides them permanently while the rotating ghost-text placeholder remains. The sample-card container is removed so cards float directly on the canvas.
Review notes
- Persist
samplePromptsDismissedinv2-workspace-create-defaults(default false; shallow-merged for existing profiles). No migration. - Gate suggestions on this flag in both layouts; pass
onDismissthroughSamplePromptCardsandSamplePrompts; show the close button on hover/focus only. - Track
new_workspace_sample_prompts_dismissedwith the active layout to account for lost exposure.
Summary by CodeRabbit
- New Features
- Added the ability to dismiss sample prompt suggestions when creating a workspace.
- Dismissal preferences are saved and persist across sessions.
- Added accessible dismiss controls that appear on hover or keyboard focus.
- Sample prompts now hide after dismissal and only appear when relevant.