Repository navigation
feat(desktop): let users dismiss the new-workspace sample prompts - #6540
Conversation
The suggestion cards target cold-start users but rendered for everyone on every empty composer, forever. A hover-reveal close button on both layouts (cards tray + rows) persists a samplePromptsDismissed flag in the existing v2-workspace-create-defaults store; the rotating ghost text remains as the suggestion surface. Dismissal is tracked so the prompt-cards experiment can account for lost exposure.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 5 remain after this review. 📝 WalkthroughWalkthroughChangesSample prompt cards and rows now expose accessible dismiss controls. Sample prompt dismissal
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change lets users permanently dismiss new-workspace sample prompts while preserving the composer and ghost-text experience; no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant PromptLayout
participant NewWorkspaceScreen
participant WorkspaceCreateDefaultsStore
PromptLayout->>NewWorkspaceScreen: invoke onDismiss
NewWorkspaceScreen->>WorkspaceCreateDefaultsStore: setSamplePromptsDismissed(true)
WorkspaceCreateDefaultsStore-->>NewWorkspaceScreen: persist dismissal state
NewWorkspaceScreen->>PromptLayout: stop rendering prompts
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
…6556) Reworks the new-workspace sample prompts so the prompt-cards experiment measures form factor and nothing else, and adds a third arm to test whether four cards cost more than they earn. The experiment (PostHog 419092) never launched — still draft, flag inactive, and all 639 flag evaluations since desktop-v1.22.0 returned null, so nobody was ever bucketed. That left the shipped code free to drift from the pre-registered design: control grew from three fixed rows to four shuffled ones, the test arm from two bordered cards to four borderless ones, and only the cards arm applied the setup-first rule — so the arms differed in content, not just form factor. Validating the premises first: the setup prompt takes 69.5% of clicks (not 75%) but always renders first, so share and position are confounded. Setup clickers create ~3x more workspaces on medians with only 12.7% predating the click, but the cold-start cell is n=17 and the least-clicked prompt shows the highest count — a selection signature. Eligible population is ~840 new accounts/week at a stable 13.5-14.1% click rate, so activation cannot resolve a realistic form-factor effect in under ~10 weeks while click rate resolves a large one in ~2-3 weeks across three arms. Click rate becomes primary. Arms are control (3 rows) / cards2 / cards4, sliced as nested prefixes of one fixed pool. Selection moved into a shared hook so the setup-first rule and its pending gate apply identically everywhere — previously cards held for the setup query while rows rendered immediately, a timing difference the experiment would have read as a layout effect. Prompts also split into two tiers keyed on whether the user has a non-main workspace, the same signal that gates the dismiss affordance: first-run keeps orientation, returning swaps it for work that assumes they have seen an agent run, led by a new explain-superset prompt. The tier rides on the click event so the mediator can be split rather than pooled. Kept from #6537/#6540: the expanded pool, per-card icons, the agent logo cluster, and the labeled model/effort pills. The card border is restored, since prominence is the manipulation under test. The shuffle is dropped, and dismissal is gated behind the first real workspace — it permanently removes the surface being measured, and asymmetric dismissal would bias the primary metric toward null. Not launchable until a desktop build carrying this ships and the flag's created_at cutoff is bumped to that build's publish time; old builds map the new variant keys to control.
Summary
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.opacity-0until container hover (or keyboard focus), so it adds no visual noise.Manual QA Checklist
Verified live via CDP against the dev desktop:
samplePromptsDismissed: truelands in the persisted storelocation.reload()Testing
bun run typecheckbiome checkon touched filesbun test src/renderer/lib/persisted-keysKnown Limitations
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
samplePromptsDismissedinv2-workspace-create-defaults(default false; shallow-merged for existing profiles). No migration.onDismissthroughSamplePromptCardsandSamplePrompts; show the close button on hover/focus only.new_workspace_sample_prompts_dismissedwith the active layout to account for lost exposure.Written for commit 5086ed2. Summary will update on new commits.
Summary by CodeRabbit