fix(desktop): keep Create controls on empty Projects view - #5205
fix(desktop): keep Create controls on empty Projects view#5205vcolombo wants to merge 2 commits into
Conversation
When a relay has zero projects, ProjectsView early-returned a bare EmptyState before the header, toolbar, and ProjectsCreateMenu mounted, so the first project could only be created from the CLI. Render the empty state inside the normal layout instead, and give it a 'Create your first project' CTA wired to the existing CreateProjectDialog. Ported from closed PR block#3620 onto current main. Fixes block#2585, fixes block#2622, fixes block#3470, fixes block#3504, fixes block#4009 Signed-off-by: Vincent Colombo <vcolombo@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes a chicken-and-egg UX bug in the desktop Projects view: when a relay had zero projects, the view previously short-circuited to an empty state before mounting the Projects header/toolbar and ProjectsCreateMenu, preventing creation of the first project from the UI. The change keeps the full Projects “chrome” mounted even for an empty list, adds a first-project CTA in the empty state, and adds Playwright smoke coverage for both creation entry points in a true zero-project state.
Changes:
- Remove the early-return empty state in
ProjectsViewand render the empty state within the standard layout so header/toolbar/create menu always mount. - Add an optional “Create your first project” CTA to the Projects empty state, wired to the existing create-project dialog open flow.
- Add a Playwright smoke spec that hides all seeded mock projects and verifies project creation can be initiated via both the toolbar create menu and the empty-state CTA.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| desktop/tests/e2e/projects-empty-create.spec.ts | New smoke spec ensuring Create controls work on a truly empty Projects view (both entry points). |
| desktop/src/features/projects/ui/ProjectsView.tsx | Stops early-returning on empty lists; renders EmptyState inside the normal layout and wires CTA to open the create dialog. |
| desktop/src/features/projects/ui/ProjectCards.tsx | Extends EmptyState to support an optional create-project CTA + adds testids for e2e targeting. |
| desktop/playwright.config.ts | Registers the new smoke spec in the smoke project testMatch list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| await page.keyboard.press("Escape"); | ||
| await expect(page.getByTestId("create-project-dialog")).not.toBeVisible(); |
There was a problem hiding this comment.
Done in 9d326a8 — switched to toBeHidden() to match the suite.
Match the rest of the Projects e2e suite, which asserts dismissal of create-project-dialog with toBeHidden() rather than not.toBeVisible(). Signed-off-by: Vincent Colombo <vcolombo@gmail.com>


Summary
When a relay has zero projects,
ProjectsViewearly-returned a bare<EmptyState />before the header, toolbar, andProjectsCreateMenu(+) mounted — so the first project could only be created from the CLI. Chicken-and-egg: the create button only appeared once a project already existed.EmptyStateinside the normal layout so the Projects chrome (header, filter toolbar,+create menu) always mounts.CreateProjectDialog.Ported from closed PR #3620 (closed in favor of tracking as issue #4009) onto current
main, adapted for the multi-repo changes from #4671 and the current create-menu item names.Fixes #2585, fixes #2622, fixes #3470, fixes #3504, fixes #4009
Testing
pnpm exec tsc --noEmit, biome clean on touched filespnpm exec playwright test --project=smoke tests/e2e/projects-empty-create.spec.ts— new spec greenproject-commit-detail,project-inbox,project-pr-review,project-issue-comments) passjust ci