Users on an older SW built before rpast existed saw a cached
/rpast shell with an outdated module list (rmail/rfunds/rwork/...).
Bumping the cache version forces activation-time cleanup to drop
the old entries on next visit.
Stale cached HTML fragments referenced old asset hashes (e.g. 404 on
canvas-PlYnCtxh.js while server has canvas-R4rXE5Sc.js) after frequent
rebuilds. Bumping CACHE_VERSION and the SW registration query string
forces the new SW to install and purge all old versioned caches on
activate.
- Add saveDocImmediate() for synchronous awaitable saves (no debounce)
- Add SyncServer.flushAll() to iterate all in-memory docs
- Fix eviction race: onDocEvict now uses saveDocImmediate instead of
debounced saveDoc (which could fire after doc deleted from memory)
- Add SIGTERM/SIGINT handlers with 10s timeout safety net
- Add visibilitychange flush on client (reliable on mobile/bfcache)
- Flush pending IDB saves in DocSyncManager.disconnect()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Persistent chat panel accessible from any page via header icon.
Sliding right panel (360px) with channel selector, message feed,
composer, and unread badge. REST polling with localStorage state
persistence. Includes unread-count API endpoint for badge updates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gov shapes (quadratic, conviction, multisig, sankey), exchange node,
and ASCII gen existed in lib/ with ports + serialization but were never
imported/defined/registered in canvas.html — now wired with toolbar
buttons, SHAPE_TO_MODULE gating, and click handlers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Guard SW controllerchange to only reload on updates (not first install),
remove duplicate SW registration from canvas.html, skip async module
fetch when shell already provided data, hide module-gated toolbar items
by default via CSS. Also collapse toolbar on click-off.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Panel now opens to the right of the vertical toolbar (desktop) or left
(mobile), aligned vertically with the clicked group.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Store shape listener refs in Map, remove in unregisterShape() (critical leak)
- Compact Automerge history every 500 changes via clone() to cap WASM heap
- Clean shapeLastPos entries on shape removal
- Store outside-click handler ref, clean up in disconnectedCallback()
- Cap MI messages at 50 and prompt messages at 30 to prevent unbounded growth
- Store keep-alive interval handle
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Office documents dropped onto canvas or imported via rDocs are now converted
to Markdown using Microsoft's markitdown CLI. Canvas drops trigger triage;
rDocs imports create rich notes with the original file kept as an attachment.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add /api/auth/*, /api/register/*, /api/account/* proxy routes to
rspace-online server, forwarding to encryptid container internally.
This eliminates cross-origin requests that Safari blocks via ITP or
Cloudflare security challenges.
- Change client auth URLs from https://auth.rspace.online to same-origin
in rstack-identity, rspace-header, login-button, and session modules.
- Add PRF extension try/catch fallback in webauthn.ts — Safari throws
TypeError on the unsupported PRF extension, now retries without it.
- Bump SW cache version v7→v8 to bust stale cached bundles.
Fixes passkey login for Safari/macOS users (e.g. christina) who were
getting "Network error when attempting to reach resource".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New folk-holon-explorer shape unifying H3 geospatial holons and nested
rSpace spaces into a zoomable circular navigator with appreciation weight
normalization and MetatronGrid sacred geometry background. Endorsements
logged to trust engine via new POST /api/trust/endorse endpoint.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shapes deleted (forgotten) by a user no longer reappear on reload —
forgottenBy[localDID] filtering in #applyDocToDOM and #applyPatchesToDOM
means one delete = gone permanently for that user while preserving CRDT
data for others.
IntersectionObserver on FolkShape base class defers heavy init (API calls,
iframes, feed polling) until shapes enter viewport (+500px margin),
reducing initial load from 100+ concurrent requests to ~5-10 visible.
Also: folk-rapp #getModulePath always uses subdomain routing (no subpath
fallback), and DID re-syncs on auth-change events.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Repositions the vertical shape-add toolbar (Write, Embed, AI, etc.) from
the fixed bottom-right corner to sit immediately right of the centered
bottom drawing toolbar. Prevents overlap with the bug report button.
JS dynamically positions on load/resize; mobile retains bottom-right.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
New folk-makereal shape converts hand-drawn wireframes into functional
HTML/CSS using Gemini Flash 2.5 vision. Drawing canvas + live iframe
preview with framework selector (HTML/Tailwind/React), code view toggle,
and copy/open-tab actions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Split layout: drawing canvas (left) + AI result (right)
- Prompt input with Generate button using /api/image-gen/img2img
- Auto-generate toggle: debounced generation after each stroke
- Provider selector (fal.ai / Gemini) and strength slider
- Loading spinner overlay with shimmer animation
- Image preloading before display for smooth transitions
- Port descriptors for folk-arrow connections (prompt, sketch, image)
- Wider default size (700x520) for split view
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds Figma-style threaded comment markers anchored to data-collab-id
elements across all module pages. Comments stored in per-space Automerge
doc, synced via existing local-first stack. Bell is now context-aware
(canvas pins on canvas, module pins on module pages). Notifications
route through existing WS/push/email system with new module_comment
and module_mention event types.
New files: module-comment-types, module-comment-schemas,
rstack-module-comments component. Updated: shell, comment bell,
notification routes. Added data-collab-id to crowdsurf, rtime, rmeets.
Fixed pre-existing SKILL_LABELS import error in rtime/mod.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
HMAC-signed stateless tokens let external respondents vote on rChoices
polls or RSVP to rCal events via a single tap — no account required.
Routes mounted at /respond/:token bypass space auth. Typed EventAttendee
schema replaces unknown[] on CalendarEvent.attendees. Invite endpoints
on both modules generate tokens and optionally send email invitations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rtasks fetch calls were missing Authorization Bearer headers, causing 401s
on private/permissioned spaces. Added authHeaders() helper using encryptid-token
from localStorage (matching pattern in folk-feed, folk-multisig-email, etc.).
Also includes: due date field, task detail panel, search/filter, column editor,
board PATCH endpoint, and canvas toolbar repositioned to bottom-right corner
(collapsed wrench icon on all screen sizes, panel opens leftward).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reverts 4420d9c — the FAB change was applied to the wrong component.
The intended target is the rSpace canvas toolbar, not the app switcher.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The old service worker cached the root URL (/) as a 301→/rcal during
the standaloneDomain misconfiguration. Bumping the SW cache version
forces a full cache purge on next activation, clearing the stale
redirect for all users.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Repositions the rApp switcher as a floating action button in the bottom-right
corner that expands upward into a rounded panel. Removes all sidebar push-offset
CSS since the panel now overlays content without layout shift.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable pasting structured shape data from tldraw, Excalidraw, and generic
JSON into the rSpace canvas, with automatic type conversion and viewport
centering. Ctrl+C on selected shapes writes rSpace JSON to clipboard for
round-trip paste or external consumption.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Modules now declare their canvas shapes and AI tools (canvasShapes/canvasToolIds
on RSpaceModule), creating a single source of truth that the canvas enforces:
- Phase 1: Extended RSpaceModule + ModuleInfo, added moduleId to CanvasToolDefinition
with getToolsForModules() filter, added moduleOf() to ShapeRegistry, populated
declarations in 9 modules, fixed 8 ungated toolbar buttons (rchoices, rwallet, rsocials)
- Phase 2: AI prompt sends enabledModules, server filters Gemini tool declarations
- Phase 3: folk-commitment-pool and folk-task-request show lock overlay when rtime disabled
- Phase 4: Extracted MODULE_META into shared lib/module-display.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two new FolkShape subclasses enable drag-from-pool-to-task interactions on
the canvas. Orbs dragged from the commitment pool highlight matching skill
slots on task request cards and POST connections via the rTime API. Adds
commitment_requested notification type so commitment owners are notified
when their time is requested.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add folk-mermaid-gen web component: AI-powered diagram generation via
Ollama, client-side SVG preview via mermaid.js, animated GIF export via
mermaid.rspace.online API
- Register in canvas tools, toolbar, and shape registry
- Add role selector dropdown to share panel invite form (backend already
supports role parameter)
- Fix pre-existing TS errors: SankeyNode missing address field,
SpaceMember type mismatch in WebSocket auth fallback
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move RSpaceOfflineRuntime, CommunitySync, OfflineStore, and
RStackHistoryPanel into a new shell-offline.ts chunk loaded via
dynamic import(). This removes ~2.5MB of Automerge WASM from the
critical path, reducing blocking JS from ~960KB to ~150KB brotli.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- App switcher: only show "Manage rApps" when there are actually
disabled modules or active restrictions. Move "Available to Add"
above "Remove" to prioritize adding. Eliminates duplicate module
listing when all modules are enabled.
- Shell: update app switcher on modules-changed event (was only
updating tab bar and folk-rapp, not the sidebar itself).
- SMTP: use space-agent@rspace.online as From for invite/approval
emails with proper envelope sender for DKIM alignment.
- Shell CSS: fix banner z-index, smooth header transition on banner.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove duplicate purple update banner from website/shell.ts that overlapped
with the server/shell.ts banner. Now a single banner system:
- Browser: "Install rSpace app" prompt (via beforeinstallprompt)
- Installed PWA: "New version available" prompt (via SW update detection)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TabCache.init() wraps all #app children into a .rspace-tab-pane div,
breaking the flex layout introduced in 2cbff89. Make active panes flex
columns so subnav/tabbar/rapp-content flex properties are respected.
Wrap fragment-loaded content in .rapp-content for consistent scrolling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove rstack-space-settings slide-out panel. Enhance the existing tabbed
modal in rstack-space-switcher with add-member (username search + email
invite) and pending email invites (with revoke). Header gear now calls
openSettingsModal() on the space switcher instead of toggling the old panel.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Make #app a flex column with height:100vh so all rApps fill the viewport
exactly. Wrap module body in .rapp-content flex child. Replace all
hardcoded calc(100vh - Npx) with height:100% across 20+ components.
Remove sticky positioning from subnav/tabbar (now flex items).
Generalize mobile body-flex to all pages (not just canvas-layout).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Install banner appears above header when beforeinstallprompt fires
(dismissed state persisted in localStorage, never shows again)
- Update banner appears when a new SW version is detected waiting
(click "Update" → SKIP_WAITING message → SW activates → page reloads)
- SW no longer auto-skipWaiting on install; waits for client message
- Bumped SW cache version to v5 and registration to ?v=5
- Banner CSS: fixed at top, z-index above all chrome, slide-in animation
- Header/tab-row/app offsets adjust when banner visible
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On desktop the header is position:fixed which creates a stacking
context, containing the MI bar's z-index:10001. On mobile the header
switches to position:sticky without z-index, so no stacking context
is created and the MI bar's z-index leaks out above the tab row
(z-index:9998). Fix by adding z-index:9999 to the header on mobile.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The MI bar (header center section) was wrapping to a full-width
third row on mobile, overlapping the rApp slider tab bar below it.
Hide both the MI bar and its header container on mobile. Users can
still access MI via Cmd+K or the floating pill.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The minimize toggle now lives at the right edge of each rApp's subnav
bar instead of the tab row. When minimized, both header and tab row
slide up and the subnav becomes a thin fixed strip with just the
restore chevron. Every rApp already has a subnav (except canvas which
has its own chrome).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the demo exclusion guard so demo space gets the full offline
runtime, WebSocket presence relay, and Automerge sync.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a [^] chevron button at the right end of the tab row that collapses
all header bars into a thin 24px restore strip. State persists via
localStorage across page reloads. Works on both desktop (fixed) and
mobile (sticky) layouts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Expand MI system prompt "Available shape types" from 20 → 48 shapes,
organized by category (Core, AI, Creative, Social, Decisions, Travel,
Tokens, Geo, Video)
- Expand Shape Mapping Rules from 12 → 30 triage rules covering all
shape types with prop hints
- Expand KNOWN_TRIAGE_SHAPES from 15 → 48 so Gemini triage no longer
silently downgrades unknown shapes to folk-markdown
- Add 22 missing TOOL_HINTS to mi-tool-schema.ts (travel, tokens, CAD,
creative, geo, meta shapes) for keyword-based chip suggestions
- Add all 48 shapes to SHAPE_ICONS in mi-triage-panel.ts (was 13)
- Register folk-image-studio and folk-transaction-builder in canvas.html
(were ghost shapes — imported but never defined/registered)
- Add SHAPE_DEFAULTS for folk-social-thread/campaign/newsletter,
folk-design-agent, folk-image-studio
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Import, define, and register folk-social-thread, folk-social-campaign,
and folk-social-newsletter in canvas.html so they're available on any
canvas across rSpaces, rSchedule, rFlows, etc.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Keep side toolbar at bottom: 8px in both open and collapsed states
so the minimize/maximize toggle stays in the same spot
- Shift bottom-toolbar left (left: 56px) to clear the corner-tools
zoom icon and prevent overlap with the selector tool
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ?v=4 to all SW registration URLs to bypass stale CF CDN cache
- Set Cache-Control: no-cache for sw.js and manifest.json so future
SW updates are never blocked by CDN caching
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>