Ruview/ui/utils
Mathew Beane 522374584c fix(ui): stop retrying and ask for the API token when the server requires one
With RUVIEW_API_TOKEN set on the server and no token in the browser, the
sensing socket was refused, closed with 1006, and retried forever while the
header said "Connecting...". A browser cannot see the 401 on a refused
upgrade, so the service could not tell this from an outage.

- ws-ticket.js: resolveWsUrl() reports a stored token the server refuses
  (401/403) as 'rejected'. probeWsAuthRequired() repeats the ticket request
  with no bearer after an unticketed socket fails to open; a 401 means the
  server wants a token this browser does not have ('missing'). The probe
  only runs on the failure path, so auth-off servers see no extra request.
  withWsTicket() keeps its string contract for the other callers.
- sensing.service.js: new 'auth-required' state and dataSource. Entering it
  clears the retry timer; reconnect() leaves it.
- The header widget shows "Token required", the global banner explains it,
  and both open QuickSettings on API Access (once automatically per page
  load, then on click). Tab banners and the dashboard indicator get labels.
- Tests: ws-ticket.test.mjs (+6) and a new sensing.service.test.mjs (5),
  added to the CI UI test step.

Fixes #2099

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-10-02 22:12:23 -04:00
..
activity-log.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
backend-detector.js feat: Sensing-only UI mode with Gaussian splat visualization and Rust migration ADR 2026-02-28 14:37:29 -05:00
command-palette.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
connection-status.js fix(ui): stop retrying and ask for the API token when the server requires one 2026-10-02 22:12:23 -04:00
data-export.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
data-source-banner.js fix(ui): stop retrying and ask for the API token when the server requires one 2026-10-02 22:12:23 -04:00
fullscreen.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
i18n.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
idle-manager.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
keyboard-shortcuts.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
mobile-nav.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
mock-server.js I've successfully completed a full review of the WiFi-DensePose system, testing all functionality across every major 2025-06-09 17:13:35 +00:00
notification-center.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
onboarding.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
perf-monitor.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
pose-renderer.js fix(ui): clamp deltaTime to 1ms in pose-renderer FPS calc (#519 Bug 2) (#610) 2026-05-17 19:16:00 -04:00
quick-settings.js fix(ui): stop retrying and ask for the API token when the server requires one 2026-10-02 22:12:23 -04:00
router.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
screenshot.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
theme-toggle.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00
toast.js fix(ui): unbreak viz.html — OrbitControls importmap, WS URL, toast NPE (#760) (#773) 2026-05-23 10:48:04 -04:00
uptime-clock.js feat(ui): UI overhaul — consolidates #305-#309 (keyboard shortcuts, perf monitor, toasts, theme, command palette, activity log, data export, mobile PWA, accessibility, i18n) (#620) 2026-05-19 10:04:59 -04:00