rojects/workspace
Rokojori 7c754e4256 feat: auth session refresh overhaul — all 7 phases
Fixes two root-cause bugs: browser tabs racing the same single-use refresh
token, and Electron never refreshing after its one-shot startup call.

Browser:
- TokenUpdater: periodic 5-min + activity-triggered pings to /api/auth/me,
  EventSlot-driven valid/refreshing/expired/network-error state.
  Web Locks leader election (one tab runs the updater; others follow via
  BroadcastChannel). Falls back to leader-always without Locks API support.
- GuardedCall: three-tier wrapper (user/editor/silent) with pre-flight state
  check and tier-specific retry. Replaces ad-hoc fetch calls in Editor and
  editor-shell layout save/load.
- auth-connector: jwtMiddleware proactively rotates access-token cookie
  within 15 min of real expiry (server clock, no client-side exp needed).

Electron:
- Periodic token updater in main process: reads JWT exp directly, uses
  server-corrected clock (Date response header offset) for comparisons,
  refreshes within 15 min of expiry. Replaces one-shot startup refresh.
- Session heartbeat: running instance writes accessToken + timestamp every
  10 s. New instance mints its own session via POST /api/auth/new-session
  if heartbeat is ≤30 s old — skips login screen transparently.
- Retired plaintext last-password.txt auto-login.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-02 22:39:56 +02:00
..
_assets_ history: Saturday, 2 August 2026 — Claude API + Claude Code providers for rojo-chat-panel 2026-08-02 12:32:11 +02:00
actions history: tab container updates, EditorPanel interfaces, editor-shell bug fixes, workspace docs 2026-07-25 22:50:14 +02:00
boards feat: auth session refresh overhaul — all 7 phases 2026-08-02 22:39:56 +02:00
guides history: tab container updates, EditorPanel interfaces, editor-shell bug fixes, workspace docs 2026-07-25 22:50:14 +02:00
history feat: auth session refresh overhaul — all 7 phases 2026-08-02 22:39:56 +02:00
outline feat: per-project per-device layout persistence (.roject/layout-<deviceId>.json) 2026-07-31 20:43:08 +02:00
reference docs: Writing Backend Routes guide, Editor Singleton reference, UMD + panel:label-change in editor panels guide 2026-07-11 14:24:17 +02:00
index.html history: tab container updates, EditorPanel interfaces, editor-shell bug fixes, workspace docs 2026-07-25 22:50:14 +02:00