fix(desktop): keep Create controls on empty Projects view - #5205
Open
vcolombo wants to merge 2 commits into
Open
fix(desktop): keep Create controls on empty Projects view#5205vcolombo wants to merge 2 commits into
vcolombo 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>
Author
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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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