Skip to content

fix(webapp): the new-project dialog no longer opens itself on arrival (BEA-80) - #129

Open
ssowonny wants to merge 1 commit into
mainfrom
bea-80-ph-scan-bug-new-project-dialog-auto-opens-over-the
Open

fix(webapp): the new-project dialog no longer opens itself on arrival (BEA-80)#129
ssowonny wants to merge 1 commit into
mainfrom
bea-80-ph-scan-bug-new-project-dialog-auto-opens-over-the

Conversation

@ssowonny

@ssowonny ssowonny commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

TL;DR

  • A brand-new account's very first screen had two "New project" buttons, and the one on the page was permanently dead.
  • The create dialog opened itself on arrival and pointer-blocked #ob-new behind it — Playwright retried that click for 30s before failing, twice.
  • Fix is a deletion: the auto-open effect and its ref leave HubApp.tsx, plus two comments that documented it.
  • With nothing on top, the first thing a new user sees is the agent paste-prompt — the path the docs treat as primary.
  • Known gap: the read-only-hub case (upload.enabled === false) is verified by reading the code, not by a test — that branch is untouched by this diff and no e2e fixture serves a read-only hub.
before after
before after

Closes BEA-80.

Why this reverses a deliberate decision

The auto-open was intentional, and the comment being deleted is that decision's written record:

With no projects at all there is nothing else on the page to do, so the dialog opens itself.

That was true when it was written. It stopped being true when the empty state gained its second card — the paste prompt for Claude Code / Cowork / Codex / Gemini CLI, the agent-first route the docs sidebar puts on the critical path. The dialog was covering the recommended path in order to offer the secondary one.

What changed

  • src/apps/HubApp.tsx — the autoOpened ref and its useEffect are gone, and useRef drops out of the React import (it had exactly one use). The comment above creating now says the dialog never opens on its own, and why.
  • src/components/EmptyState.tsx — the paragraph describing the auto-open ("This page is what is left when someone closes it") was false in every clause; replaced with what is true.
  • e2e/hub.spec.ts — the test asserted the auto-open by name, so it's rewritten, not skipped: [role=dialog] count is 0 on arrival, and #ob-new opens the dialog on the first attempt (a trial: true click with a 2s timeout fails loudly if anything is ever intercepting it again).
  • internal/webapp/static — rebuilt.

Untouched: createProject, NewProjectDialog, and all entry points (#ob-new, the sidebar +, ProjectNav's onNew). /join/<token> is safe by construction — the deleted effect already returned early on joinToken.

Acceptance

check result
go build ./..., go vet ./... clean
go test ./... all packages ok
npm run e2e 153 passed, 1 skipped (sec14fe.spec.ts:300, pre-existing test.skip on main)
[role=dialog] on arrival, zero-project account 0
#ob-new click → dialog visible 45ms, first attempt
close → does not reopen 0 dialogs after Escape
sidebar + on an account with projects still opens the dialog
/join/<token> covered by the existing invite-accept spec, passing
read-only hub shows no create affordance code-verified only — see the known gap above

npm run build was run in internal/webapp/frontend and the rebuilt internal/webapp/static is committed.

Build session

cd $(git worktree list | grep bea-80 | awk '{print $1}') && claude --resume 5dcac8f7-4b8a-4860-be8a-6f1816cc6a37

(only works on the machine that ran the build)

… (BEA-80)

A signed-in account with zero projects landed on / with the create dialog
already open over the onboarding page. The page renders its own "New
project" button (#ob-new), so the same call to action appeared twice and
the rear one was permanently pointer-intercepted — Playwright retried a
click against it for 30s before failing.

The auto-open was deliberate: "With no projects at all there is nothing
else on the page to do." That stopped being true when the empty state
gained the agent paste-prompt card — the route the docs treat as primary,
which the dialog was covering.

Delete the effect and its ref; fix the two comments that documented it;
rewrite the e2e test that asserted the auto-open by name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ssowonny
ssowonny requested a review from thefron August 5, 2026 12:13
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.

1 participant