Skip to content

feat(web): persistent connect-GitHub banner under the navbar#124

Merged
themightychris merged 1 commit into
mainfrom
feat/global-connect-github-banner
Jun 1, 2026
Merged

feat(web): persistent connect-GitHub banner under the navbar#124
themightychris merged 1 commit into
mainfrom
feat/global-connect-github-banner

Conversation

@themightychris
Copy link
Copy Markdown
Member

Summary

Promotes the "Connect your GitHub account" nag from a per-page section on `/account` to a top-level `ConnectGitHubBanner` rendered by `AppShell` directly under the navbar — so every page shows it to legacy users until they link or dismiss.

Visibility rule unchanged from phase D:

  • Signed in
  • `hasGitHubLink === false`
  • `lastLoginMethod` ∈ `{legacy_password, password_reset}`
  • Not dismissed (session-only via `useState`; dismissal persists across navigations because `AppShell` stays mounted, but a hard refresh brings the banner back)

The Identity-card "Connect GitHub" form on `/account` stays — that's an in-context action for users who land on the settings page wanting to wire up the link, not a nag.

Tests split: new `ConnectGitHubBanner.test.tsx` covers the visibility matrix (legacy / reset / github-linked / anonymous) and dismiss. `Account.test.tsx` trimmed to the identity-card branches.

Test plan

  • `npm run -w apps/web type-check` clean
  • `npm run lint` clean
  • `npm run -w apps/web test -- tests/ConnectGitHubBanner.test.tsx tests/Account.test.tsx` — 7/7
  • Visual smoke after deploy: banner appears on `/`, `/projects`, `/members`, etc. for legacy users; absent for GitHub users; dismissing on one page keeps it dismissed across navigation

🤖 Generated with Claude Code

Hoists the "Connect your GitHub account" nag from the /account page
to a top-level ConnectGitHubBanner rendered by AppShell directly
under the navbar, so every page shows the prompt to legacy users
until they link GitHub or dismiss for the session.

Behavior unchanged from the per-page version:
  - Renders iff signed-in + hasGitHubLink === false + lastLoginMethod
    ∈ {legacy_password, password_reset}
  - Dismiss button hides it for the rest of the session
  - CTA submits a form to POST /api/auth/link-github

Identity-card "Connect GitHub" form on /account stays — it's an
in-context action for users who land on the settings page wanting
to wire up the link, not a nag.

Test split: new ConnectGitHubBanner.test.tsx covers the visibility
matrix + dismiss; Account.test.tsx is trimmed to the identity-card
branches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@themightychris themightychris merged commit b0f56b6 into main Jun 1, 2026
1 check passed
@themightychris themightychris deleted the feat/global-connect-github-banner branch June 1, 2026 13:18
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