Commit Graph
5 Commits
Author SHA1 Message Date
g-butandClaude Sonnet 4.6 e79a329aff fix(admin): add maxLength to AdminNotesForm and ProgrammeAssignmentForm textareas
Both admin note fields lacked maxLength enforcement on the client despite
server Zod schemas using PATIENT_NOTE_MAX_LENGTH. Now consistent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 03:18:56 +02:00
g-butandClaude Sonnet 4.6 d694067f43 fix(network,ssot): try/catch admin components + DOCUMENT_MAX_FILE_SIZE_MB constant
Network error handling:
- DocumentAddForm, ProgrammeAssignmentForm, InlineMessageCompose,
  AdminNotesForm all lacked try/catch — buttons stuck on network failure

SSOT fix:
- Added DOCUMENT_MAX_FILE_SIZE_MB = 20 to lib/config/portal.ts
- Upload route now derives MAX_BYTES from the constant instead of
  hardcoding 20 * 1024 * 1024
- DocumentAddForm label now reads the constant instead of 'max 20 MB'
  — changing the limit in one place updates validation + UI label

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 02:43:56 +02:00
g-butandClaude Sonnet 4.6 09524dac1a fix(a11y): add htmlFor/id pairs and aria-labels to unlabelled form inputs
- ProgrammeAssignmentForm: 4 standalone labels missing htmlFor — added id
  to all inputs/selects (prog-programme, prog-phase, prog-start-date, prog-notes)
- AdminNotesForm: textarea missing label — added aria-label="Clinical note"
- InlineMessageCompose: subject input and body textarea missing labels —
  added aria-label; also fixed missing type="button" on expand button
- portal messages/[threadId]: reply textarea — added aria-label="Message"
- admin messages/[threadId]: reply textarea — added aria-label="Reply"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 01:27:45 +02:00
g-butandClaude Sonnet 4.6 824dcb146a fix(routing): redirect locale-prefixed portal URLs to canonical
/en/dashboard, /de/profile, etc. now redirect to /dashboard, /profile
instead of 404ing. The intlMiddleware only handles marketing pages;
portal routes must be stripped of their locale prefix first.

Also refactors DocumentAddForm, InlineMessageCompose, AdminNotesForm
to replace all inline styles with admin.module.css classes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 09:29:38 +02:00
g-butandClaude Sonnet 4.6 785b923e25 feat(ui): portal nav overhaul, clinical goals UI, check-in, accessibility + readability fixes
Navigation & layout:
- PortalNav: icon sidebar with 4 groups, active state with teal left border
- BottomNav: fixed mobile bottom tab bar (5 items, safe-area-inset-bottom)
- NavBreadcrumb: route-aware header breadcrumb
- UserDropdown: escape key close, aria-expanded ring, quick check-in link

Portal features:
- Check-in page: 1-10 scale for mood/energy/sleep/stress
- PatientGoalsCard: admin goal CRUD with progress bars
- Dashboard: active clinical goals section
- ProfileCompletenessBar uses profileCompletenessColor()
- Admin patient detail decomposed into card components

Accessibility & readability:
- html font-size 112% - raises all rem values ~12% site-wide
- --muted darkened to #71727c (WCAG AA 4.5:1 on white)
- Hero eyebrow 0.6rem to 0.72rem, pill 0.58 to 0.68rem, sub contrast fixed
- Nav links 0.68 to 0.75rem
- LanguageSwitcher: pill container, mobile visible (was hidden), 0.62 to 0.72rem
- scaleBtn min-height 2.75rem (44px touch target)

Hero fix: .heroR justify-content flex-end (was center) aligns both columns

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 11:00:05 +02:00