Commit Graph

570 Commits

Author SHA1 Message Date
Jeff Emmett 2bb01c5240 Merge branch 'dev' 2026-03-04 19:36:17 -08:00
Jeff Emmett 991c0ed8a5 chore: remove rDocs and rDesign from module registry
Placeholder modules not yet built out as full rApps. Removes them
from the dropdown/tab bar until they have proper schemas, components,
and local-first support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:36:10 -08:00
Jeff Emmett 3c26addeae fix: defer tab bar active state until switchTo() resolves
The tab bar was setting its `active` attribute synchronously on click,
before TabCache.switchTo() finished fetching and injecting the new pane.
This caused a visual desync where the tab highlighted immediately but
the content area showed a blank flash or stale content.

Now the tab bar dispatches the layer-switch event without changing its
own active state. The shell event handler sets active only after
switchTo() confirms the pane is ready, eliminating the race condition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:32:38 -08:00
Jeff Emmett b28b551ee1 Merge branch 'dev' 2026-03-04 19:20:08 -08:00
Jeff Emmett e1688e8456 feat: canvas-first rFlows with flow storage, retrieval, and management
Open rFlows directly into the interactive canvas instead of the landing
page. Adds a full flow storage system (Automerge for authenticated users,
localStorage for demo/anon) with CRUD operations, auto-save with 1.5s
debounce, flow switching via toolbar dropdown, and a management modal
for rename/duplicate/export/import/delete. Viewport state (zoom/pan)
persists per-flow in localStorage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:19:57 -08:00
Jeff Emmett 02547fbe47 Merge branch 'dev' 2026-03-04 19:16:53 -08:00
Jeff Emmett cbe9fb5103 feat: add interactive canvas to rNetwork + rSocials canvas view
rNetwork: upgrade folk-graph-viewer with pan/zoom/drag, fitView, touch
pinch-zoom, zoom controls, persisted node positions, and incremental
drag updates. rSocials: new folk-socials-canvas component with campaign
and thread card nodes, Postiz slide-out panel, and canvas interactions.
Default / route now renders canvas view; old feed moved to ?view=feed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:16:46 -08:00
Jeff Emmett 741a519a30 fix: add wasm plugin to shell.js build for Automerge runtime
The shell now imports RSpaceOfflineRuntime which transitively pulls in
Automerge WASM. Without the wasm() plugin and esnext target on the
shell build step, vite fails with "ESM integration proposal for Wasm
is not supported".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:16:36 -08:00
Jeff Emmett 798a5edb65 Merge branch 'dev' 2026-03-04 19:12:15 -08:00
Jeff Emmett b2b5644f94 feat: add service worker precaching for cold-start offline support
Generate precache-manifest.json at build time by scanning dist/ for all
cacheable assets. SW fetches the manifest during install and precaches
core shell assets (shell.js, shell.css, theme.css, HTML pages) immediately.
Module JS/CSS bundles are lazy-cached in the background after activation.

Bumps CACHE_VERSION to rspace-v2 to trigger SW update and cache cleanup.
The app can now load fully offline even after browser restart with no network.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:12:05 -08:00
Jeff Emmett afc66ac4c1 Merge branch 'dev' 2026-03-04 19:08:09 -08:00
Jeff Emmett 4cc420d0f6 feat: wire offline-first Automerge sync to all 13 rSpace modules
Add shared RSpaceOfflineRuntime singleton that coordinates IndexedDB
persistence (EncryptedDocStore), WebSocket sync (DocSyncManager), and
in-memory Automerge docs (DocumentManager) for all module web components.

- Phase 0: runtime.ts singleton, shell integration, beforeunload flush
- Phase 1: rstack-offline-indicator status dot in shell header
- Phase 2: service worker stale-while-revalidate for API GETs + offline fallback
- Phase 3: storage-quota.ts with LRU eviction (30d) and quota warnings (70%)
- Phase 4: Tier 1 single-doc modules (rFlows, rCal, rBooks, rSplat)
- Phase 5: Tier 2 multi-doc modules (rNotes, rWork, rInbox, rVote, rTrips, rFiles)
  with doc-list-request/response wire protocol for document discovery
- Phase 6: Tier 3 special cases (rCart hybrid, rForum global doc, rSchedule)

Data now loads instantly from IndexedDB, syncs via WebSocket when online,
and remains browsable offline. rNotes migrated from inline Automerge WS
to shared runtime. All modules fall back to REST when runtime unavailable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 19:07:59 -08:00
Jeff Emmett b86747d4e1 Merge branch 'dev' 2026-03-04 18:31:36 -08:00
Jeff Emmett f62da0841c feat: redesign rCal timescale bar as bottom spectrum slider
Replace discrete dot-tick zoom controller with a continuous gradient
spectrum slider at the bottom of the calendar. Move lunar overlay and
its toggle to the bottom bar. Add drag + touch support on the slider
thumb for smooth timescale navigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:28:04 -08:00
Jeff Emmett e9e257cc15 Merge branch 'dev' 2026-03-04 18:14:34 -08:00
Jeff Emmett e827229447 feat: show rSocials landing page on space subdomains
Space subdomain /rsocials now renders the same marketing landing page
as the bare domain, instead of the bare Community Feed placeholder.
Demo space still shows the demo feed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:14:14 -08:00
Jeff Emmett 2428fcdf78 Merge branch 'dev' 2026-03-04 18:03:19 -08:00
Jeff Emmett a90e339323 feat: inline config panel for rFlows elements with tabbed Config/Analytics/Alloc
Double-clicking a flow element now opens a rich tabbed panel below the node:
- Config tab: form inputs (label, thresholds with range sliders, source type, status)
- Analytics tab: live-updating fill bars, conic-gradient outflow/overflow donut, stats
- Allocations tab: read-only allocation breakdowns with colored dots
- Simulation overlay preserved during ticks, analytics accumulate per-node metrics

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:03:09 -08:00
Jeff Emmett 627277303e Merge branch 'dev' 2026-03-04 18:02:38 -08:00
Jeff Emmett 3b3eecdddb fix: stop demo→personal space redirect and clean up space switcher
Logged-in users visiting demo.rspace.online were auto-redirected to
their personal space on page load. Now only provisions the space
silently without redirecting. Also removes the redundant "Public
spaces" section from the dropdown and filters the /api/spaces endpoint
to only return demo, user's own spaces, and permissioned spaces.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:02:00 -08:00
Jeff Emmett bbbb7a16fb Merge branch 'dev' 2026-03-04 17:49:48 -08:00
Jeff Emmett 2bc1b78f30 fix: make active tab local-only, stop Automerge from overriding it
The active tab was stored in Automerge's shared doc (activeLayerId),
causing different browser windows/sessions to fight over which tab
is highlighted. When one window switched to rInbox, another window
showing rFlows would have its tab bar update to highlight rInbox
while still displaying rFlows content.

Changes:
- Active tab is now always determined locally by the URL/currentModuleId
- Automerge sync only manages the tab LIST (which modules are open)
  and flows, not which tab is active
- Removed sync.setActiveLayer() calls on tab switch
- Removed activeLayerId reads from Automerge on connect and on
  remote change events
- TabCache continues to manage active state correctly when switching
  tabs within the same page load

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:49:40 -08:00
Jeff Emmett 4f271a469a Merge branch 'dev' 2026-03-04 17:31:38 -08:00
Jeff Emmett 0bf3b3430c fix: rFlows canvas two-finger scroll pans instead of zooming
Wheel without Ctrl/Meta now pans (trackpad two-finger scroll, mouse
wheel). Ctrl+wheel and trackpad pinch zoom with reduced sensitivity
(0.003 multiplier vs old binary 0.9/1.1 toggle).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:31:31 -08:00
Jeff Emmett 279450c00d Merge branch 'dev' 2026-03-04 17:29:11 -08:00
Jeff Emmett 57fd1f4913 fix: always show Demo Space at top of space switcher dropdown
Adds a permanent "Demo Space" entry as the first item in the space
switcher dropdown across all rApps. Previously demo only appeared
in the "Public spaces" section (if the API returned it), making it
easy to miss. Now it's always visible at the top with a game
controller icon, followed by the sign-in/personal space CTA.

Also filters demo out of the "Public spaces" section to avoid
showing it twice.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:29:04 -08:00
Jeff Emmett 7dfe69d861 Merge branch 'dev' 2026-03-04 17:03:12 -08:00
Jeff Emmett e954386489 feat: add animated SVG visuals to rFlows landing page
Three inline CSS/SVG animations demonstrate key concepts:
- Hero: 3-funnel flow diagram with animated particles, threshold lines,
  rising/falling fill levels, and flowing dashed edges with % labels
- How It Works: Sankey-style river view with multiple flowing bands
  showing Revenue/Grants splitting to Team A/B/Reserve
- Funnel Model: animated water level cycling through overflow/healthy/
  critical zones with overflow arrow that appears at peak fill

All animations are pure SVG/CSS (zero external assets), responsive,
and hidden on screens <480px. Replaces the static funnel metaphor
text block with a side-by-side animated funnel + zone descriptions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:03:06 -08:00
Jeff Emmett aab0f42ef5 feat: rewrite rFlows landing page with compelling format + save-to-space CTA
Replaces the technical-heavy landing with an approachable informational page:
- Hero with "Design Funding Flows That Respond to Reality" headline
- 4-card "What rFlows Does" feature grid with gradient icon boxes
- Numbered "How It Works" steps (Define → Wire → Simulate & Save)
- 6-card use cases section (DAOs, grants, revenue sharing, etc.)
- Cleaned up funnel model visual
- Expanded ecosystem (rWallet, rVote, rData)
- "Under the Hood" tech section (Flow Engine, EncryptID, CRDT, local-first)
- "Save Flow to Space" CTA pattern throughout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 17:00:38 -08:00
Jeff Emmett fbeb3743b2 Merge branch 'dev' 2026-03-04 16:46:46 -08:00
Jeff Emmett 707d83525b fix: responsive header dropdowns + space switcher on all pages
- Remove overflow:hidden from header__left on mobile (was clipping
  app-switcher and space-switcher triggers)
- Add white-space/overflow/text-overflow to both trigger buttons so
  they truncate gracefully on narrow screens
- Add <rstack-space-switcher> to module landing and sub-page info
  shells so the spaces dropdown always appears next to the rApps dropdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 16:46:40 -08:00
