block / block/buzz

Projects: create menu hidden when relay has zero projects — no way to create the first project

Open
#3,504 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

**Describe the bug**

When a relay has zero projects, the Projects view renders only the empty state — the page header, toolbar, and the create menu (`+`) are never mounted. Since "Repository" lives inside that create menu, there is no way to create the *first* project from the desktop UI. Chicken-and-egg: the button that creates a project only appears once a project already exists.

Cause looks like the early return in `desktop/src/features/projects/ui/ProjectsView.tsx`:

```tsx
if (projects.length === 0) {
return ;
}
```

This returns before `projectsHeader` / `projectsNavigation` (which contains ``) are rendered.

**Steps to reproduce**

1. Start a relay with no repo announcements (kind 30617) published.
2. Open the desktop app and go to Projects.
3. See "No projects yet — Projects published to this relay will appear here."
4. No header, no toolbar, no `+` button anywhere on the page.

**Expected behavior**

The Projects header and create menu should render regardless of project count, so a first project can be created from the UI. The empty state should sit in the content area below the toolbar (the way `EmptyFilteredState` already does), not replace the whole view.

**Workaround**

Publish the first repo announcement out-of-band, after which the full Projects UI appears:

```bash
export BUZZ_RELAY_URL="http://localhost:3000"
export BUZZ_PRIVATE_KEY="nsec1..."
buzz repos create --id my-project --name "My Project"
```

**Version and platform**

- Buzz version: v0.5.0
- OS: macOS

**Logs / additional context**

Same early return is present on `main` as of 485d03a. Suggested fix: drop the early return and render `` inside the content area where `repositoryItems` goes, so the header and create menu stay mounted.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.