Skip to content

fix(desktop): render projects header and create menu at zero projects - #3508

Open
puneetv05 wants to merge 1 commit into
block:mainfrom
puneetv05:fix/projects-empty-state-create-menu
Open

fix(desktop): render projects header and create menu at zero projects#3508
puneetv05 wants to merge 1 commit into
block:mainfrom
puneetv05:fix/projects-empty-state-create-menu

Conversation

@puneetv05

@puneetv05 puneetv05 commented Jul 29, 2026

Copy link
Copy Markdown

Fixes #3504.

Problem

ProjectsView returned <EmptyState /> before constructing the page header, toolbar, and <ProjectsCreateMenu />. On a relay with zero projects, the UI therefore hid the only control capable of creating the first project.

Fix

  • Remove the early return.
  • Render <EmptyState /> in the normal content slot when projects.length === 0.
  • Keep the Projects header, filter toolbar, and + create menu mounted for every project count.
  • Add focused Playwright coverage for the create flow and for preserving the page chrome across filters.

Scope

This is intentionally a three-file regression fix. It does not change empty-state copy, add another CTA, or modify project deletion/tombstone behavior. Broader related implementations are tracked in #4118 and #5205.

Unhiding the create menu also exposes its Issue and Pull Request items when there are no projects. Their existing dialogs already handle an empty project list by disabling submission until a project is available.

Current-main adaptation

The branch is rebased onto current main. The E2E setup now:

  • uses FEATURE_OVERRIDES_STORAGE_KEY rather than a versioned string literal;
  • hides the seeded kind 30621 project announcement as well as the kind 30617 repository announcements;
  • selects the current Project create-menu item name; and
  • preserves the existing project smoke-test entries in playwright.config.ts.

Verification

  • Biome check on the three touched files
  • pnpm typecheck
  • pnpm build:e2e
  • pnpm exec playwright test --project=smoke tests/e2e/projects-empty-state.spec.ts2 passed

The two focused tests verify:

  1. The header, empty state, toolbar, and create menu remain mounted with zero projects, and Project opens the existing create dialog.
  2. The empty state replaces only the content area across Repositories, Pull Requests, and Issues filters.

@puneetv05
puneetv05 marked this pull request as ready for review July 29, 2026 10:33
@puneetv05
puneetv05 requested a review from a team as a code owner July 29, 2026 10:33
@puneetv05

Copy link
Copy Markdown
Author

Hi @thomaspblock , could you please review #3508 when you get a chance? It fixes #3504, where the create menu disappears when there are zero projects, preventing users from adding their first project in Buzz. All checks are passing. Thanks!

ProjectsView returned <EmptyState /> before the page header and toolbar
were built, and the create menu lives in that toolbar. A relay with no
repo announcements therefore had no way to create its first project from
the UI — the button that creates a project only appeared once a project
already existed.

Drop the early return and render the empty state in the content slot
instead, the way EmptyFilteredState already does, so the header, filter
toolbar, and + menu stay mounted at every project count.

Adds an e2e spec that hides every seeded mock project to reach a
zero-project relay, then drives the create menu through to the create
project dialog. Both cases fail without the fix.

Fixes block#3504

Signed-off-by: Puneet Verma <puneet@saanvis.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant