feat(desktop): show GitHub star pill on the new workspace screen
Merged
AV
3mo ago+66+66+01234567890123456789-26-26-01234567890123456789
Summary
- Show the existing
GitHubStarPillon the new full-screen "new workspace" screen (thenew-workspace-screenPostHog-flagged variant), under the "What should we build next?" heading.
Why / Context
The new workspace screen is one of the highest-traffic surfaces in the app but had no star nudge, unlike the empty paneless views (EmptyTabView, WorkspaceEmptyState).
How It Works
GitHubStarPillalready encapsulates the "only show if not starred" behavior viauseGithubStarAction()— it hides itself oncestate === "starred", so no new star-check logic was needed. It's rendered here the same way it is on the two existing empty-state screens.- Added an optional
surfaceprop toGitHubStarPill(default"empty_state", preserving existing behavior for the two current callers) so thestar_nag_shown/star_nag_starred/star_nag_opened_webanalytics events can distinguish this new placement ("new_workspace") from the original ones.
Manual QA Checklist
- App launches without errors (dev mode)
- No console errors during Electron main/renderer build
- Pill hides automatically once starred (existing
GitHubStarPillbehavior, unchanged)
Testing
npx tsc --noEmit -p apps/desktop/tsconfig.json— no new errors introduced by either changed file (pre-existing unrelated errors come from a missing generatedrouteTree.genin this worktree)- Manual: ran
bun run dev:desktopend-to-end; API + Electron renderer + local DB all started cleanly with the new import/component in place
Summary by cubic
Shows the GitHub star pill on the PostHog‑flagged new workspace screen and keeps layout and focus stable when it hides. Differentiates analytics by surface and fixes missed “shown” impressions when the surface changes.
- Adds optional
surfaceprop (default "empty_state") toGitHubStarPill; tracksstar_nag_shown,star_nag_starred, andstar_nag_opened_webwith this surface; resets the shown‑impression guard per surface and after starring. - Adds optional
reserveSpaceprop (default false) to keep the pill’s wrapper mounted and fade opacity; disables interaction and focus when hidden (pointer-events: none,aria-hidden,inert), preventing re-centering and focus traps; holds space during loading. - Renders
GitHubStarPillonNewWorkspaceScreenwithsurface="new_workspace"andreserveSpace; pill still auto‑hides after starring.
Summary by CodeRabbit
- New Features
- Added a GitHub star prompt to the new workspace screen.
- Improved tracking for GitHub star prompt impressions and clicks across different app surfaces.
- Preserved layout space while the prompt loads or reflects a starred state.