Commit Graph

494 Commits

Author SHA1 Message Date
Jeff Emmett d74512ddcd chore(rflows): bump folk-flow-river.js cache version to v=2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 19:33:56 -07:00
Jeff Emmett 8b43df5ce9 fix(rflows): Sankey-style constant-width L-shaped ribbons for waterfalls
Three fixes for S-curve appearance:
- Constant width throughout each waterfall (no taper between source/river)
- Stack inflow waterfalls side-by-side at funnel top proportionally
- Widen spending drain to 80% of vessel bottom width

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 19:23:46 -07:00
Jeff Emmett aa4a200f32 feat(history): add "Revert to this point" button in Time Machine panel
Forward Automerge change that overwrites content fields with snapshot data,
preserving meta and full history. Also fixes pre-existing TS errors in
folk-flow-river (undefined exitX) and test-full-loop (StepResult type).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 19:08:15 -07:00
Jeff Emmett 47a3fe32fb fix(rflows,rwallet): unstaged fixes from previous session
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:42:11 -07:00
Jeff Emmett 8aa2e9773a feat(rmaps): ZIP import, chat, route requests, indoor maps
- ZIP import: Google Takeout + generic FeatureCollection ZIP via JSZip
- Route requests: "Ask to navigate" sends WebSocket route_request, toast notification with Navigate/Dismiss in other tab
- Chat: Automerge-backed persistent messages with MapChatMessage schema (v2), sidebar tab toggle, unread badge
- Indoor maps: <map-indoor-view> with c3nav raster tile proxy, level selector, Easter egg on Level 0 triple-click
- Indoor/outdoor toggle in controls bar and mobile FAB
- Cache bust v2→v3

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:42:02 -07:00
Jeff Emmett aa520d41a2 chore(rwallet): bump JS cache version to v=15
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:23:07 -07:00
Jeff Emmett 51be476694 feat(rwallet): timeline-first UX overhaul with proportional rivers
- Fix USD estimation: add NATIVE_APPROX_USD price table for ETH, MATIC,
  BNB, AVAX, xDAI, CELO, GNO; unknown tokens fall back to $0 instead of
  raw token amounts (fixes wildly wrong river widths)
- Fix scroll hijacking: only intercept Ctrl+wheel (pinch-to-zoom) on
  timeline, flow chart, and sankey; normal two-finger scroll passes through
- Collapse address bar to compact chip after wallet loads with Save/Change
- Promote watchlist as horizontal chip selector above dashboard; merge
  example wallets as dashed "suggested" chips when watchlist is empty
- Default to timeline view after wallet detection (auto-loads transfers)
- Move balance/transaction tables to Details modal (pill button, overlay
  with backdrop blur) — stats cards hidden in viz views since D3 shows them

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:16:06 -07:00
Jeff Emmett bfdb320b3e fix(rcal): prevent multi-day event spans from displacing day cells
Multi-day event span bars used grid-row/grid-column inside the same
CSS grid as auto-placed day cells. The grid auto-placement algorithm
skipped cells occupied by explicitly-placed spans, pushing day numbers
to wrong positions.

Fix: make .ev-span position:absolute with .grid position:relative.
Absolutely-positioned grid children still use grid-row/column for
their containing block but don't participate in layout flow. Also
account for expanded day-detail rows when calculating span grid rows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:37:35 -07:00
Jeff Emmett 245d2ec3b4 feat(rwallet): HyperSwitch full-loop fiat↔CRDT payment integration
- /api/internal/mint-crdt: on-ramp webhook → cUSDC mint (idempotent)
- /api/internal/escrow-burn: off-ramp escrow with two-step confirm/reverse
- $MYCO bonding curve (server/bonding-curve.ts): quadratic price curve,
  buy/sell/quote/settlement-state endpoints in rwallet
- BFT token renamed to $MYCO (6 decimals) in seed data
- LedgerEntry schema extended with offRampId, status for escrow tracking
- burnTokens, burnTokensEscrow, confirmBurn, reverseBurn in token-service
- Wallet UI: Buy cUSDC, $MYCO Swap, Withdraw sections with live quotes
- scripts/test-full-loop.ts for end-to-end verification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:34:48 -07:00
Jeff Emmett 6ab9790373 fix(rflows): match overflow pipe widths to edge width formula
Compute overflow/spending pipe widths as proportional shares of
outflowWidthPx (matching edge formula: outflowWidthPx * flow/total)
instead of independent globalMaxFlow scaling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:26:05 -07:00
Jeff Emmett 3def8f73fe fix(rflows): cache-bust folk-flows-app.js for CDN
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:11:24 -07:00
Jeff Emmett db1c0ec490 feat(rflows): proportional flow pipes on all node types
Scale source stream, funnel inflow/overflow/spending, and outcome
inflow/overflow pipes using the same 8-80px global Sankey scale as
edges, replacing fixed-width cosmetic pipes with flow-consistent ones.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:06:45 -07:00
Jeff Emmett 68adc7ad17 feat(rwallet): add yield sandbox simulator with compound interest engine
Client-side sandbox for "what-if" yield projections — enter any amount,
pick asset/chain, scrub a time slider, and compare all protocol APYs
instantly. Uses live DeFi Llama rates when available, mock fallbacks offline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:50:06 -07:00
Jeff Emmett 3cfec226a4 fix(rflows): proportional node sizing + remove organic visualization
Nodes now scale with dollar values (sources by flowRate, funnels by
maxCapacity, outcomes by fundingTarget). Removed unused organic/
mycorrhizal render mode including renderer, CSS, and all toggle logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 15:08:08 -07:00
Jeff Emmett cb92a7f6d8 feat(rtrips): AI trip planner — canvas tools + "Plan with AI" button
Register 5 trip-specific tools (destination, itinerary, booking, budget,
packing list) in canvas-tools.ts so Gemini can create trip shapes.
Add public toolsEnabled/systemPrompt properties to folk-prompt with
persistence. Add #trip-planner hash handler to canvas.html that auto-
creates a pre-configured AI prompt. Add "Plan with AI" gradient button
to rTrips list and detail views.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 14:32:28 -07:00
Jeff Emmett 0c04d6bee1 fix(rmeets): use Jitsi External API by default, clean up toolbar buttons
Switch default room view to External API (cleaner toolbar, no stray
close buttons). Slim toolbar to essentials, disable participant pane
overlay. Fall back to iframe embed with ?iframe=1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 12:11:00 -07:00
Jeff Emmett 460c68ddbf fix(rcal): only show dots/labels for events starting on that day
Multi-day events on intermediate days are shown via span bars,
not duplicated as dots/labels in each day cell.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 10:48:30 -07:00
Jeff Emmett 7234a8db38 feat(rspace): add rich landing page for the canvas module
Replace the generic "🎨 rSpace — Real-time collaborative canvas" fallback
with a full landing page following the rl-* CSS system used by other rApps.

