[Bug] Projects screen has no create button when the relay has zero projects
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
**Describe the bug**
On a fresh relay with zero projects, the Projects screen renders only the empty-state placeholder ("No projects yet — Projects published to this relay will appear here") and never shows the toolbar row containing the create menu ("+" button). There is no way to create the first project from the UI — chicken-and-egg: the create button only appears once at least one project already exists.
Root cause: `desktop/src/features/projects/ui/ProjectsView.tsx` early-returns `` when `projects.length === 0` (around line 450 on `main`), before the render path that includes `projectsNavigation` / `ProjectsCreateMenu`. The `EmptyState` in `ProjectCards.tsx` has no create CTA of its own.
**To Reproduce:**
1. Run a fresh relay (empty database, no kind 30617 repo announcements).
2. Open the desktop app, complete onboarding, go to the Projects screen.
3. Observe the empty state; there is no "+" button anywhere on the screen.
4. Publish any repo announcement out-of-band (e.g. `buzz repos create --id starter` via the CLI) and revisit the screen — the "+" button now appears top-right.
**Expected behavior:**
The create affordance is available with zero projects — either keep the toolbar + "+" menu rendered in the empty state, or give the empty state a "Create project" button wired to the same create-project dialog.
**Supporting Material**
Verified live on a self-hosted relay (Docker, `ghcr.io/block/buzz`) with a brand-new community. Workaround used: publish a NIP-34 announcement via the bundled CLI, which makes the list non-empty and reveals the "+" button.
**Environment (please complete the following information):**
- OS: Windows 11 (desktop app)
- Version: v0.4.23 (code path unchanged on current `main`)
**Additional context**
`ProjectsCreateMenu` is rendered unconditionally inside `projectsNavigation`, but that block is only reached when `projects.length > 0` due to the early return.
Contributor guide
Research direction
Start in desktop/src/features/projects/ui/ProjectsView.tsx at the projects.length === 0 early return, then inspect ProjectCards.tsx, projectsNavigation, and ProjectsCreateMenu. Ensure a fresh relay exposes the existing create affordance or its create-project dialog in the empty state, while preserving the non-empty view; verify both states in the desktop app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100