Skip to content

feat: UI external pages design overhaul - #9

Merged
Truella merged 22 commits into
masterfrom
feat/ui-external-pages
Jul 28, 2026
Merged

Truella merged 22 commits into
masterfrom
feat/ui-external-pages

Conversation

@Truella

@Truella Truella commented Jul 27, 2026 •

Copy link
Copy Markdown
Owner

Summary
Full external pages UI overhaul. Token-based design system with dark/light theme switching via next-themes. DM Serif Display for display headings, JetBrains Mono for data/code, Inter for UI text. Homepage rebuilt with 6 content sections and an animated hero carousel cycling through 5 CBT-style demo questions across different categories and levels — correct answer highlights in amber then slides to the next question via Framer Motion. Quiz Bank gets a proper grid layout with skeleton loading, a redesigned empty state, and updated cards with amber CTAs. Take a Quiz entry page simplified and focused. Docs section gets ExternalNav and full token system pass with amber active states on the sidebar.

New dependencies

  • framer-motion
  • next-themes

Changed files

  • app/globals.css
  • app/layout.tsx
  • app/page.tsx
  • app/quiz-bank/page.tsx
  • src/components/ExternalNav.tsx (new)
  • src/components/home/HeroCard.tsx (new)
  • src/components/home/FadeUp.tsx (new)
  • src/components/quiz/TakeQuizInputClient.tsx
  • src/views/QuizBankView.tsx
  • src/components/quiz-bank/QuizBankCard.tsx
  • src/components/quiz-bank/QuizBankFilters.tsx
  • src/components/docs/DocsLayout.tsx
  • src/components/docs/DocsSidebar.tsx
  • src/components/docs/GettingStarted.tsx
  • src/components/docs/CSVGuide.tsx
  • src/components/docs/Troubleshooting.tsx
  • src/components/docs/QuestionTips.tsx

Checklist

  • npm install framer-motion next-themes completed
  • npx tsc --noEmit passes
  • npx next lint passes
  • Hero card cycles through all 5 questions with amber highlight animation
  • Theme toggle switches dark/light on all external pages
  • All external page links navigate correctly
  • Light mode readable and consistent across all 4 pages
  • No console.log statements
  • Branch up to date with main

Summary by CodeRabbit

  • New Features
    • Overhauled the homepage with animated sections, a quiz bank preview, and clearer calls to action.
    • Added an external top navigation with a light/dark theme toggle.
    • Updated Auth, Docs, and quiz-taking screens for a consistent UI.
    • Enhanced the Quiz Bank with a new hero, improved filters, responsive grid, and better empty/loading/error states.
    • Take-a-quiz now supports resolving and entering 6-character quiz codes.
  • Bug Fixes
    • Quiz creation now retries automatically if a generated code conflicts.
  • Style
    • Rolled out token-based theming (light/dark), updated fonts, and smoother color transitions across public pages and docs.

Truella added 9 commits July 26, 2026 23:55
…code handling

- Created a new component `TakeAQuizStrip` that allows users to enter a quiz link or code to start a quiz.
- Implemented validation for quiz codes and links, including a regex check for code format.
- Integrated Supabase to fetch quiz data based on the provided code.
- Added a new column `code` to the `quizzes` table in the database with a unique index for efficient lookups.
@vercel

vercel Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
prep Ready Ready Preview, Comment Jul 28, 2026 12:29am

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Truella, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 28 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: febb314a-2543-4bb2-814f-a842f5c3b8a3

📥 Commits

Reviewing files that changed from the base of the PR and between 75d81de and 34f9594.

📒 Files selected for processing (16)
  • app/globals.css
  • package.json
  • src/components/ExternalNav.tsx
  • src/components/auth/AuthPageClient.tsx
  • src/components/docs/DocsLayout.tsx
  • src/components/docs/GettingStarted.tsx
  • src/components/docs/Troubleshooting.tsx
  • src/components/home/TakeAQuizStrip.tsx
  • src/components/quiz-bank/QuizBankCard.tsx
  • src/components/quiz-bank/QuizBankFilters.tsx
  • src/context/AuthContext.tsx
  • src/hooks/useCreateQuiz.ts
  • src/lib/theme.tsx
  • src/views/Auth/AuthForm.tsx
  • supabase/migrations/20260728000000_add_code_to_quizzes.sql
  • supabase/migrations/20260728000001_create_quizzes_code_index.sql
📝 Walkthrough

Walkthrough

The PR adds a themed PREP application shell, redesigned homepage, authentication and quiz-bank interfaces, quiz-code creation and lookup, animated components, updated documentation styling, and supporting dependencies and scripts.

