Conversation
…cleanup Phase 1 - Quick wins: - Delete dead code: faq.tsx, ready-cta.tsx, 3 unused guilloche SVGs - Optimize guilloche_02.svg with SVGO (167KB → 137KB) - Remove duplicate @Keyframes spin definition - Fix 100vw → 100% on mobile modals (prevents horizontal overflow) Phase 2 - Security: - Sanitize error messages in auth API routes (no internal error leakage) - Wrap CSRF URL parsing in try/catch (prevents 500 on malformed Origin) - Invalidate existing session before creating new one (prevents fixation) Phase 3 - SSR flash-of-content: - Inline script checks session cookie and adds .has-session class to <html> - CSS hides .landing-ssr when .has-session present (no flash for auth users) - Remove fragile querySelector DOM manipulation from home-client.tsx Phase 4 - Accessibility: - Add skip navigation link (visible on focus) - Add aria-describedby + aria-invalid to Input and Textarea components - Add aria-haspopup + aria-expanded to navbar dropdown buttons - Add focus trapping to sign-in and feedback modals (new useFocusTrap hook) Phase 5 - Error handling: - Wrap Redis operations in try/catch with structured logging - Log profile seeding failures instead of silently swallowing Phase 6 - Performance: - Add IntersectionObserver to pause orbiting logos animation when off-screen Phase 7 - CSS cleanup: - Remove unused --color-info and --color-outline variables - Add --color-warning-bg/border/text variables, replace hardcoded hex values Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The certified_session cookie is httpOnly, so the inline script couldn't read it. Add a certified_logged_in hint cookie (non-sensitive, non-httpOnly) that the client JS can check to hide the landing page before hydration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Added footerRect.bottom > 0 check so the button only adjusts when the footer is actually visible from below, not when scrolled above viewport. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…al footer Both footers shared the .landing-footer class, so the feedback button adjusted position on all pages. Now uses #landing-footer ID to target only the landing page footer. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Landing page now lives at /welcome. Middleware redirects unauthenticated users from / to /welcome. Homepage is purely the profile dashboard. - Create src/middleware.ts: redirects / → /welcome when no session cookie - Create src/app/welcome/page.tsx: landing page with metadata + JSON-LD - Create src/app/welcome/layout.tsx: sets navbar to transparent variant - Simplify page.tsx: profile dashboard only, no landing content - Simplify home-client.tsx: remove navbar variant and has-session hacks - Simplify footer.tsx: hide on /welcome instead of auth-conditional - Simplify app-shell.tsx: pathname check instead of auth state check - Remove inline cookie-check script from layout.tsx - Remove .has-session CSS hack from globals.css - Remove certified_logged_in hint cookie from session.ts - Update sitemap.ts and llms.txt to reference /welcome Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fall back to .landing-footer class selector when #landing-footer ID isn't found, so the button avoids overlapping the global footer on app pages too. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… page The landing page no longer needs its own inline footer — the global Footer component from layout.tsx now renders on all pages including /welcome. Removed the pathname check, the #landing-footer ID, and the Link import from landing-page.tsx. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ails Handles edge case where middleware lets the user through (cookie exists) but the server-side session is expired or invalid. HomeClient now redirects to /welcome instead of showing a blank page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sion Calling router.replace() during render is unreliable. Moved to useEffect that triggers when isLoading=false and isAuthenticated=false, properly handling sign-out and expired session edge cases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR restructures the application's routing and homepage architecture by migrating the landing page from Changes
Sequence DiagramsequenceDiagram
participant Client as Client Browser
participant Middleware as Next.js Middleware
participant Server as Server Routes
participant Session as Redis/Session
Client->>Middleware: GET / (without certified_session)
Middleware->>Middleware: Check for certified_session cookie
Middleware->>Client: Redirect to /welcome
Client->>Server: GET /welcome
Server->>Server: Render landing page + SEO metadata + JSON-LD
Server->>Client: Return welcome page HTML
Client->>Server: POST /api/auth/login (credentials)
Server->>Session: createSession() with try/catch
Session-->>Server: Session created or error logged
Server->>Server: Log error if session creation fails
Server->>Client: Return auth callback URL
Client->>Server: GET /api/auth/callback-handler
Server->>Session: deleteSession() (suppress errors)
Server->>Session: createSession()
Server->>Client: Set certified_session cookie + redirect to /
Client->>Middleware: GET / (with certified_session)
Middleware->>Middleware: Session cookie found
Middleware->>Client: NextResponse.next() - proceed to page
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Architecture: Landing page separation
/to/welcomewith middleware redirect for unauthenticated users/is now purely the profile dashboard — no dual-rendering, no CSS hacksFootercomponenthas-sessionclass hack,certified_logged_inhint cookie,landing-ssrwrapper/welcomeon sign-out or expired sessionCode review fixes (10-reviewer audit)
aria-describedby+aria-invalidon inputs,aria-haspopup/aria-expandedon navbar dropdowns, focus trapping in modals (useFocusTraphook)@keyframes spin, fix100vw→100%on mobile modals, remove unused CSS variables, standardize warning colors to CSS variablesfaq.tsx,ready-cta.tsx, 3 unused guilloche SVGsOther
certified-hero-1200x630.pngOG image andicon.pngfaviconTest plan
/unauthenticated → redirects to/welcomewith landing page/authenticated → profile dashboard renders/welcome/welcome→ lands on/dashboard/welcomerenders landing page with transparent navbar and footer/about,/terms,/privacyrender with app footernpm run buildpasses🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation