Commit Graph

1273 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 79f16925aa fix(canvas): remove TS cast from inline script (Vite builds as JS)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 19:25:18 -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 0c46e33148 fix(collab): embed online badge in tab row instead of fixed overlay
The "N online" collab badge was position:fixed at top:8px, overlapping
the header login area. Move it into the tab bar slot (main shell) or
header-right section (standalone shells) so it flows inline with other
chrome elements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:19:29 -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 1282ba5325 feat(history): humanize activity entries with icons and timestamps
Replace raw Automerge change messages (e.g. "Update shape abc-123-uuid")
with human-readable text and contextual icons. Add per-entry timestamps
for clearer chronology within author groups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:56:13 -07:00
Jeff Emmett 5775e810d6 fix(docker): pass INTERNAL_API_KEY env var to rspace container
Required for on-ramp/off-ramp internal API endpoints.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:53:30 -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 b455e639d7 fix(rwallet): exempt wallet API endpoints from private space access gate
Balance queries, Safe detection, and chain analysis are blockchain
reads that should work for any authenticated user regardless of
space membership. The route handlers enforce their own auth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:29:37 -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 6bda676680 fix(canvas): add missing comment-bell HTML tag to canvas header
The JS import and define() were added but the actual
<rstack-comment-bell> element was missing from canvas.html's
header HTML (which is separate from server/shell.ts).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:21:38 -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 30f037c2a0 feat(dashboard): redesign space dashboard with members, activity, votes
Replace the global "Your Spaces" grid with a space-centric dashboard showing
members, previously open tools, recent activity, active votes, and quick
actions. Fix layout cut-off by positioning dashboard fixed below header+tab
row (top: 92px) with sidebar-push support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:57:54 -07:00
Jeff Emmett e3a6a45c5a Merge branch 'dev' 2026-03-23 16:50:33 -07:00
Jeff Emmett 9695e9577a feat(encryptid): encrypt all PII at rest in database
AES-256-GCM encryption for 18 PII fields across 6 tables (users,
guardians, identity_invites, space_invites, notifications, fund_claims).
HMAC-SHA256 hash indexes for email/UP address lookups. Keys derived from
JWT_SECRET via HKDF with dedicated salts. Dual-write to both plaintext
and _enc columns during transition; row mappers decrypt with plaintext
fallback. Includes idempotent backfill migration script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:50:21 -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 83c729f3df Merge branch 'dev' 2026-03-23 16:39:00 -07:00
Jeff Emmett 389dc70e77 fix(settings): position dropdown below and to the right of gear icon
The panel was right-aligned relative to the button which pushed it
off-screen since the gear is on the left side of the header. Now
left-aligns with the button and clamps to stay within viewport.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:37:25 -07:00
Jeff Emmett 8acbb1971e Merge branch 'dev' 2026-03-23 16:32:35 -07:00
Jeff Emmett 6cb82f3098 fix(canvas): register rstack-comment-bell in canvas.html imports
Canvas.html has its own component import list separate from shell.js.
The comment bell was missing, so the custom element never initialized.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:32:24 -07:00
Jeff Emmett 1cd8e9a6be Merge branch 'dev' 2026-03-23 16:15:53 -07:00
Jeff Emmett 6ec9f5ec61 fix(canvas): prevent drag/snap/selection on shape content interactions
FolkShape now uses stopImmediatePropagation for pointerdown on non-drag
targets (scrollable content, inputs, buttons) so canvas selection and
snap listeners don't fire. Canvas capture-phase listener now checks
composedPath to only track actual drag targets (host, handles, headers).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:15:43 -07:00
Jeff Emmett 9137523251 Merge branch 'dev' 2026-03-23 16:03:48 -07:00
Jeff Emmett afd2a5a40b fix(canvas): persistent drawing tools + online/offline label + drag fixes
Drawing/shape tools (pencil, line, rect, circle) now stay active for
multiple strokes instead of resetting to selector after each use.
Renamed collab overlay badge from "Solo/Share" to "Offline/Online".
Prevent canvas drag when interacting with image-gen and prompt content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:03:15 -07:00
Jeff Emmett 20d472a94b Merge branch 'dev' 2026-03-23 16:01:01 -07:00
Jeff Emmett 8649598c26 fix(tab-cache): add Accept header so tab fetch works on private spaces
The TabCache fetchAndInject() was sending fetch() without Accept: text/html,
causing the server to treat it as an API request and return 401 on private
spaces. Also adds .catch() fallbacks to shell tab handlers for resilience.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:00:51 -07:00
Jeff Emmett cc22d82423 Merge branch 'dev' 2026-03-23 15:08:20 -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 5c9ef2300b Merge branch 'dev' 2026-03-23 14:37:32 -07:00
Jeff Emmett a9ff1cf94b feat(encryptid): complete social recovery end-to-end flow
Add /recover/social page for users to finalize account recovery after
guardian approvals, fix status filter so approved requests remain
findable, return requestId from initiation API with tracking link on
login page, and add actionUrl to recovery notifications.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 14:32:38 -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 cdfba02b03 fix(rcart): exempt payment endpoints from private space access gate
Payment creation, QR codes, and pay pages should be accessible to any
authenticated user regardless of space visibility, since the payment
goes to the creator's wallet. The route handlers enforce their own auth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 14:30:55 -07:00
Jeff Emmett 63b9305787 Merge branch 'dev' 2026-03-23 14:23:55 -07:00
Jeff Emmett 67f1927eb5 fix(rflows): exempt public on-ramp endpoints from space auth middleware
Space visibility defaults to "private", blocking unauthenticated API calls.
The on-ramp and webhook endpoints are designed for unauthenticated users,
so they need to bypass the space-level auth check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 14:23:44 -07:00
Jeff Emmett 1bdf47a613 Merge branch 'dev' 2026-03-23 14:02:40 -07:00
Jeff Emmett f5de97c60c feat(ux): move comment button to header bar with unresolved badge
Move the "Leave Comment" button from the bottom canvas toolbar to the
top header bar as <rstack-comment-bell>, positioned left of the
notification bell. Shows a red badge with unresolved comment pin count.
Wires canvas via comment-pin-activate/comment-pins-changed custom events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 14:02:27 -07:00
Jeff Emmett 4139b829a1 Merge branch 'dev' 2026-03-23 13:48:19 -07:00
Jeff Emmett 38053eee34 fix(notes): prevent deletion while editing, fix layout, add semantic zoom
- Fix Delete/Backspace deleting the note shape when editing text inside
  it. The canvas keydown handler now uses composedPath() to detect
  inputs inside Shadow DOM (textarea, title input). Also fixes Space
  key and Ctrl+Z being intercepted by canvas while typing.
