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>
Full tab tree (panels → sections → tab-containers → tabs + open files) saved and
restored per project per device. FileEditorPanel extended with getCurrentFile().
.roject/ hidden from file tree listings. Boards, outline, and history updated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
File tree: open-state preserved on refresh, "Mark As Root Directory" moved
to context menu, "Open >" submenu for alternate editors, context menu label
truncated to filename (20 chars max). Page editor: mode buttons moved into
toolbar (sidebar removed). EditorConsole singleton + console-panel tab for
centralised message log with es-info header fade. openDocumentIn fix: derives
editorTag from panelElement.tagName, not registry. History folder renames
corrected (25-Friday→24-Friday, 30-Wednesday→30-Thursday, 31-Friday added).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Renames html-editor-panel → page-editor-panel and changes the handled
extension from .html/.htm to .page. The new editor introduces a structured
format (page-header / page-root / page-block / page-area / page-footer),
a block registry with Full Width and Two Columns templates, a two-mode
sidebar (Blocks / Areas), rich-text wrapSelection helper, auto-template
injection for empty files, sandbox="allow-same-origin" on the iframe,
and editor-style injection that is stripped before saving.
Adds a default-roject theme (dark BG, Barlow font, blue headings) embedded
as a <style> block in the page <head>, scoped to [data-theme="default-roject"]
on both <body> and <page-root>. Areas toolbar gains H1, H2, H3 buttons.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- editor-shell: redirect to / if not authenticated on load
- file-tree: open file in first clean matching panel, create new panel if all dirty
- Editor: add openDocumentIn() with targetElement for precise panel targeting
- panels: skip onDocumentOpened if targeted at a different panel
- FileEditorRegistry: add Godot extensions (gd, gdshader, gdshaderinc, gdinclude, glsl, tscn, tres, cs, gdextension)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>