Jeff Emmett e86ae0c352 Merge branch 'dev' 2026-03-04 15:47:40 -08:00
Jeff Emmett e2ebd11d75 style: differentiate rApp tab headers with borders and spacing
Inactive tabs get a subtle background tint, hover/active tabs show
visible borders, active tab uses solid surface background. Wider gap
between tabs and full-width indicator line for clearer separation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 15:47:20 -08:00
Jeff Emmett 16ef872b8d Merge branch 'dev' 2026-03-04 15:13:09 -08:00
Jeff Emmett 497bfd3db7 fix: migrate rNetwork components to theme variables for dark/light mode
Replace 60+ hardcoded hex colors in folk-graph-viewer and folk-crm-view
with var(--rs-*) CSS variables. Add city/location data to graph API query
so graph nodes show the same location info as the CRM view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 15:12:58 -08:00
Jeff Emmett 683b96e5cc Merge branch 'dev' 2026-03-04 15:11:28 -08:00
Jeff Emmett ebecfe4983 fix: app-switcher sidebar invisible due to backdrop-filter containing block
backdrop-filter on .rstack-header created a CSS containing block that
trapped the sidebar's position:fixed, giving it zero height. Moved the
backdrop-filter and background to a ::before pseudo-element so the header
no longer traps fixed-positioned children.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 15:11:16 -08:00
Jeff Emmett ffa74c3948 Merge branch 'dev' 2026-03-04 14:13:32 -08:00
Jeff Emmett 1758ce9416 feat: compact +photo icon replaces image bar in Thread Builder
Replace the always-visible Upload/AI button bar below each tweet with a
compact camera icon in the top-right corner that fades in on hover and
expands into a dropdown menu. Hides when an image is already attached.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 14:13:20 -08:00
Jeff Emmett 932b60998b Merge branch 'dev' 2026-03-04 13:18:01 -08:00
Jeff Emmett 93e8ce8479 feat: per-tweet image upload/generate in Thread Builder
Each tweet in a thread can now have its own image — uploadable or
AI-generated via inline buttons in the preview cards. Images persist
across save/load, display in read-only view, and clean up on delete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 13:17:51 -08:00
Jeff Emmett 034f4b0bb1 Merge branch 'dev' 2026-03-04 13:04:41 -08:00
Jeff Emmett 5f2997d75d feat: rFlows funnel improvements — symmetry fix, rate labels, speed slider, overflow visuals, timeline, fill animation
- Fix asymmetric left taper curve control point in funnel SVG path
- Add inflow/spending/overflow rate labels on funnel nodes
- Add vertical speed slider (20ms–1000ms) visible during simulation
- Improve overflow pipes: wider burst, 1.3x stroke, round caps, animated splash
- Add timeline progress bar at canvas bottom during simulation
- Add CSS transitions on funnel fill rects for smooth animation
- Faster overflow edge animation (0.5s) with round line caps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 13:04:18 -08:00
Jeff Emmett 65009e3a5a Merge branch 'dev' 2026-03-04 13:01:07 -08:00
Jeff Emmett 50054d599e feat: clickable/draggable edges with proportional width sizing in rFlows
Edges are now interactive: click to select (purple highlight), double-click
to open source node editor, drag midpoint handle to add curve waypoints.
Edge stroke widths are directly proportional to allocation percentage
instead of normalized to the largest flow amount.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 13:00:58 -08:00
Jeff Emmett 659e203d6a Merge branch 'dev' 2026-03-04 12:55:16 -08:00
Jeff Emmett 9c6c8c8dab fix: migrate all rApp components to theme variables for dark/light mode
Replace hardcoded dark-specific colors with CSS custom properties across
rcal, rflows, rbooks, rschedule, rtrips, and rwork modules. Adds
[data-theme="light"] overrides for rFlows node type buttons, danger
buttons, and overlay elements. SVG fills switched to style attributes
for theme variable support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 12:55:07 -08:00
Jeff Emmett 58c4aaa4b9 Merge branch 'dev' 2026-03-04 12:16:29 -08:00
Jeff Emmett 59bdd741be feat: bare-domain sub-pages show info/marketing pages + save-gate
Bare-domain URLs like rspace.online/rsocials/thread now render an info
page with CTAs instead of silently serving the functional app. The
functional app only appears inside a {space} context (e.g.
demo.rspace.online/rsocials/thread). API routes still pass through.

- Add SubPageInfo interface to shared/module.ts
- Add renderSubPageInfo() renderer to server/shell.ts
- Modify bare-domain routing: api/ passthrough → info page → demo fallback
- Add subPageInfos to 8 modules (rsocials, rflows, rnetwork, rtrips,
  rbooks, rphotos, rinbox, rsplat)
- Add window.__rspaceSaveGate() auth prompt on write operations
- Wire save-gate into rsocials Thread Builder save handler

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 12:16:17 -08:00
Jeff Emmett f51581ef59 Merge branch 'dev' 2026-03-04 11:57:02 -08:00