Skip to content

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

Description

@puneetv05

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:

if (projects.length === 0) {
  return <EmptyState />;
}

This returns before projectsHeader / projectsNavigation (which contains <ProjectsCreateMenu />) 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:

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 <EmptyState /> inside the content area where repositoryItems goes, so the header and create menu stay mounted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions