Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.
Release notes: assets/releases/ver1-6-4.md
Follow-up nits on the #573 profile/avatar work:
- UserAvatar: validate an icon marker's icon/color against the known sets and
fall back to the deterministic avatar for unknown values. The backend
_ICON_MARKER_RE accepts any [a-z0-9-] color, so a hand-set marker like
"icon⭐bogus" previously rendered an invisible avatar
(AVATAR_COLORS[unknown] === undefined).
- ProfileLink: pass role to UserAvatar so admins get the amber ring in the
sidebar, matching the "amber ring at every size" intent.
- useAuthStatus: share one in-flight /api/v1/auth/status request across the
hook's consumers (sidebar Admin/Logout/Profile links) so a page load makes a
single call instead of one per consumer; cleared once settled so a later
mount (after login/logout) refetches.
Verified: tsc, eslint, web node tests (142).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two gaps in the PR's frontend changes:
1. Client auth awareness was permanently false. api.ts/auth.ts read
process.env.DEEPTUTOR_AUTH_ENABLED in browser code, but Next.js only inlines
NEXT_PUBLIC_ vars into the bundle — so the Sign-out / Admin affordances never
rendered and apiFetch's 401 -> /login redirect never fired when auth was on.
Resolve auth state at runtime from the backend instead: fetchAuthStatus()
records it via setRuntimeAuthEnabled(), and components observe it through the
new useAuthStatus() hook. Works on Docker (read-only rootfs), PyPI, and dev
with no build-time baking. (The server-side gate in proxy.ts is unaffected.)
2. KB document uploads >10MB were truncated. All /api/* now flows through the
proxy, whose body buffer defaults to 10MB while the backend accepts 100MB
(DocumentValidator.MAX_FILE_SIZE). Raise experimental.proxyClientMaxBodySize
to 110MB so uploads aren't silently cut off.
Adds a regression test that a 401 does NOT redirect when auth is disabled.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>