Skip to content

Polish production UI after visual review - #14

Merged
prathamkashyap merged 1 commit into
mainfrom
fix/visual-review-defects
Oct 4, 2026
Merged

prathamkashyap merged 1 commit into
mainfrom
fix/visual-review-defects

Conversation

@prathamkashyap

Copy link
Copy Markdown
Owner

Step 6 — a real browser pass over the merged public experience. This found two defects that
every DOM test had passed. Both fixes below are directly from observed findings; no refactors.

How this was validated

main built with VITE_API_ROOT pointed at the deployed API, served behind a same-origin proxy
(the deployed API allows only its own registered origins, so a locally served build cannot call it
directly), driven with real Chromium at 320–1920px in both themes, plus a real signup → quiz →
attempt → dashboard journey against production.

Screenshots were reviewed by eye, not just measured.

Defect 1 — the landing header overflowed horizontally on every width below 1024px

scrollWidth exceeded clientWidth at 360, 390, 768 and 820. At 390px the CTA's right edge sat at
481px in a 390px viewport — "Open workspace" was visibly sliced off, and the page scrolled
sideways. Two independent causes:

  1. The nav appeared too early. md:flex switches on at 768px. The five items needed ~836px, so
    from md the row could not hold lockup + nav + CTA at all.
  2. The tagline was the widest thing in the row. "INTELLIGENT LEARNING SYSTEM" measured 215px of
    a 342px content box, leaving too little for a 170px CTA on a phone.

Fixed: nav waits for lg and uses short labels ("Stack", "Limits") with the full wording kept in the
footer; the tagline is hidden below lg via a new taglineClassName prop; the CTA arrow drops below
sm; the lockup gets min-w-0 shrink so it yields space rather than shoving the CTA off-screen;
padding and gap step down on small screens.

Viewport Before After
320 overflow clean
360 overflow clean
390 scrollW 481, CTA right=481 scrollW 390, CTA right=374
768 scrollW 836, CTA right=836 scrollW 768, CTA right=744
1024–1920 clean clean

Verified at all nine widths from 320 to 1920.

Defect 2 — the sidebar tagline wrapped to a second line

The canonical tagline is three words where the sidebar's old one-liner was two. At 10px with
0.2em tracking it measured 215px inside a rail with ~196px to give, so it wrapped to
"INTELLIGENT LEARNING / SYSTEM" and broke the 64px header. This landed in PR #13 and was invisible to
the test suite, because the suite asserted classNames rather than rendered width.

sm is now 9px/0.12em (174px, one line), md/lg tracking tightened to match, and every size
carries whitespace-nowrap so a future longer tagline truncates instead of wrapping.

What the pass confirmed

  • Header/sidebar divider: delta 0px in both states — topbar bottom 64, sidebar brand bottom
    64. Collapsing the rail does not move it (before 64, after 64, moved false). The shared
    --app-header-height token does what it was introduced to do.
  • Topic rows, validated against a real attempt recorded through the API (/analytics/dashboard
    → topicMastery): 20×20px chip, 12×12px glyph, flexible 165px title with min-w-0 + ellipsis,
    fixed 18px count, tabular-nums on, title/count vertical centres agreeing to the pixel, accents
    visibly differentiated (sky for Operating Systems, cyan for Neural Networks), full name in
    title, mastery figure in aria-label.
  • Brand consistency across landing, auth and the shell: one wordmark, one tagline, gradient tile
    everywhere. No "Learning OS" variant survives.
  • Placeholder is Ada Lovelace; no personal data reaches any rendered page.
  • No emoji in rendered text on any surface.
  • No console errors, no page errors, no failed requests, no broken assets.
  • Hero 60px/60px Instrument Serif, 2 lines desktop / 3 lines at 390px, no clipping. Stat strip
    four equal 191px columns. Boundary section reads cleanly as does/does-not.
  • Deep links work: /dashboard and /auth serve correctly through SPA fallback.

Not fixed, deliberately

The stored light theme is ignored on / and /auth. ThemeToggle is mounted only in
AppLayout, so the theme-light class is never applied on the public routes — measured
html.className === "" with athenaeum-theme=light stored. This is pre-existing on /auth and my
routing change extends it to /. The brief says theme behaviour "where supported", and fixing it
properly means applying the stored theme at boot in main.tsx/index.html, which is a wider blast
radius than this gate should take. Flagging it for the README limitations pass rather than
expanding scope here.

"Retrieval Augmented Generation" falls to a hash fallback icon rather than the NLP mapping,
because no keyword rule matches it. That is the designed behaviour for an unrecognised topic —
stable, not wrong — so I left it. Worth a keyword rule if RAG becomes a common subject label.

Tests — 10 new, and honest about their limit

landingResponsive.test.tsx asserts the contract that prevents the overflow: nav not at md,
tagline hidden below lg, min-w-0 on the lockup, whitespace-nowrap on every nav label and every
tagline size, short-vs-long label pairing, and every anchor resolving to a real section id.

It cannot assert the absence of overflow itself. jsdom performs no layout — every element
reports width 0 — which is precisely why both defects reached main. Width assertions belong to the
Chromium pass above; these tests lock the contract so the next edit has to break it deliberately.

PROOF.frontend updated 347 → 357 against actual runs. That number drifted the moment this branch's
own tests landed, the same trap as last time.

Check Before After
Frontend 347 / 27 357 / 28
Backend unit / integration / E2E 942 / 101 / 26 unchanged
typecheck / build / lint 0 / 0 / 0 0 / 0 / 0

@prathamkashyap
prathamkashyap merged commit dd0bc3d into main Oct 4, 2026
3 checks passed
@prathamkashyap
prathamkashyap deleted the fix/visual-review-defects branch October 4, 2026 17:28
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