Changes

Application foundation

Layer / File(s) Summary
Theme and application foundation
app/globals.css, app/layout.tsx, src/lib/theme.tsx, package.json
Global color/font tokens, light-theme overrides, font loading, theme persistence, provider wiring, metadata, and test/typecheck scripts are updated.

Public experience

Layer / File(s) Summary
Homepage composition and interactions
app/page.tsx, src/components/home/*, src/components/ExternalNav.tsx, src/constants/home.ts
The homepage is rebuilt from animated sections with navigation, CTAs, a rotating demo quiz card, public quiz previews, and quiz-code entry.
Authentication page integration
app/auth/page.tsx, src/views/Auth/*, src/components/auth/AuthPageClient.tsx
The auth route renders AuthView; authentication forms and layouts adopt shared navigation and theme tokens while retaining auth behavior.
Quiz bank composition and presentation
app/quiz-bank/page.tsx, src/views/QuizBankView.tsx, src/components/quiz-bank/*, src/constants/quizBank.ts
The quiz bank gains themed hero, filters, cards, grid, loading, empty, and error states with shared sorting and difficulty definitions.
Quiz-code entry page
src/components/quiz/TakeQuizInputClient.tsx
Quiz URLs and six-character codes are normalized, codes are resolved through Supabase, and lookup progress and errors are rendered.
Quiz code persistence and creation
src/hooks/useCreateQuiz.ts, src/lib/types.ts, supabase/migrations/*
Quiz codes are generated and stored with unique non-null indexing, with one retry for duplicate-code insert failures.

Documentation

Layer / File(s) Summary
Documentation theme pass
src/components/docs/*, docs/PREP_UI_PRT.md, docs/PREP_INTERNAL_PRT.md
Documentation layouts and content adopt token-based styling and shared navigation; planning documents describe UI and internal-page implementation tracks.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Visitor
  participant ExternalNav
  participant ThemeProvider
  participant TakeAQuizStrip
  participant Supabase
  Visitor->>ExternalNav: toggle theme
  ExternalNav->>ThemeProvider: setTheme(light or dark)
  ThemeProvider-->>ExternalNav: update resolvedTheme
  Visitor->>TakeAQuizStrip: submit quiz code
  TakeAQuizStrip->>Supabase: query quiz by code
  Supabase-->>TakeAQuizStrip: return quiz id
  TakeAQuizStrip-->>Visitor: navigate to quiz route
Loading

Possibly related PRs

  • Truella/prep#3: Both changes modify src/hooks/useCreateQuiz.ts around quiz metadata persistence.
  • Truella/prep#4: Both changes modify the quiz creation insert payload in src/hooks/useCreateQuiz.ts.
  • Truella/prep#7: Both changes modify quiz-bank routes, views, cards, and filters.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: a UI/design overhaul for external pages.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ui-external-pages

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 21

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/globals.css`:
- Around line 30-32: Wrap the global transition rule under the `*` selector in
an `@media (prefers-reduced-motion: no-preference)` block so transitions apply
only when users have not requested reduced motion; preserve the existing
transition properties and timing.

In `@docs/PREP_INTERNAL_PRT.md`:
- Around line 79-81: Remove the unauthenticated insert policies for
quiz_attempts, including the corresponding policy block around the later
referenced section. Route attempt submission through a server endpoint or action
that verifies the user’s quiz access, derives the score server-side, and writes
only validated attempt data.

In `@docs/PREP_UI_PRT.md`:
- Around line 30-38: Add a darker light-mode accent-text token alongside the
existing light theme tokens, retaining `#B8960A` for fills. Update normal-text
accent usages in DocsSidebar and CSV validation feedback to use the new
--color-accent-text token, while leaving fill and accent-dim usages unchanged.

In `@package.json`:
- Around line 16-24: Remove the unused next-themes dependency from the
dependencies list, since app/layout.tsx uses the custom ThemeProvider from
src/lib/theme.tsx rather than next-themes; update the lockfile if required by
the package manager.

In `@src/components/auth/AuthPageClient.tsx`:
- Around line 7-33: Remove the unused AuthPageClient component and its file,
including imports and implementation; keep the existing app/auth/page.tsx
AuthView rendering unchanged as the sole auth entry point.

In `@src/components/docs/DocsLayout.tsx`:
- Around line 36-45: Update the docs section select in DocsLayout to remove the
focus:outline-none suppression and add a visible focus-visible styling rule,
such as a ring or border change, so keyboard users can clearly identify the
focused control while preserving the existing styling.

In `@src/components/docs/GettingStarted.tsx`:
- Around line 39-44: Update the step-number span in GettingStarted so it uses
the theme text color token instead of the hardcoded text-white class, preserving
readable contrast against the var(--color-surface-raised) background in light
mode.

In `@src/components/docs/Troubleshooting.tsx`:
- Around line 67-75: Update the error message styling in the Troubleshooting
component to use a theme-aware var(--color-error) token instead of the hardcoded
`#EF4444` value, and define the token with separate light and dark theme values in
the existing color token configuration.

In `@src/components/ExternalNav.tsx`:
- Around line 45-51: Update the theme toggle button in ExternalNav to explicitly
use button type "button", preserving its existing onClick behavior and
presentation.

In `@src/components/home/Hero.tsx`:
- Around line 39-60: Update the internal CTA elements in the Hero component to
use Next.js Link instead of raw anchor tags for the /auth and /take routes,
preserving their existing classes, styles, and labels.

In `@src/components/home/TakeAQuizStrip.tsx`:
- Around line 82-87: Remove the autoFocus prop from the quiz code input in the
TakeAQuizStrip component, while preserving its value, change handling,
placeholder, and other input behavior so visitors choose when to focus the
field.

In `@src/components/quiz-bank/QuizBankCard.tsx`:
- Around line 6-10: Remove the local DIFFICULTY_STYLES definition in
QuizBankCard and import and reuse the exported difficulty-style map from the
shared quiz-bank constants. Update the component’s references to use that
imported map, preserving the existing styling behavior.
- Around line 71-74: Update the rating display in QuizBankCard so a numeric
average_rating of 0 renders as “0.0” rather than the unavailable marker. Check
explicitly for a missing or nullish value instead of relying on truthiness,
while preserving the existing toFixed(1) formatting for all numeric ratings.
- Line 75: Update the times_taken formatting in QuizBankCard to call
toLocaleString with the application’s fixed locale, such as en-US, instead of
relying on the runtime default locale. Keep the existing “taken” label and
numeric formatting behavior unchanged.

In `@src/components/quiz-bank/QuizBankFilters.tsx`:
- Around line 43-103: Restore accessible names for the category, difficulty, and
sort controls in QuizBankFilters by adding associated labels or equivalent
aria-label attributes to each select. Ensure each control has a unique,
descriptive accessible name while preserving the existing values and change
handlers.

In `@src/components/quiz/TakeQuizInputClient.tsx`:
- Line 94: Remove the autoFocus prop from the quiz input in TakeQuizInputClient
so the field no longer receives focus automatically on page load; leave the
input’s other behavior unchanged.

In `@src/hooks/useCreateQuiz.ts`:
- Around line 95-119: Update the successful retry path in the quiz creation flow
to set isCreatingQuiz to false before returning, alongside the existing quiz
state update and success toast. Keep the failure-path reset and duplicate-code
retry behavior unchanged.

In `@src/lib/theme.tsx`:
- Around line 34-47: Update the theme context logic to add an effect keyed by
theme that invokes applyTheme(theme) whenever the synchronized theme changes,
including storage-driven cross-tab updates. Keep the existing setTheme behavior
and applyTheme implementation unchanged.

In `@src/views/Auth/AuthForm.tsx`:
- Around line 20-26: Update the signUp and signIn contract and their callers so
authentication failures are propagated or represented by an unsuccessful result
instead of resolving as success. In the AuthForm authentication flow, show each
success toast only after confirming the corresponding auth operation succeeded,
while preserving failure handling without displaying a success message.
- Around line 88-128: Associate the Email and Password labels in AuthForm with
their corresponding input controls by adding unique id attributes to both inputs
and matching htmlFor attributes to the labels. Keep the existing form behavior
and styling unchanged.

In `@supabase/migrations/20260728000000_add_code_to_quizzes.sql`:
- Line 4: Update the idx_quizzes_code creation in the migration to use a
deployment-safe concurrent unique index strategy, and configure the migration
runner so this statement executes outside a transaction because concurrent index
creation cannot run within one. Preserve the existing partial uniqueness
condition for non-null code values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c1f3b365-3701-444b-9a55-1257b6454b20

📥 Commits

Reviewing files that changed from the base of the PR and between 40b042f and 282f1c0.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (43)
  • app/auth/page.tsx
  • app/globals.css
  • app/layout.tsx
  • app/page.tsx
  • app/quiz-bank/page.tsx
  • docs/PREP_INTERNAL_PRT.md
  • docs/PREP_UI_PRT.md
  • package.json
  • src/components/ExternalNav.tsx
  • src/components/auth/AuthPageClient.tsx
  • src/components/docs/CSVGuide.tsx
  • src/components/docs/DocsLayout.tsx
  • src/components/docs/DocsSidebar.tsx
  • src/components/docs/GettingStarted.tsx
  • src/components/docs/QuestionTips.tsx
  • src/components/docs/Troubleshooting.tsx
  • src/components/home/CTASection.tsx
  • src/components/home/FadeUp.tsx
  • src/components/home/Features.tsx
  • src/components/home/Footer.tsx
  • src/components/home/Hero.tsx
  • src/components/home/HeroCard.tsx
  • src/components/home/HowItWorks.tsx
  • src/components/home/QuizBankPreview.tsx
  • src/components/home/TakeAQuizStrip.tsx
  • src/components/home/WhoItsFor.tsx
  • src/components/quiz-bank/QuizBankCard.tsx
  • src/components/quiz-bank/QuizBankEmpty.tsx
  • src/components/quiz-bank/QuizBankError.tsx
  • src/components/quiz-bank/QuizBankFilters.tsx
  • src/components/quiz-bank/QuizBankGrid.tsx
  • src/components/quiz-bank/QuizBankHero.tsx
  • src/components/quiz-bank/QuizBankLoading.tsx
  • src/components/quiz/TakeQuizInputClient.tsx
  • src/constants/home.ts
  • src/constants/quizBank.ts
  • src/hooks/useCreateQuiz.ts
  • src/lib/theme.tsx
  • src/lib/types.ts
  • src/views/Auth/AuthForm.tsx
  • src/views/Auth/AuthView.tsx
  • src/views/QuizBankView.tsx
  • supabase/migrations/20260728000000_add_code_to_quizzes.sql

Comment thread app/globals.css Resolved
Comment thread docs/PREP_INTERNAL_PRT.md Resolved
Comment thread docs/PREP_UI_PRT.md Resolved
Comment thread package.json Resolved
Comment thread src/components/auth/AuthPageClient.tsx Resolved
Comment thread src/hooks/useCreateQuiz.ts Resolved
Comment thread src/lib/theme.tsx Resolved
Comment on lines +20 to +26
if (isSignup) {
await signUp(email, password);
toast.success("Account created successfully!");
} else {
await signIn(email, password);
toast.success("Logged in successfully!");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not show a success toast when authentication fails.

signUp and signIn catch Supabase errors internally and resolve without throwing, so these success toasts run even after rejected credentials or failed registration. Change the auth-method contract to propagate a failure/result, then toast success only after a confirmed successful response.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/views/Auth/AuthForm.tsx` around lines 20 - 26, Update the signUp and
signIn contract and their callers so authentication failures are propagated or
represented by an unsuccessful result instead of resolving as success. In the
AuthForm authentication flow, show each success toast only after confirming the
corresponding auth operation succeeded, while preserving failure handling
without displaying a success message.

Comment thread src/views/Auth/AuthForm.tsx Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/PREP_UI_PRT.md`:
- Around line 1575-1583: Update the checklist entries in the documented
validation checklist to use valid Markdown task-list syntax by changing each “-
[]” marker to “- [ ]”. Apply this consistently to all listed items, preserving
their wording and order.

In `@src/components/ExternalNav.tsx`:
- Around line 21-50: Update the ExternalNav component’s navigation layout to add
mobile breakpoint behavior, collapsing or hiding lower-priority links behind a
responsive menu while keeping the logo, all destinations, sign-in action, and
theme toggle reachable. Preserve the existing desktop single-row presentation
and ensure the mobile layout does not overflow narrow viewports.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 626ca660-276f-4f13-8dc0-69b2a797f7af

📥 Commits

Reviewing files that changed from the base of the PR and between 282f1c0 and be0bf5b.

📒 Files selected for processing (3)
  • docs/PREP_UI_PRT.md
  • src/components/ExternalNav.tsx
  • src/components/home/Hero.tsx

Comment thread docs/PREP_UI_PRT.md Resolved
Comment thread src/components/ExternalNav.tsx Resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Mistura <101476258+Truella@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Mistura <101476258+Truella@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Mistura <101476258+Truella@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Mistura <101476258+Truella@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Mistura <101476258+Truella@users.noreply.github.com>
@Truella
Truella merged commit 0a90de2 into master Jul 28, 2026
5 checks passed
@Truella
Truella deleted the feat/ui-external-pages branch July 28, 2026 00:31
@coderabbitai coderabbitai Bot mentioned this pull request Jul 28, 2026
8 tasks done
@coderabbitai coderabbitai Bot mentioned this pull request Aug 5, 2026

This branch was successfully deployed

1 active deployment
Preview — 34f9594e Deployed Jul 28, 2026 by vercel[bot]
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