Commit Graph

156 Commits

Author SHA1 Message Date
Jeff Emmett ec83f5c9c1 feat: replace rSocials canvas with n8n-style campaign planner
Add flow-based campaign planner with draggable Post/Thread/Platform/
Audience/Phase nodes, port wiring, 3 edge types (publish/sequence/
target), inline config panels, context menu, keyboard shortcuts,
touch gestures, and Automerge local-first persistence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:18:30 -08:00
Jeff Emmett d8f9f46515 feat: rFlows visual redesign — HTML card nodes, Sankey widths, smooth drag
- Switch source/outcome nodes from SVG shapes to foreignObject HTML cards
  with white backgrounds, gradient headers, status badges, and progress bars
- Add foreignObject text overlay to funnel nodes (keep SVG tank shape)
- Fix Sankey edge widths: flow-value-relative formula instead of percentage
- Smooth drag: rAF throttle + lightweight edge path patching during drag
- Add dot grid canvas background, arrowhead markers, larger port dots
- Fixed node sizes: source 220x120, outcome 220x180

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:18:06 -08:00
Jeff Emmett 92dff99793 fix: thread image 404 on subdomains + move photo section to top
Pass /data/ paths through subdomain routing without rewriting so
generated image files are accessible on *.rspace.online subdomains.

Move image upload/generate section above the compose textarea in the
thread builder editor layout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:00:58 -08:00
Jeff Emmett 32cab9c67e fix: deep-clone thread before Automerge write to avoid proxy re-insertion
Automerge throws "Cannot create a reference to an existing document
object" when assigning an Automerge proxy object back into the doc.
Now JSON round-trips the thread data before writing, and strips null
fields that should be absent rather than null in the document.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:46:02 -08:00
Jeff Emmett a1b50eb0da fix: Automerge undefined rejection + thread not synced to server
- tweetImages and imageUrl set to null instead of undefined when empty
  (Automerge rejects undefined as invalid JSON)
- Updated ThreadData schema to allow null for optional fields
- This was the root cause of the 404 on image generation: saveDraft
  threw on undefined, so the thread never synced to the server, and
  the server-side route returned "Thread not found"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:14:06 -08:00
Jeff Emmett f9bafc8ef0 fix: Transak modal not opening — namespace querySelector + wallet check
- Use DOM API (createElementNS + createElement) to build foreignObject
  panel instead of innerHTML, ensuring proper HTML namespace for
  querySelector to traverse SVG→HTML boundary
- Query buttons/inputs from HTML panel root instead of SVG overlay
- Remove wallet address requirement for demo mode (use zero address)
- Add console logging and .catch() for Transak widget debugging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:07:28 -08:00
Jeff Emmett 1335c38d48 fix: thread builder offline runtime race + getDoc method name
Two bugs:
- subscribeOffline() bailed if runtime wasn't initialized yet (race with
  shell.ts init). Now waits for runtime to appear, then awaits init().
- getDoc() called runtime.getDoc() which doesn't exist — method is
  runtime.get(). Caused "e.getDoc is not a function" crash in listThreads.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:06:47 -08:00
Jeff Emmett 3f19fd9c8e feat: overhaul rFlows funnel visuals — bigger nodes, 3 zones, draggable config
- Increase funnel base size (280×250), source nodes (140-280 dynamic),
  outcome nodes (220×120) for better visibility
- Simplify to 2 threshold lines (Min/Max) and 3 labeled zones:
  Critical (below min), Sufficient (min-max), Overflow (above max)
- Position overflow pipes at max threshold line instead of fixed 55%
- Make drain width proportional to desiredOutflow (physical metaphor)
- Replace popup config panel with draggable handles for funnels:
  valve handle (horizontal drag → outflow rate) and height handle
  (vertical drag → capacity)
- Increase edge stroke widths (3-28px) for more visible flow changes
- Source nodes: tall/thin for small recurring, short/thick for large chunks
- Keep config panel for source/outcome node types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:58:45 -08:00
Jeff Emmett ff5dd8c006 fix: await saveDraft/saveToAutomerge in all image and share handlers
All callers of saveDraft() and saveToAutomerge() in generateImage,
uploadImage, uploadTweetImage, generateTweetImage, removeTweetImage,
and share handler now properly await these async methods. Without await,
runtime.change() fires before the Automerge doc subscription resolves,
causing "Document not open" errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:58:04 -08:00
Jeff Emmett f4edf3b7ae fix: thread API calls 404 on subdomain routing (jeff.rspace.online)
basePath was always returning /{space}/rsocials/ which works for path-based
routing (rspace.online/jeff/rsocials/) but double-prefixes on subdomain
routing (jeff.rspace.online/jeff/rsocials/ → rewritten to /jeff/jeff/rsocials/).

Now detects subdomain hosts (*.rspace.online, *.rsocials.online) and returns
/rsocials/ without the space prefix, since the space is the subdomain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:47:41 -08:00
Jeff Emmett 0abfce2991 fix: thread builder save crash — await Automerge doc open before write
Two bugs fixed:
- attachShadow called unconditionally in connectedCallback, crashing on
  re-insertion ("Shadow root cannot be created on a host which already
  hosts a shadow tree")
- saveToAutomerge/deleteFromAutomerge called runtime.change() before the
  async subscribeOffline() had resolved, causing "Document not open" errors

Now tracks the subscribe promise and awaits it before any write operation.
Also guards shadow root creation in gallery and campaign manager components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:38:50 -08:00
Jeff Emmett 0318f0a7e1 feat: inline config beside node, simplified funnel outflow slider
- Inline config panel now appears beside (right of) the node instead of
  beneath it
- Funnel config simplified to single $/mo outflow slider (0-3000) that
  auto-derives all thresholds: min=1mo, sufficient=4mo, overflow=6mo
- Updated deriveThresholds to 4mo sufficient (was 3mo)
- Demo presets updated to match new 4mo formula

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:32:38 -08:00
Jeff Emmett ecebf84bcc fix: single-click inline editing for rflows nodes
- Single click on a node now opens the inline config panel directly
  (instead of requiring double-click which was broken by pointer capture)
- New nodes from toolbar open inline editor instead of side panel
- Click-outside handler uses shadow root instead of document to avoid
  event retargeting that dismissed the panel on any interaction

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 14:07:31 -08:00
Jeff Emmett ce3a3ae0c0 fix: inline editor click-outside handler in shadow DOM
The click-outside handler used event.target at the document level,
which in shadow DOM is retargeted to the host element. Clicking any
input inside the inline config panel (foreignObject) would immediately
dismiss it. Use composedPath() to correctly detect clicks inside the
shadow DOM boundary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 12:44:19 -08:00
Jeff Emmett aff16e647a feat: content-hash cache busting for module/shell assets
Build generates SHA-256 content hashes per asset file and appends
?v=<hash> to all module/shell URLs in rendered HTML automatically.
Eliminates manual ?v=N bumping in mod.ts files. Versioned assets
get Cache-Control: immutable headers, and the service worker cleans
stale entries on activation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 11:50:57 -08:00
Jeff Emmett 493ae2442c fix: replace broken Postiz reverse proxy with iframe embed
The reverse proxy couldn't work for a Next.js SPA — it caused double
space prefix in redirects and couldn't handle /_next/* static assets.
Switch to iframe approach with demo.rsocials.online directly. Fix
template literal bugs where getSchedulerUrl() was passed as a string
literal instead of being evaluated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 10:20:19 -08:00
Jeff Emmett bb37727f18 feat: reverse-proxy Postiz at /rsocials/scheduler instead of iframe
The rSpace Traefik router catches demo.rsocials.online (priority 120)
before the Postiz container can serve it, making iframe embedding fail.

Replace the iframe approach with a reverse proxy: /rsocials/scheduler/*
proxies to the Postiz container (postiz:5000) on the Docker network.
Rewrites redirect headers to stay within the scheduler path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:36:03 -08:00
Jeff Emmett ea99a83678 fix: use correct Twenty CRM GraphQL endpoint (/graphql)
Twenty CRM exposes data queries at /graphql, not /api or /api/graphql.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:30:06 -08:00
Jeff Emmett 2853e46037 fix: update Postiz URL from social.jeffemmett.com to demo.rsocials.online
The old domain had no DNS record. Postiz is served via Traefik at
demo.rsocials.online.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:26:35 -08:00
Jeff Emmett 2ba2034e3a feat: embed Twenty CRM via iframe on /crm route
Switch /crm and ?view=app from custom folk-crm-view component to
renderExternalAppShell iframe embedding crm.rspace.online. Also fix
twentyQuery endpoint from /api to /api/graphql for the data proxy.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:26:16 -08:00
Jeff Emmett 99749d8cf2 refactor: replace ?view= query params with path-based routes in rSocials
/rsocials → canvas view (default)
/rsocials/scheduler → Postiz iframe
/rsocials/feed → demo feed / landing
/rsocials/landing → landing page

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:19:27 -08:00
Jeff Emmett bc9f5bcfb4 fix: re-apply rSocials canvas route and vite build entry
The rSocials refactor commit overwrote the canvas route changes.
Re-adds: default canvas view, ?view=feed for old demo feed,
?view=landing for landing page, and vite build entry for
folk-socials-canvas.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:15:06 -08:00
Jeff Emmett 91d414fc88 feat: refactor rSocials from monolith to full rApp
Decompose the 2,116-line mod.ts into a canonical rApp matching the
rFlows/rBooks pattern with Automerge sync, web components, and
extracted CSS.

New files:
- schemas.ts: SocialsDoc, ThreadData, Campaign types + Automerge schema
- local-first-client.ts: browser-side sync client
- lib/types.ts: shared types, DEMO_FEED, PLATFORM_LIMITS
- lib/image-gen.ts: server-only fal.ai + file upload helpers
- components/folk-thread-builder.ts: compose/preview/readonly component
- components/folk-thread-gallery.ts: thread listing grid component
- components/folk-campaign-manager.ts: campaign viewer with import modal
- components/socials.css: all extracted CSS (~550 lines)

mod.ts slimmed to ~616 lines: ensureDoc, image APIs, page routes
injecting <folk-*> web components, file→Automerge migration, seed
template, and module export. Thread/campaign CRUD moved from REST
to Automerge local-first sync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:44:17 -08:00
Jeff Emmett 1e7e0f029d Merge remote-tracking branch 'origin/dev' 2026-03-05 05:26:28 +01: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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 1f071dc4a1 fix: layer flows drag-to-connect, notification 401 spam, /api/meta 404
- Tab bar: replace mouseenter/mouseleave with bounding-rect hit testing
  during drag-to-connect (robust for 3D CSS transforms)
- Tab bar: clean up document mousemove/mouseup listeners on re-render
  to prevent accumulation leak
- Notification bell: stop polling on 401, restart on auth-change
- Space settings: detect subdomain routing to avoid double-prefix on
  /api/meta URL (jeff.rspace.online/jeff/rspace → /jeff/jeff/rspace)
- rSpace module: add GET /api/meta endpoint returning space owner/members

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:12:19 -08:00
Jeff Emmett 93b9bc7722 fix: migrate campaign and social feed CSS to theme variables
Replaced remaining hardcoded dark colors in campaign page CSS and
rsocials social feed CSS with theme custom properties so they
respond to light/dark mode toggle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:35:54 -08:00
Jeff Emmett f69ccf38d4 chore: additional theme variable migrations in rsocials
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:31:29 -08:00
Jeff Emmett 0359da3348 fix: migrate remaining hardcoded colors to CSS theme variables in rsocials
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:30:39 -08:00
Jeff Emmett abb3f57ca0 fix: space settings panel hidden behind canvas due to backdrop-filter containment
Move <rstack-space-settings> outside the header element so its position:fixed
is relative to the viewport instead of the 56px header (backdrop-filter creates
a containing block for fixed descendants). Bump panel z-index above all canvas
elements. Also migrate hardcoded colors to CSS theme variables across shell
components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:30:20 -08:00
Jeff Emmett 7a11936483 fix: resolve mixed-content error in thread builder API calls
The bare-domain rewrite (rspace.online/rsocials/thread → /demo/rsocials/thread)
injected /demo/ into __BASE_PATH__, causing fetches to /demo/rsocials/api/threads
which triggered a 301 redirect to http://demo.rspace.online (mixed content blocked).
Now derives the base path from the actual browser URL. Also fixed layout so compose
input is on the left and thread preview is on the right.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:03:38 -08:00
Jeff Emmett 495baa5935 fix: allow unauthenticated thread builder save/share operations
The space role middleware was blocking all POST/PUT requests from
unauthenticated users with a 403, preventing the thread builder's
save draft and share buttons from working. Added publicWrite module
flag to bypass the role check for modules with public API endpoints.
Also fixed saveDraft() to properly surface server errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 09:57:59 -08:00
Jeff Emmett 676aaa7b3a feat: green flows, funnel coloring, full-page canvas, analytics popout
- All funding flow edges now use green shades (inflow/spending/overflow)
- Funnel nodes colored by 3-state support level: critical (red), sustained (amber), overflow (green)
- Removed tab system — canvas fills entire viewport with nav overlay
- Added left-side analytics popout panel (overview + transactions sub-tabs)
- Removed river tab code
- Updated legend to reflect new color scheme

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 21:05:23 -08:00
Jeff Emmett 098c3db04d feat: rFlows UX overhaul — funnel shapes, inline editing, side overflow ports
Replace rectangular funnel nodes with tapered SVG containers featuring
overflow lip notches on left/right sides and a narrow spending outflow
at the bottom. Funnels scale logarithmically by monthly funding rate.

Double-click enters inline edit mode with draggable threshold markers
(min/max/sufficient), editable labels via foreignObject, and a compact
toolbar (Done/Delete/... panel fallback). Single click now selects only.

Overflow edges route from side ports with horizontal bezier curves that
create a natural "spilling over" visual before curving to targets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 20:13:40 -08:00
Jeff Emmett aceeedb366 fix: resolve circular import crash in rnotes converters
Bun evaluates the converters Map after the circular import from obsidian.ts
triggers registerConverter(), causing "Cannot access before initialization".
Lazy-load converter modules via require() to break the cycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 19:47:23 -08:00