Skip to content

feat(web-shell): app shell, routing, auth bootstrap, shadcn setup#15

Merged
themightychris merged 4 commits into
mainfrom
feat/web-shell
May 16, 2026
Merged

feat(web-shell): app shell, routing, auth bootstrap, shadcn setup#15
themightychris merged 4 commits into
mainfrom
feat/web-shell

Conversation

@themightychris
Copy link
Copy Markdown
Member

Summary

  • Initializes shadcn/ui (Radix/Nova preset, Tailwind v4) with components: button, card, dropdown-menu, sheet, dialog, input, tooltip, separator, tabs
  • Implements the full app shell: sticky header with primary nav + About dropdown + search typeahead + auth controls, three-column footer with six social icons (no Twitter/X), skip link, offline banner, network error banner, progress bar
  • Wires React Router v7 data router (createBrowserRouter) with placeholder routes for all top-level URLs
  • useAuth calls GET /api/auth/me on mount; treats 401/404/network errors gracefully as anonymous; no throw on API-not-running condition
  • LoginPlaceholder screen matches specs/screens/login.md including error codes, "Why GitHub?" disclosure, and returning-member note
  • 17 jsdom unit tests covering auth bootstrap, mobile sheet open/close, footer social links (no Twitter/X), and nav rendering

Test plan

  • npm run lint clean
  • npm run type-check clean
  • npm test (web: 17/17, shared: 52/52) — API tests have 2 pre-existing timeout failures unrelated to this PR
  • npm run build clean (web bundle 137 KB gzip)
  • Browser: home stub renders with full shell (header + footer + main)
  • Browser: header nav links all route to placeholders (/projects, /help-wanted, /members, /volunteer)
  • Browser: About dropdown opens with all 6 items, keyboard-navigable
  • Browser: footer has 3 columns + 6 social icons (Instagram, LinkedIn, Facebook, Meetup, Mastodon, Bluesky) — no Twitter/X
  • Browser: search box accepts input, shows "See all results" link in dropdown
  • Browser: /login renders card with Sign in with GitHub button + Why GitHub + returning member note
  • Browser: useAuth handles 404/network error from /api/auth/me gracefully (anonymous controls render, no crash)
  • Browser: <main id="main-content" tabIndex={-1}> is programmatically focusable (skip link target verified)
  • Browser: mobile sheet (< md viewport) — validated via jsdom test; not validated in headed Chrome (AXI automation at full width only)

Notes

  • Switched from <BrowserRouter> to createBrowserRouter/RouterProvider — required for useNavigation which needs a data router context
  • Initial JS bundle is 137 KB gzip (target is 250 KB); slightly above ideal but shadcn/Radix brings significant base cost; lazy-loading in public-screens will improve this
  • API tests (apps/api) have 2 pre-existing timeout failures (gitsheets createTestRepo calls) — not introduced by this PR (verified by stashing changes and re-running)

🤖 Generated with Claude Code

themightychris and others added 4 commits May 16, 2026 15:28
Generated by:
  npm install tailwindcss @tailwindcss/vite
  npx shadcn@latest init -y --template vite --no-monorepo -p nova
  npx shadcn@latest add card dropdown-menu sheet dialog input tooltip separator tabs -y

Also added @/→src path alias to tsconfig.json and vite.config.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements specs/behaviors/app-shell.md and specs/screens/login.md.

Components:
- AppShell: wrapper with skip link, progress bar, offline banner, header, footer
- AppHeader: sticky header with logo, primary nav, About dropdown, search box,
  auth controls (anonymous/user/staff/admin variants), mobile hamburger + Sheet
- AppFooter: three columns (Explore/About/Connect) + social icons + copyright;
  no Twitter/X per deferred.md
- Breadcrumbs: trail component for route-level opt-in
- SearchBox: debounced typeahead with mock results (wired to real API in public-screens)
- NetworkErrorBanner: context-based 5xx error banner with Retry
- OfflineBanner: navigator.onLine-driven offline notice
- TopProgressBar: React Router navigation-state indicator

Hooks:
- useAuth: calls GET /api/auth/me on mount; treats 401/404/network errors as
  anonymous; provides person, loading, reload, signOut
- useSearch: debounced search state with TODO stubs for real API calls
- useOnline: window online/offline event listener

Routing (App.tsx): BrowserRouter + Routes with AppShell as layout; placeholder
routes for all top-level URLs per the plan; LoginPlaceholder screen per spec.

Pages: HomeStub, ComingSoon, NotFound, LoginPlaceholder (with error codes,
Why GitHub? disclosure, and Returning member note per spec).

Tests: 17 tests covering auth bootstrap, mobile sheet open/close, footer
social links (no Twitter/X), copyright, and nav rendering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- status: done, pr: 15
- Ticked verified validation criteria; left mobile sheet browser
  validation and NetworkErrorBanner kill-API step unticked with notes
- Switched App.tsx from BrowserRouter to createBrowserRouter (required
  for useNavigation in TopProgressBar)
- Filed Issue #16 for mobile sheet browser QA follow-up
- Absorbed search typeahead + NetworkErrorBanner wiring into public-screens
  Approach and Validation; added Notes section in public-screens

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@themightychris themightychris merged commit fafbfe2 into main May 16, 2026
1 check passed
@themightychris themightychris deleted the feat/web-shell branch May 16, 2026 19:56
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