- Stop all keydown propagation from the editor/title inputs to prevent
  arrow keys from moving the shape while editing.
- Fix layout: replace calc(100%-36px) with proper flex layout. Header,
  toolbar, footer are flex-shrink:0; editor fills remaining space.
  Fixes headers being cut off and weird sizing.
- Add semantic zoom: icon-only (<0.3x), summary (0.3-0.7x), full
  editor (>0.7x). Reads --canvas-scale CSS custom property set by
  updateCanvasTransform().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 13:48:08 -07:00
Jeff Emmett e3486f7161 Merge branch 'dev' 2026-03-23 13:39:14 -07:00
Jeff Emmett 83fa874147 fix(ux): show offline only on actual disconnection, add resync tooltip
- Badge now reflects real connection state: "N online", "Reconnecting…", or "Offline"
- Removed manual online/offline toggle (was confusing — showed both states)
- Panel Solo/Share toggle remains for cursor visibility preference
- Hover tooltip on badge when offline: "changes saved locally, will resync"
- Panel shows offline/reconnecting notice banner when disconnected
- Removed unused #people-conn-status element and CSS

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 13:39:08 -07:00
Jeff Emmett 023a9e7fbd fix(notifications): use full URL pathname for proxy path
c.req.path in Hono returns the full path, not the relative path
within the sub-router, causing the /api/notifications prefix to
be doubled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 13:36:51 -07:00
Jeff Emmett cb784b8102 fix(notifications): proxy to encryptid instead of direct DB access
The rspace container cannot resolve encryptid-db hostname, causing
/api/notifications/count to 524 timeout on every 30s poll. Rewrites
notification-routes.ts as an HTTP proxy to encryptid (which has DB
access), adds notification API endpoints to encryptid server, and
wraps BroadcastChannel.postMessage in try/catch to prevent uncaught
errors during navigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 13:30:58 -07:00
Jeff Emmett 20b3af9074 Merge branch 'dev' 2026-03-23 13:29:54 -07:00
Jeff Emmett b91233092b fix(ux): move people-online badge into sub-tab header bar
- Move people badge + panel from fixed position to inline in .rstack-tab-row
- Badge sits right of the layer toggle icon with a subtle separator
- Panel drops down from badge position instead of floating fixed
- Online/Offline toggle replaces Solo/Multi labels for clarity
- Badge shows "Offline" with gray dot when in offline mode
- Mobile: hide text label, show dots only
- Tab bar gets flex:1 + min-width:0 to share row space

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 13:29:45 -07:00