feat(desktop): add prompt-cards arm to the new-workspace screen
Test arm for experiment 419092: replaces the three low-contrast sample-prompt rows on the new-workspace screen with two bordered cards above the composer.
Why
Of 837 new accounts that reached this screen between 5 and 13 August, 430 (51.4%) created a real workspace and 272 added a repo and never started work. Only 11% ever click a suggested prompt, and 75% of the clicks that do happen land on "Set up this project for Superset" — so that card leads, gated on the project having no setup/teardown/run commands (the same config.shouldShowSetupCard query the v2 sidebar card uses).
Scope
- Control renders exactly as it does today. No behavior change for anyone not in the experiment.
- Eligibility is a
created_atrelease condition on the flag, not code, so existing accounts getfalse, keep the rows, and record no exposure. - The variant hook reads the flag imperatively on screen open, so
$feature_flag_calledmatches the population that sees the surface rather than everyone who launches the app. new-workspace-prompt-cards-overrideforces the cards for team accounts without evaluating the experiment flag, so previewing emits no exposure.- Prompt text is byte-identical across arms; presentation and one line of card body copy are the only differences.
Measurement
Primary is activation (workspace_created where type != main). Secondaries are the prompt click rate as the mediator (tagged layout: cards | rows), real workspaces per user, and two guardrails — "came back and worked again" and day-2 app reopen — so a creation lift that comes from nagging doesn't read as a win.
Do not launch before this ships
Old builds never evaluate the flag, so starting the experiment before a desktop release carrying this code would enroll a pure-control population. At launch, bump the flag's created_at cutoff to the actual publish time.
Checks
lint:fix, typecheck (37/37) and sherif pass. bun test reports 154 pre-existing failures locally (real-git integration tests and a missing electronTRPC global) — identical counts on a clean tree, so zero delta from this change.
Registry entry: Experiment Log
Summary by cubic
Adds the prompt-cards experiment arm to the new-workspace screen to test whether more prominent suggestions lift activation. Old behavior: three inline sample-prompt rows; new behavior: two bordered cards above the composer when new-workspace-prompt-cards is "test"; control unchanged.
useNewWorkspacePromptCardsVariantevaluates on screen open, returns null until flags load to avoid flashing, and readsnew-workspace-prompt-cards-overridebefore the experiment flag so overridden accounts do not record exposure; falls back to control after 2s if flags don’t load.SamplePromptCardsshows two cards; the “Set up this project for Superset” card appears only whenconfig.shouldShowSetupCardis true for the project. Prompt text is identical across arms; cards add icons and a short description.- Analytics: prompt clicks include
layout: cards | rows. Exposure matches users who open the screen. - Eligibility/rollout: use a flag-side
created_atcutoff (not code). Existing accounts stay on rows with no exposure. Do not start the experiment until a desktop release with this code; at launch, set the flag’screated_atto the publish time. - Adds
NEW_WORKSPACE_PROMPT_CARDSandNEW_WORKSPACE_PROMPT_CARDS_OVERRIDEin packages/shared constants.
Summary by CodeRabbit
- New Features
- Added selectable prompt cards when creating a new workspace.
- Prompt cards can display setup suggestions based on the current workspace context.
- Added descriptions and improved labels for sample prompts.
- The prompt-card experience is introduced selectively and falls back to the standard prompt list when unavailable.
- Analytics
- Sample-prompt selections now record the card layout used.