Sections: hero, principles (local-first/interoperable/AI-native/multiplayer),
canvas features, 16-shape library grid, AI capabilities, how it works steps,
ecosystem integrations, open source stack, data protection, and final CTA.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 20:41:00 -07:00
Jeff Emmett 2e3007b1df fix(flipbook): ensure 2-page spread display in StPageFlip
Add flex-shrink:0 to flipbook containers to prevent flex layout from
squishing them below pageW*2, which would trigger StPageFlip's
portrait (single-page) mode. Update rpubs page counter to show
spread page range (Pages X–Y of N) for middle pages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:35:25 -07:00
Jeff Emmett 9ac8cb6256 fix(flipbook): replicate StPageFlip CSS inside shadow DOM
StPageFlip injects its CSS (.stf__parent, .stf__block, .stf__item, etc.)
into document.head, which doesn't penetrate shadow DOM boundaries.
Pages rendered but were unstyled — collapsed/invisible. Replicate the
required rules inside each component's shadow root styles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:27:56 -07:00
Jeff Emmett df8d5f79ce fix(rmeets): align MI route handlers with actual API response shapes
- Search: use POST /search with JSON body (was GET with query params)
- Summary: add summary_text field lookup (API's actual field name)
- Speakers: add speaking_time + speaker_label fallbacks
- Transcript: add speaker_label fallback for segment speaker name
- Action items: add task field lookup (API returns {task, assignee})
- Recordings: detect transcript availability from segment_count
- Add CSS for processing status badges (transcribing, diarizing, etc)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:21:55 -07:00
Jeff Emmett cebad27b38 fix(auth): pass JWT secret to all SDK verify calls + add auth header to rpubs generate
evaluateSpaceAccess and authenticateWSUpgrade were calling the SDK
without the secret option, forcing remote verification. Also adds
auth header to rpubs editor generate fetch (was getting 401 on
private spaces).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:15:17 -07:00
Jeff Emmett cc1f09b565 feat(rmeets): integrate Meeting Intelligence API for recordings, transcripts, and search
Connect the deployed meeting-intelligence stack to the rmeets module:
- Add MI API proxy helper with 8s timeout and graceful fallback
- Add recordings list page with meeting cards showing status/transcript/summary badges
- Add recording detail page with overview/transcript/summary/speakers tabs
- Add full-text transcript search with highlighted results
- Add client-side MI API proxy route to avoid CORS issues
- Add Recordings and Search nav links to the hub page
- Update landing page: remove "Coming Soon" from transcription + rename section
- Update module export: replace recordings outputPath with custom route, add onboardingActions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:00:51 -07:00
Jeff Emmett 7618433498 refactor(auth): replace @encryptid/sdk imports with local auth module
Consolidates token verification into server/auth.ts, removing the
external SDK dependency. All modules now import from the local module.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 16:41:59 -07:00
Jeff Emmett 2de61cd7ad feat(rcal): move zoom/legend below calendar, add multi-day event spans
- Reorder layout: nav → calendar → legend → zoom bars → bottom bar
- Add "Calendar Legend" heading above source badges
- Fix getEventsForDate() to support multi-day range checking
- Render colored span bars across day cells for multi-day events
- Make showAccountModal/isSignedIn public on rstack-identity
- Tour final step triggers identity setup flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:10:39 -07:00
Jeff Emmett 4b08a02851 fix(seed): prevent demo data re-seeding after user deletes content
Added a `seeded` flag to Automerge doc metadata across 6 modules
(rcal, rnotes, rtasks, rvote, rbnb, rvnb). Once demo data is seeded,
deleting all content no longer triggers re-seeding on next page load.

Also removed rcal's per-request seedDemoIfEmpty() call from the route
handler — onInit + seedTemplate already handle initial seeding.

fix(canvas): prevent bulk delete dialog from stacking

The Delete key repeat was creating multiple overlays, making the dialog
appear unclosable. Added a guard to prevent duplicate dialogs, and
Escape key support to dismiss.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:24:51 -07:00
Jeff Emmett 0d8d42c49e fix(rcal): distinguish pinch-zoom from scroll-pan on calendar
Trackpad pinch (ctrlKey wheel) zooms granularity, two-finger scroll
navigates the timeline forward/backward instead of zooming.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 12:44:45 -07:00
Jeff Emmett 15f7e759d1 fix(canvas): map shape interaction + reminder widget dismissal
Map viewer: disable MapLibre interactions when inside a folk-shape
until editing mode (double-click). Prevents map panning when trying
to select/move the shape on canvas.

Reminder widget: dismiss on Escape key and when clicking elsewhere
on canvas (deselecting shapes). Clean up schedule icon when shape
is deleted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:44:28 -07:00
Jeff Emmett fcf4202045 fix(rmaps): remove max-height cap so map fills available space
Map container was capped at 700px, leaving blank space on most screens.
Removed the cap so calc(100vh - 220px) fills properly. Also matched
sidebar max-height to viewport.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 19:26:18 -07:00
Jeff Emmett 8b61203e17 revert: remove standalone domains we don't own
Reverts Traefik rules and removes standaloneDomain from rdesign, rvnb,
rbnb, rdocs, and crowdsurf — we don't have these domains.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 18:31:17 -07:00
Jeff Emmett 524356d233 feat(tours+solo): add tours to remaining modules and solo mode toggle
Add guided tours to 6 modules that were missing them:
- Shadow DOM: rsocials dashboard, crowdsurf, rdata (TourEngine)
- Light DOM: rsplat, rbnb, rvnb (new LightTourEngine class)

Add solo mode toggle to collab overlay — click the presence badge
to hide your cursor/presence from others. Persists via localStorage,
dispatches event to canvas PresenceManager.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 17:26:57 -07:00
Jeff Emmett 2ab620fcc5 feat(rpubs): polish publish flow with teal accents, SVG icons, and card layouts
Visual overhaul of the rpubs editor and publish panel to match rpubs.online/press
design language: circular step indicators with checkmarks, SVG stroke icons on all
buttons, card-based publish panel with teal accent colors, pricing tier cards,
numbered DIY guide steps, group buy progress bar, and format info chips.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 17:04:19 -07:00
Jeff Emmett 9ed39d5cd0 fix(rpubs): adjust editor height to account for sub-nav bar
The editor used calc(100vh - 92px) which only accounted for header+tab
row, but the rpubs sub-nav (~48px) pushed the Generate Preview button
below the fold. Now uses calc(100vh - 140px).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 16:18:43 -07:00
Jeff Emmett 8ba805f3fa fix(rpubs): correct editor height to match shell layout (92px offset)
The editor used calc(100vh - 52px) but the shell has a 56px header +
36px tab row = 92px total. This pushed "Generate Preview" below the
fold. Also adds min-height on flipbook preview container.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 15:27:58 -07:00
Jeff Emmett 7c29ccea41 feat(rinbox): bridge Listmonk newsletter campaigns with multisig approval
Newsletter campaigns now require N-of-M team member approval via rInbox
before Listmonk starts sending. The send-newsletter workflow node creates
a draft campaign and gates it through the team inbox; a manual submit-
approval route is also available. The multisig email UI shows a green
"Newsletter Approval" badge with campaign ID for newsletter approvals.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 15:03:06 -07:00
Jeff Emmett 57e03f3049 feat(rsocials): add Campaign Wizard button to campaigns dashboard
Prominent teal gradient button in header and empty state of the
campaigns tab, linking to the AI-guided wizard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:49:28 -07:00
Jeff Emmett 5ad6c6ff77 feat(rsocials): add Campaign Wizard with 5-step AI-guided creation flow
Progressive approval workflow: paste brief → AI extracts structure →
AI generates per-platform posts → review with per-post regen →
commit (saves campaign, creates threads, drafts newsletters, builds workflow DAG).

Includes MI integration for Cmd+K campaign creation and vite build entry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:41:45 -07:00
Jeff Emmett aca0e6b353 feat(rsocials): connect drafted threads to campaign flows via picker dropdowns
Replace manual thread ID entry with select dropdowns in both campaign planner
and workflow components. Server-side publish-thread handler now resolves
linked threadId from Automerge doc when inline content is empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:13:31 -07:00
Jeff Emmett d31e8fdca4 feat(spaces): blank canvas init + team inbox provisioning
New spaces start with an empty canvas instead of 25+ template shapes.
Each space gets a {slug}@rspace.online team inbox (multi-sig ready)
via the rinbox onSpaceCreate hook. Fix EncryptID auto-provision passing
raw string instead of SpaceLifecycleContext to module hooks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 13:59:35 -07:00
Jeff Emmett 97bf2d7987 feat(rwallet): integrate CRDT token flows into wallet visualizations
- Add transferTokens() and getAllTransfers() to token service
- Seed DAO ecosystem: cUSDC + BFT tokens, 3 treasuries, 6 participants,
  ~30 transactions spread over 60 days
- Add /api/crdt-tokens/transfers endpoint for ledger history
- Wire CRDT transfers into loadTransfers() with DID→pseudo-address mapping
- Update data transforms (timeline, sankey, multichain) to support
  _fromLabel/_toLabel for human-readable CRDT participant names
- Show viz tabs (Timeline, Flow Map, Sankey) when CRDT tokens exist
- Add "local"/"CRDT" chain to color and name maps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 13:47:14 -07:00
Jeff Emmett ac9bd302d1 fix(rsocials): replace hardcoded dark-mode colors with CSS variables for light/dark theme support
Buttons, badges, focus states, avatars, links, inputs, and surfaces across
all rSocials components now use --rs-primary, --rs-error, --rs-success,
--rs-accent, --rs-bg-surface, --rs-input-bg, etc. with dark-mode fallbacks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 13:18:13 -07:00
Jeff Emmett e879f5e2f0 fix(rwallet): remove My Wallets / Wallet Visualizer top tab bar
Show the visualizer view directly without the top-level tab switcher,
keeping the sub-tab header (Balances, Yield, Timeline, etc.) intact.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 12:27:03 -07:00
Jeff Emmett 031ffbbbfa feat(rpubs): replace sidebar with 3-step wizard flow (Create → Preview → Publish)
Restructures the editor from a cramped sidebar layout to a full-width stepped wizard,
matching the rpubs.online/press UX. Format and drafts moved to toolbar dropdowns,
auto-advances to preview after PDF generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 12:26:38 -07:00
Jeff Emmett 4793f9c117 feat(crowdsurf): restore module and add Elo pairwise ranking layer
Restore CrowdSurf as standalone module with full integration (server,
app-switcher, shell favicon, rchoices tab, vite build). Add sortition-
based pairwise Elo ranking: users compare two activities head-to-head,
updating Elo ratings. Includes API endpoints (/api/crowdsurf/pair,
/api/crowdsurf/compare), Rank tab with leaderboard, and Elo badges.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:51:24 -07:00
Jeff Emmett d99b85046c feat(rswag): full feature parity — POD clients, dithering, AI gen, fulfillment
8-phase implementation bringing rSwag module to parity with standalone rswag.online:
- Printful v2 + Prodigi v4 API clients with sandbox mode
- 11 dithering algorithms + screen-print color separations
- Gemini AI design generation + user artwork upload
- ~15 new API routes (designs, mockups, storefront, fulfillment, admin)
- 4-tab frontend UI (Browse, Create, HitherDither, Orders)
- Interactive revenue Sankey diagram on landing page
- Fulfillment bridge routing orders to nearest POD provider

Also includes: rChats module scaffold, rVote enhancements, crowdsurf removal,
rchoices cleanup, rwallet tweaks, app-switcher updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:21:53 -07:00
Jeff Emmett e09ae1d8d2 fix(rnetwork): prevent TubeGeometry NaN errors in 3D graph
Links with curved curvature create TubeGeometry that crashes with NaN
positions when force simulation hasn't converged yet. Add linkVisibility
guard to hide links until both endpoints have valid coordinates, and
bump warmupTicks from 50 to 100 for more settling time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:16:45 -07:00
Jeff Emmett 31fe552755 feat(rflows): add organic/mycorrhizal view mode toggle
Adds a toggleable alternative rendering mode for the rFlows canvas.
Sources become sporangia, funnels become mycorrhizal junctions,
outcomes become fruiting bodies, and edges become branching hyphae
with earth-tone aesthetics. Same data, same interactions, same ports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:01:20 -07:00
Jeff Emmett f5b455f83c feat(rpubs): port full feature parity from rpubs-online
Flipbook preview (pdf.js + StPageFlip), saddle-stitch imposition
(pdf-lib), DIY print guides, email PDF, printer discovery (curated
+ OSM Overpass), rCart order/batch integration, publish panel with
Share/DIY/Order tabs. 5 new API routes, 6 new files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 22:55:10 -07:00
Jeff Emmett 77f2e9ae56 fix(rpubs): allow public PDF generation + fix zine auto-spawn
- Add publicWrite to rpubs module (PDF gen is computational, not a write)
- Fix zine auto-spawn: wait for community-sync-ready event instead of
  fragile 800ms timeout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 22:20:08 -07:00
Jeff Emmett d39c24c61b fix(rpubs): fix shadow root double-attach and PDF generate route
- Guard attachShadow with existing check to prevent crash on reconnect
- Fix API path: /pubs/api/generate → /rpubs/api/generate (module ID is rpubs)
- The "Unexpected non-whitespace character" error was HTML 404 parsed as JSON

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 22:14:16 -07:00