Commit Graph

7 Commits

Author SHA1 Message Date
Jeff Emmett dc30b8f2e6 feat(rdocs): auto-scaffold "New Documents" notebook with blank note on first use
- Real spaces: if no notebooks exist after loadNotebooks(), auto-creates
  a "New Documents" notebook via API with a blank "Untitled" note inside
  it, expanded and opened for editing
- Demo mode: prepends "New Documents" notebook with blank starter note
  as the first item; auto-opens it on both fresh load and localStorage
  restore so rDocs always starts with a ready-to-edit blank document

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 13:37:47 -04:00
Jeff Emmett 6e9de87074 fix(rdocs): persist demo notebook state in localStorage
Demo mode edits were lost on page reload — now debounce-saved to
localStorage and restored on next visit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 13:26:11 -04:00
Jeff Emmett 195b42eb3b feat(collab): scope SVG cursors by active sub-document view
Remote cursor arrows and focus rings from peers viewing a different
note in rDocs are now suppressed. A generic viewId concept on the
collab overlay lets any rApp with sub-views opt in via a
rspace-view-change CustomEvent. Peers on a different view appear
dimmed in the people panel with a document icon hint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:17:29 -04:00
Jeff Emmett 0eb721d12e feat: object visibility membrane — per-object access filtering
Add per-object visibility levels (viewer/member/moderator/admin) across
all rSpace modules. Objects default to 'viewer' (open), so existing data
remains visible. Server-side GET handlers resolve caller role and filter;
MCP tools filter lists and check single-item access; frontend components
do defense-in-depth filtering with visibility picker (mod+) and lock badges.

- shared/membrane.ts: types + isVisibleTo, filterByVisibility, filterArrayByVisibility
- 9 schema files: visibility field on TaskItem, NoteItem, CalendarEvent, etc.
- 8 module routes: GET handlers filter by caller role
- 6 MCP tool files: list filtering + single-item visibility checks
- 4 frontend components: client filtering, picker, lock badges
- 18 unit tests (all passing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 11:09:44 -04:00
Jeff Emmett 53c757e68e fix: comprehensive memory leak and performance fixes across 44 files
Browser-side:
- Fix switchSpace() to LRU-evict idle space WebSocket connections (cap: 3)
- Add runtime.unsubscribe() to disconnectedCallback in 24 components
- Fix DocSyncManager.unsubscribe() to clean up syncStates, timers, listeners
- Fix 14 components leaking RAF loops, ResizeObservers, MutationObservers,
  document/window listeners, setIntervals, MapLibre WebGL contexts, and
  AbortControllers on disconnect
- Deduplicate Automerge WASM: module builds now use global shim from
  shell-offline instead of bundling ~2.5MB each (8 modules affected)

Server-side:
- Add LRU eviction to SyncServer.#docs (cap: 500, evicts idle docs with
  no subscribers, persists to disk before eviction)
- registerWatcher() now returns unsubscribe function

Data:
- Cap unbounded CRDT arrays: rexchange chatMessages (200), rcart events (200)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 22:26:24 -04:00
Jeff Emmett c6cb875ba4 feat(rcal): add Google Calendar sync integration with connectors menu
- Google Calendar API client (server/google-calendar.ts): token auto-refresh,
  list calendars, fetch events with incremental sync, create events, mapping
- OAuth scopes: added calendar.readonly + calendar.events, returnTo param
- rCal routes: subscribe, sync, sync-all, unsubscribe, push-to-Google endpoints
- Background sync loop: 10-minute interval with incremental sync tokens
- Frontend: calendar picker modal, sync button, per-event Google export
- MCP: source_type filter on rcal_list_events, new rcal_sync_google tool
- Connectors menu: Google shows services (Docs/Drive/Calendar) + calendar count,
  added Obsidian & Logseq as file-based connectors, Notion shows services
- Fix: import-export dialog API base corrected from rnotes to rdocs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 19:45:52 -04:00
Jeff Emmett de9cc21301 feat(rmeets): require username on join, fix settings/background, add MI toolbar
- Enable prejoin page so users must enter a display name before joining
- Add requireDisplayName, SETTINGS_SECTIONS, disableVirtualBackground config
- Add floating Meeting Intelligence button with recordings/search links
- Add chat, settings, participants-pane to folk-jitsi-room toolbar
- Also includes: rDocs module expansion, tab-cache/view-history updates,
  converter rewrites, MCP tool additions, OAuth fixes, backlog tasks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 14:06:47 -04:00