The rename to Vita covered config, copy and translations, but missed the
one hardcoded literal that renders on every page: Logo.tsx spelled out
"Vita" + accented "Re" + "Ba" directly, bypassing COMPANY.shortName
entirely. Caught live in the browser after the previous PR deployed.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
* fix(auth): unblock the public API surface — login was unreachable in prod
The middleware session-gated ALL of /api, so every anonymous endpoint
307-redirected to the login page: the NextAuth session + credentials
callback (login itself), registration, password reset, the assessment-
leads funnel, and the Calendly webhook. Signed-in traffic looked healthy,
so nothing caught it.
- PUBLIC_API_PREFIXES in lib/config/routes.ts (SSOT) — each listed
prefix authenticates itself (NextAuth, HMAC signature, CRON_SECRET,
or Zod-validated no-PII writes)
- gated /api paths now answer 401 JSON instead of an HTML login page
- new /api/health (fleet convention): 200 = app up + DB reachable
- route-auth-invariant.test.ts pins the class: every route under a
public prefix must self-authenticate; every gated route must import
a guard
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* refactor: delete the dead unlocalized auth tree + audit fixes
next-intl (localePrefix: always) redirects /login -> /de/login, so the
app/(auth) tree never rendered — a full duplicate of the localized auth
pages, drifting separately (hardcoded English, stale styles). Deleted.
Its stylesheet WAS live (portal forms imported it): the shared form
primitives now live once in app/forms.module.css; auth.module.css
re-exports them via composes.
Also from the audit sweep:
- public/robots.txt deleted — it shadowed app/robots.ts, so the
portal/admin/api disallow rules never shipped
- portal nav labels: one SSOT (PORTAL_ROUTE_LABELS) for PortalNav and
NavBreadcrumb — breadcrumb was silently blank on /goals and
/documents because the two copies had drifted
- global 404 now links to the public homepage, not the auth-gated
dashboard
- manifest icons existed only as references: generated icon-192/512.png
from the brand mark (404'd on every page load before)
- Google auth provider only registers when its env is configured
- dead SignOutButton component + create-next-app template SVGs removed
- drop package.json pnpm.onlyBuiltDependencies (moved to
pnpm-workspace.yaml allowBuilds long ago; pnpm warned on every run)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(ui): admin patient page 500, dead mobile CSS, and portal polish
- schema: documents<->users is doubly connected (owner + uploader); the
unnamed primary relation made Drizzle throw at query time and the
admin patient-detail page — the core clinical view — 500'd in prod.
Both sides now carry relationName. lib/db/relations.test.ts plans a
query over EVERY declared relation so the next misconfigured relation
(this was the second) fails in CI, not in prod.
- admin.module.css: the entire mobile @media block sat BEFORE the base
rules it overrides (appended later), so phones got the desktop layout
— 4-across stat tiles clipping their labels, oversized title, no
form-grid collapse. Block moved after its base rules;
lib/css-order.test.ts now fails any stylesheet where a base rule
shadows an earlier @media override.
- proxy: admins landing on /dashboard (post-login default, PWA
start_url) are redirected to /admin/patients — they were dropped into
the empty patient portal.
- check-in scale: hovering the button just clicked painted the number
teal-on-teal (.scaleBtn:hover outranked .scaleBtnActive)
- admin assessment-trend chart plotted newest-first — time axis read
right-to-left; reversed to chronological
- sidebar wordmark was ink-on-ink (only 'Re' visible): Logo gains a
'bright' on-dark variant, used by portal + admin sidebars
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
• Expanded globals.css :root with full opacity scales:
- White (--white-3 through --white-97) for dark-background sections
- Primary/teal (--teal-6 through --teal-70) via color-mix so --teal cascades
- Gold (--gold-6 through --gold-70), danger, warn, muted opacity scales
- Shadow scale (--shadow-sm/md/lg)
- Border radius (--radius-xs through --radius-full)
- Transition timing (--transition-fast/normal/slow)
- Z-index scale (--z-nav, --z-overlay, --z-overlay-pb, --z-overlay-close)
• Replaced every #fff → var(--white) across 28 CSS module files
• Replaced every rgba(255,255,255,X) → var(--white-X) across all dark-context files
• Replaced every rgba(42,122,138,X) teal → var(--teal-X) across all section/portal files
• Replaced every inline color-mix() in admin/portal/section files → named tokens
• Fixed hardcoded "DM Sans" font in not-found.module.css → var(--font-dm-sans)
• Replaced box-shadow rgba(0,0,0) values with --shadow-* tokens in Nav, UserDropdown, LanguageSwitcher
• global-error.module.css left intentionally self-sufficient (renders outside root layout)
Changing --teal to any colour now cascades to all opacity variants site-wide.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
globals.css reduced from 1625 → 101 lines — now contains only design
tokens, base resets, and shared utilities (section-inner, eyebrow,
sec-title, hr-rule, tags). All component-specific CSS extracted to
co-located .module.css files. Assessment.tsx split into Assessment/
directory (index.tsx, ResultsScreen.tsx, Assessment.module.css).
New Logo component added.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>