Files
DeepTutor/web
Bingxi Zhao (Frank) 86ff120668 fix(profile): harden avatar fallback, admin ring in sidebar, dedupe auth-status fetch
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>
2026-06-21 01:11:48 +08:00
..
2026-06-17 10:50:44 +08:00
2026-01-23 01:42:25 +08:00
2026-06-17 00:56:27 +08:00
2026-06-17 00:56:27 +08:00
2025-12-28 23:45:41 +08:00
2025-12-28 23:45:41 +08:00
2026-01-23 01:42:25 +08:00
2026-05-08 02:36:24 +08:00
2026-06-11 20:03:34 +08:00
2026-06-11 20:03:34 +08:00
2025-12-28 23:45:41 +08:00
2026-01-15 02:49:17 +08:00