feat(prefs): per-user UI font scale (A−/A+), saved to the profile
A header A−/value/A+ control scales the whole UI, persisted per user and restored on login from any booth — cloning the theme-pref pattern end to end. - DB: users.font_scale (migration 0014; percent, 100 = base, NOT NULL default). - Server: PUT /api/auth/font-scale (auth-guarded; clamps to 80–160, snaps to a 10-step); fontScale flows through sessionView → login + /me. - Client: setFontScalePref + applyFontScale; applied in App alongside theme; FontScaleToggle in the header; i18n sq+en. Scaling uses CSS `zoom` on the root, NOT root font-size: the app's type is pinned in px (text-[12px] etc., ~230 spots), which a font-size change would not scale — so the dense Active-sessions / Live-feed logs stayed tiny. `zoom` scales everything uniformly (text, spacing, icons) like the browser's Ctrl+/−, which is the readability win for operators who need larger text. Tests: 4 font-scale auth-route cases (persist + /me, clamp/snap, 400, default-100). Full workspace build/lint/test green. Claude-Session: https://claude.ai/code/session_01Xcm6ikLgGoCxxHrxtjkk5V
This commit is contained in:
+19
@@ -1810,3 +1810,22 @@ never disagree. A test (lane-presence.test.ts) caught a real bug: the first cut
|
||||
`relayForPresence`, so the EXIT lane never resolved (entry-gated) and never blinked —
|
||||
`presenceLaneOf` fixes it. Full workspace build/lint/test green (185 server tests). Updated
|
||||
[[button-light-indicator]] (new "On-screen twin" section).
|
||||
|
||||
## [2026-06-28] fix+feat | Booth feed plate backfill, plate search, + per-user font scale
|
||||
Three booth fixes + one prefs feature:
|
||||
- **Plate not showing until refresh (fixed).** Plate recognition is async/advisory
|
||||
(snapshot.ts recognizePlate → a kind:"read" device_event keyed by session identity), so it
|
||||
lands AFTER the entry/exit event already shipped over the WS without a plate. Added a
|
||||
`plate-recognized` bus event (device-events.ts) emitted when the read is written; ws.ts
|
||||
forwards it; the client `patchPlate(identity,plate)` (live-store) backfills the already-
|
||||
rendered feed row in place and invalidates the Query-owned active-sessions list. No refresh.
|
||||
- **Plate search didn't filter (fixed).** Both the live-feed (BoothScreen) and active-sessions
|
||||
(ActiveSessions) search haystacks used the wrong field — the plate is the ENRICHED top-level
|
||||
`e.plate`/`s.plate` (set by enrichEvent), not `payload.plate` (plate is unsigned, never in the
|
||||
payload). Switched the haystacks to the displayed field.
|
||||
- **Per-user font scale (new).** A header A−/value/A+ control scales the root font-size app-wide
|
||||
(rem-based tokens scale proportionally), persisted on `users.font_scale` (migration
|
||||
0014_user_font_scale, percent 100=base, clamp 80–160 step 10) and restored on login — cloning
|
||||
the theme-pref pattern end to end (PUT /api/auth/font-scale, sessionView, setFontScalePref,
|
||||
applyFontScale in App). i18n sq+en. Tests: 4 font-scale auth-route cases (persist+/me, clamp/
|
||||
snap, 400, default). Full workspace build/lint/test green (189 server tests).
|
||||
|
||||
Reference in New Issue
Block a user