Commit Graph

1413 Commits

Author SHA1 Message Date
Jeff Emmett 219a5f434b fix(rnotes): mobile collab UX — bottom-sheet comments, toolbar reorder
- Comment sidebar → full-width bottom sheet at ≤768px (was ≤480px)
- Toolbar: collab tools (comment, suggest) reordered first on mobile
  via CSS order so they're visible without scrolling
- Suggestion review bar wraps at mobile widths
- Toolbar scroll + larger touch targets promoted to ≤768px breakpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:26:30 -07:00
Jeff Emmett 8f9d507440 fix(rinbox): clean up sub-tab header — mailboxes + approvals only, info icon, space mailbox primary
Remove Personal, Agents, Tour from nav header. Move Guide/About behind
info icon (ⓘ). Space mailbox ({space}@rspace.online) shown first with
highlighted card spanning full width. Add demo threads for space mailbox.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:21:50 -07:00
Jeff Emmett 696ab3cfd9 feat(mi): load context suggestions on component init for bar placeholder rotation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:16:05 -07:00
Jeff Emmett 25abb0266b feat(rsocials): newsletter drafts tab + remove Listmonk setup wall
Drafts tab shown by default with Automerge-backed CRUD. Listmonk tabs
conditionally appear when configured. Info banner for unconfigured state.
Draft editor with HTML preview, status dropdown, subscriber management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:15:46 -07:00
Jeff Emmett db25d65c43 chore(rnotes): bump JS cache version to v=9
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:14:22 -07:00
Jeff Emmett 0f3eb45ffa feat(canvas): register social shapes in shape registry for cross-rApp sharing
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>
2026-03-25 20:12:27 -07:00
Jeff Emmett 77ac0c1e32 feat(rsocials): newsletter drafts, subscribers + MI route updates
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:11:31 -07:00
Jeff Emmett 2eac542e19 feat(rnotes): mobile stack navigation — Notion-style two-screen slide
Replace overlay sidebar with horizontal flex stack: full-width doc list
slides to full-width editor with back bar on note tap. Resize-aware.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:11:26 -07:00
Jeff Emmett 3add66b5ef chore(rsocials): add NewsletterDraft and NewsletterSubscriber types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:04:15 -07:00
Jeff Emmett f966f02909 feat(spaces,rsocials): invite-based member adds + clickable campaign content
Space invites: Convert both username-add and email-invite (existing user)
paths from direct-add to invite flow — creates space_invite via EncryptID,
sends invite email with Accept button, dispatches space_invite notification
with Accept/Decline buttons in the notification bell. No one gets forcefully
added to a space anymore.

rSocials content linking: All generated campaign content now links through
to actual editable content. Draft post cards in thread gallery are clickable
(thread editor or campaign view). Campaign manager post cards expand on click
and thread badges link to thread editor. Wizard success screen shows
individual thread links. CampaignPost schema gains threadId field, stored on
commit so posts maintain their thread association.

Also includes canvas social media tools, social shape components
(folk-social-thread, folk-social-campaign, folk-social-newsletter),
and MI context-aware suggestion registry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:03:52 -07:00
Jeff Emmett b5a54265ee feat(collab): show all space members in People panel — offline with grey dots
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 18:20:59 -07:00
Jeff Emmett cd6317fd06 fix(canvas): mobile toolbar positioning — anchor to bottom-right, clear zoom icon
- 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>
2026-03-25 18:09:26 -07:00
Jeff Emmett ad75781efd fix(spaces): set clf and bcrg to permissioned on startup
One-shot migration to fix visibility for spaces that were changed
by stale client sync. Also imports updateSpaceMeta in index.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 18:08:51 -07:00
Jeff Emmett 25aaadd247 fix(cad): retry health checks so buttons aren't permanently disabled
All CAD shapes (KiCad, FreeCAD, Blender) now retry health checks up to
3 times with 3s delay before disabling the generate button. Prevents
transient failures during container startup from permanently greying
out the button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 18:07:57 -07:00
Jeff Emmett 358965cb61 fix(rmaps): join form overlay + authenticated user auto-join
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 18:04:24 -07:00
Jeff Emmett 676e29902e feat(encryptid): device management — labeled passkey list + nudge fix
Add label column to credentials, PATCH/DELETE endpoints for rename/remove,
device list UI in account modal with rename/remove actions, and clear stale
nudge dismiss timestamp after device registration so multiDevice API check
takes over permanently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 18:04:20 -07:00
Jeff Emmett c0b4250e96 fix(spaces): pin visibility and ownerDID as server-authoritative
Automerge CRDT sync could overwrite space visibility when a client
with a stale cached doc reconnects and merges. Now the server
snapshots visibility and ownerDID before processing sync messages
and reverts any client-side changes to these fields.

These fields can only be changed through the authenticated API
(PATCH /api/spaces/:slug), not through CRDT sync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 18:03:43 -07:00
Jeff Emmett dce608ae1b fix: cache-bust sw.js registration + no-cache header for SW/manifest
- 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>
2026-03-25 18:02:14 -07:00
Jeff Emmett 23083c32b0 fix: serve sw.js and manifest.json with no-cache header
Cloudflare was caching sw.js for 4 hours (default JS caching),
preventing service worker updates from reaching clients.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:55:52 -07:00
Jeff Emmett c4972079dd fix(cad): CSS containment + Scribus image gen for all CAD shapes
- KiCad, FreeCAD, Blender, Scribus: add .wrapper flex container with
  height:100% + min-height:0 so content stays within element bounds
- KiCad assembler: regex fallback for non-JSON tool results (SVG, Gerber, PDF)
- Scribus image gen: actually write downloaded fal.ai images to disk
  (was creating imagePath but never saving bytes)
- Mount rspace-files volume in scribus-novnc so generated images are
  accessible from both containers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:53:42 -07:00
Jeff Emmett 92629e239e fix(blender,freecad): contain render in element, fix FreeCAD file serving
Blender: add wrapper with height:100%, min-height:0 for flex shrink,
object-fit:contain on img — render stays within shape bounds.

FreeCAD: update assembleFreecadResult to scan all tool results for file
paths (.step, .stl, .png), not just execute_python_script JSON parsing.
Add preview PNG rendering instruction to system prompt. Add subdirectory
file serving routes for /data/files/generated/:subdir/:filename. Add
STEP/STL/SVG/PDF mime types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:40:25 -07:00
Jeff Emmett 8ea537525a fix(rwallet): align timeline inflows/outflows with balance changes
- Use curveStepAfter for the balance river so step transitions happen
  exactly at transaction dates (curveBasis didn't pass through data points,
  causing waterfall shapes to disconnect from the river edges)
- Update hardcoded USD estimates to current CoinGecko prices (2026-03-25)
- Add SAFE, COW, ENS, LDO, BAL to the price estimate table
- Fix BigInt→Number precision for large token balances (>2^53 wei) in
  both price-feed enrichment and transfer value parsing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:36:10 -07:00
Jeff Emmett ff09d49127 fix: bump service worker cache version to v4
Forces all clients to invalidate cached assets and re-fetch,
ensuring mobile zoom button position fix is picked up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:35:15 -07:00
Jeff Emmett f3094f5f88 fix(rwallet): chain filter now updates all displayed data + chain proportion bar
- Stats, balance table, and DeFi positions all filter by selected chain
- Added proportional color bar showing each chain's share of total value
- Chain buttons show USD value + percentage on hover
- Bumped JS cache version to v=21

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:32:02 -07:00
Jeff Emmett 8d4e1fd0ff fix(mi,canvas): filter disabled modules from MI assistant and eliminate app-switcher flash
MI now loads space doc to filter module list, capabilities, and fallback
by enabledModules. Canvas fetches /api/modules and space modules in
parallel via Promise.all, calling setModules once with filtered list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:26:07 -07:00
Jeff Emmett ac028cbe04 fix(blender): use shutil.move for cross-fs copy, disable denoiser
os.rename fails across Docker volume boundaries (different filesystems).
Debian Blender 3.4 lacks OpenImageDenoiser — disable denoising in prompt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:21:53 -07:00
Jeff Emmett 555a51f8a7 fix(blender): add EGL/GL libs and use Cycles CPU renderer
EEVEE needs GPU; Cycles CPU works headless. Added libegl1, libgl1-mesa-dri,
libglx-mesa0 to Dockerfile. Updated Gemini prompt to specify Cycles engine
with 64 samples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:17:34 -07:00
Jeff Emmett ba56697e23 fix(rcal): show calendar event locations on map in all spaces, not just demo
REST API events use location_lat/location_lng while the map panel
filters on latitude/longitude. Demo events set both, but non-demo
events only had location_lat/location_lng — so the map was always
empty outside demo.

Normalize both REST and Automerge event data to include latitude/
longitude aliases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:10:44 -07:00
Jeff Emmett aa02473d0d fix(shell): evict tab pane from cache on script load failure
When a module script (e.g. canvas-*.js) fails to load (502 during
deploy, network error), the pane stayed in cache with a blank canvas.
Subsequent tab switches showed the broken cached pane instead of
re-fetching. Now script onerror removes the failed tag and evicts
the pane, so the next switchTo does a fresh fetch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:10:23 -07:00
Jeff Emmett 44a69e665e perf(rmaps): preload MapLibre GL, switch CDN from unpkg to jsDelivr
Add <link rel="preload"> hints for MapLibre JS+CSS in the module HTML
so the browser starts fetching them in parallel with the main bundle,
instead of waiting until joinRoom() calls loadMapLibre().

Switch from unpkg (slow, no HTTP/2) to jsDelivr (faster edge caching).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:03:21 -07:00
Jeff Emmett 101cc3b848 fix(shell): show rApp info popup once per module, then only via icon
Extract autoShowIfFirstVisit() so it runs both on initial page load
and on SPA tab switches. Uses localStorage rapp_info_seen_{moduleId}
to ensure each rApp's landing popup shows exactly once.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:01:54 -07:00
Jeff Emmett 355d33768a fix(mobile): responsive parity — touch targets, iOS zoom, viewport clamping
rNotes: always-visible add button on touch, 36px toolbar buttons with horizontal
scroll, URL popover as bottom sheet on mobile, improved comment sidebar bottom
panel with drag handle, larger footer buttons, slash menu viewport clamping and
mobile-friendly item sizes, reduced code-textarea/image-preview heights.

rTasks/rFiles: font-size 16px on inputs to prevent iOS Safari auto-zoom.

Shell: .hover-reveal touch utility, 36px min-height on rapp-nav buttons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:59:04 -07:00
Jeff Emmett 0d7c6d08b3 fix(canvas): mobile touch — first touch moves, long-press selects, extra-long opens context menu
Three-tier touch interaction on mobile canvas:
- Immediate drag on finger movement (8px threshold)
- Long press (500ms) selects shape with haptic feedback
- Extra long press (1000ms) opens context menu
- Cancel timers on movement or two-finger gesture

Skip pointerdown selection for touch events in canvas.html,
handle via touch-select custom event from folk-shape instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:58:11 -07:00
Jeff Emmett c046acf9ce fix(blender): switch from Ollama to Gemini Flash for script generation
Ollama runs CPU-only on Netcup — 7B models take minutes, exceeding
Cloudflare's 100s timeout (524). Gemini 2.0 Flash responds in seconds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:51:35 -07:00
Jeff Emmett 4a75c64a18 feat(rdesign): rich landing page, Scribus canvas tool, icon update
- Replace minimal rDesign landing with full rl-* pattern (hero, features,
  how-it-works, capabilities, open source, data protection, CTA)
- Add Scribus button to Create toolbar group in canvas (folk-design-agent)
- Export FolkDesignAgent from lib/index.ts, register in canvas.html
- Update module icon from 🎯 to 🎨 (matches favicon + MODULE_META)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:51:31 -07:00
Jeff Emmett 6d20a275ff fix(rwallet): show all chains with activity, fix chain filter stats
- Backend: detect chains where Safe has transaction history even if
  current balance is zero (queries all-transactions?limit=1)
- Frontend: stats (Total Value, Tokens) now update when clicking
  chain filter buttons instead of always showing all-chain totals

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:50:20 -07:00
Jeff Emmett d7c1501d4f feat(rnotes): Google Docs-style suggestion mode + comment panel fixes
Rewrite suggestion plugin to use ProseMirror props (handleTextInput,
handleKeyDown, handlePaste) instead of broken filterTransaction approach.
Typed text gets suggestionInsert mark (green underline), deleted text gets
suggestionDelete mark (red strikethrough). Add per-suggestion accept/reject
popover and review bar with Accept All / Reject All.

Fix comment panel text overflow with box-sizing: border-box, add
collapse/minimize toggle button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:48:16 -07:00
Jeff Emmett 0db5addc17 fix(rdesign): switch to StreamableHTTP transport, fix KiCad Python path
SSE transport crashes on concurrent connections (supergateway
single-session limit). StreamableHTTP supports multiple sessions.
Also set KICAD_PYTHON=/usr/bin/python3 for existsSync validation
and install missing requests package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:48:11 -07:00
Jeff Emmett e0e9802bd7 feat(rwallet): use CoinGecko Demo API key for batch token pricing
Reads COINGECKO_API_KEY from env (injected via Infisical) and appends
x_cg_demo_api_key param. Enables batch lookups + spam filtering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:45:45 -07:00
Jeff Emmett 1c338529bf fix(presence): relay presence-leave messages and clean up listener on disconnect
- Server now relays presence-leave alongside presence messages for immediate peer removal
- Overlay properly unsubscribes leave listener on disconnectedCallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:42:49 -07:00
Jeff Emmett 2f8ce08e3c feat: add rDesign module metadata, collab presence-leave cleanup
- Register rDesign in folk-rapp MODULE_META and shell FAVICON_BADGE_MAP
- Handle explicit presence-leave messages for immediate peer cleanup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:35:10 -07:00
Jeff Emmett 6b81f808f5 feat(canvas): mobile toolbar flush, zoom icon toggle, SW update banner
- Mobile toolbar collapsed position now flush with bottom-toolbar (bottom: 8px)
- Toolbar defaults to collapsed on mobile (<768px)
- Zoom expand/minimize uses distinct icons (magnifier +/-) instead of CSS rotation
- SW update banner on all pages: "New version available — Tap to update"
  - Detects controllerchange + updatefound events
  - Purple gradient bar, dismissible, reloads on tap
  - Added to both shell.ts (module pages) and canvas.html (standalone)
- folk-rapp: filter picker/switcher by enabled modules
- server/shell: react to modules-changed event for runtime module toggling
- collab-presence: minor overlay updates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:34:48 -07:00
Jeff Emmett 76a846cc36 fix(rwallet): handle CoinGecko free tier 1-address limit gracefully
Single-token wallets get CoinGecko verification + spam filtering.
Multi-token wallets attempt batch (works with Pro/Demo keys), degrade
gracefully on free tier — Safe API trusted+exclude_spam handles most spam.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:31:44 -07:00
Jeff Emmett 110b733f94 fix(rnotes): Google Docs-like comment sidebar, fix suggestions + duplicate extensions
- Fix duplicate tiptap extension warnings by disabling link/underline in
  StarterKit v3 (which now includes them by default)
- Move comment panel from metaZone (destroyed by renderMeta) to dedicated
  comment sidebar next to the editor, Google Docs style
- Add click-on-highlight to open comment thread in sidebar
- New comment creation shows inline textarea with auto-focus
- Fix suggestion plugin: pass view getter instead of broken state.view access
- Improve comment panel styling: avatars, Google Docs yellow active border,
  cleaner thread layout, Ctrl+Enter to submit, Escape to cancel
- Bump folk-notes-app cache version to v=7

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:29:21 -07:00
Jeff Emmett 8ba14a0e15 fix(rwallet): skip spam filter when CoinGecko data unavailable
Revert per-address batching (rate limit cascade). Track cgAvailable flag
in cache — only apply spam filter when CoinGecko successfully returned data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:25:48 -07:00
Jeff Emmett 395623af66 feat(rdesign): deploy KiCad & FreeCAD MCP as Docker sidecars
Switch from broken StdioClientTransport (child process) to
SSEClientTransport (HTTP to sidecar containers via supergateway).
Both sidecars share rspace-files volume so generated CAD files
(STEP, STL, Gerber, SVG) are directly servable without copying.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:25:23 -07:00
Jeff Emmett 95246743c3 fix(rwallet): batch CoinGecko requests to 1 address each (free tier limit)
CoinGecko free tier now limits to 1 contract address per request.
Process in batches of 3 concurrent single-address requests with 1.5s delay.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:17:03 -07:00
Jeff Emmett 55b973ebc2 fix(blender): use correct Ollama model (qwen2.5-coder:7b)
qwen2.5:14b doesn't exist on the server, causing silent 404 from
Ollama and 502 to the client. Also added error logging for non-ok
Ollama responses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:10:11 -07:00
Jeff Emmett 1a422f06ac feat(canvas): add first-time forgotten shapes explainer tooltip
Shows a one-time onboarding tooltip when users first encounter a faded
(forgotten) shape. Explains right-click to remember/forget permanently,
the Hide Forgotten toggle in profile menu, and highlights the Collective
Memory graph as a prototype feature. Persisted via localStorage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:09:05 -07:00
Jeff Emmett 5f853322b0 fix(rwallet): filter spam tokens via CoinGecko verification
ERC-20 tokens not recognized by CoinGecko and valued < $1 by Safe API
are now stripped from balance responses, removing fake ETH and airdrop spam.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 16:08:52 -07:00