Commit Graph

18 Commits

Author SHA1 Message Date
Jeff Emmett a6008a4f2d refactor: complete rfunds → rflows rename across configs and references
Update docker-compose, vite config, Traefik labels, module imports,
and all cross-module references to use the new rflows naming.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 19:13:14 -08:00
Jeff Emmett e838cb9a7e feat: add colorful, spatially-enriched calendar event rendering
Progressive spatial detail across all zoom levels: stacked source-color
bars in multi-year, multi-dot indicators in year views, city chips in
season, colored bg tints with location labels in month/week/day views,
description previews and virtual platform badges in day detail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 18:20:14 -08:00
Jeff Emmett 5396c52c75 feat: add KOI-inspired knowledge provenance schema & calendar scheduling API
Add KnowledgeProvenance, ItemPreview, and ScheduledItemMetadata interfaces
to rcal schemas following BlockScience KOI's RID pattern. Extend POST
/api/events to accept scheduled knowledge items with provenance tracking,
add GET /api/events/scheduled endpoint with date/upcoming/pending filters,
and enable metadata patching on PATCH /api/events/:id for reminder status
updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 17:43:02 -08:00
Jeff Emmett bb052c49d3 feat: add universal reminders system with calendar integration & cross-module drag
Add a Reminders subsystem to rSchedule that lets users create date-based
reminders (free-form or linked to cross-module items), receive email
notifications via the existing tick loop, and sync bidirectionally with
rCal calendar events. Includes drag-and-drop from rWork task cards onto
calendar day cells to create reminders.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 17:37:54 -08:00
Jeff Emmett 63ac2a268e perf: parallelize local-first init — batch IDB loads, cache crypto keys, preload sync states
Sequential document loading during init() was the main bottleneck: each cached
doc required a serial IDB read + key derivation + decryption + Automerge.load.
With N documents this meant N× single-doc latency instead of 1×.

Changes:
- Add loadMany() to EncryptedDocStore for parallel Promise.all() batch loading
- Cache derived space/doc CryptoKeys in DocCrypto (one derivation per session)
- Add preloadSyncStates() to DocSyncManager for parallel sync state loading
- Update all 11 module local-first-client init() methods to use batch APIs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:18:55 -08:00
Jeff Emmett ebdda1e443 feat: enhanced rinbox multisig approval UI, module landing pages, help guide
- Rinbox: visual multisig approval cards with signer avatars, progress bars,
  email previews, status-colored borders, and compose-for-approval form
- Rinbox: help/guide popout with feature cards, how-it-works steps, use cases
- Rinbox: rich demo data with threaded comments, signer lists, multiple mailboxes
- Module landing pages: improved UX descriptions for rBooks, rCal, rNotes,
  rTrips, rVote, rWork with proper feature descriptions
- Added landingPage support to RSpaceModule interface and server routing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:05:08 -08:00
Jeff Emmett b6ddd4a833 fix: getApiBase() across all 16 rApp modules for subdomain routing
All modules had getApiBase() matching wrong module names (e.g. /vote
instead of /rvote) and requiring /{space}/ prefix in the URL path.
On subdomains like jeff.rspace.online, the browser URL is /rfunds/...
not /jeff/rfunds/..., so the regex never matched.

New pattern: /^(\/[^/]+)?\/rmodule/ handles both:
- Subdomain: /rfunds/... → base = /rfunds
- Direct: /demo/rfunds/... → base = /demo/rfunds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:01:06 -08:00
Jeff Emmett 8900eb32b9 feat: Phase 4 — remove PostgreSQL from 11 modules, switch to Automerge
Replace all sql.unsafe() calls with Automerge document operations
across rfunds, rbooks, rsplat, rnotes, rwork, rvote, rcal, rfiles,
rcart, rtrips, and rinbox. Only rforum retains PG (Discourse provisioning).

Each module now uses _syncServer.getDoc/changeDoc/setDoc for all CRUD,
with ensureDoc() helpers for lazy document creation. Schema SQL files
archived to .sql.archived. Adds Automerge round-trip test suite (35 tests).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:48:01 -08:00
Jeff Emmett 25174b87e6 fix: bump rCal JS cache version to v=4
Bust Cloudflare CDN cache after unified layout deploy.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:18:29 -08:00
Jeff Emmett 2ce0b4730c feat: rCal unified layout — no tabs, auto-map, lunar overlay, scroll zoom
Remove the 3-tab system (Temporal/Spatial/Lunar) in favor of a unified view:
- Calendar always primary with floating/docked/minimizable map panel
- Lunar phases as compact overlay bar below nav (click to expand synodic detail)
- Scroll/trackpad zoom controls temporal granularity with 120ms debounce
- 'm' key cycles map panel: floating → docked → minimized → floating
- Mobile: floating map full-width, docked stacks vertically
- cal-demo.ts cleaned up (dead tab-switching code removed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:07:31 -08:00
Jeff Emmett ef3d0ce447 feat: batch local-first migration for 10 modules (Phase 3)
Add Automerge schemas, lifecycle hooks (onInit, docSchemas), and
local-first client wrappers for all remaining PG modules:
rWork, rVote, rCal, rFiles, rCart, rBooks, rTrips, rInbox, rSplat, rFunds.

Each module now:
- Defines typed Automerge document schemas (schemas.ts)
- Registers docSchemas and onInit hook with SyncServer reference
- Moves initDB() from top-level to onInit for unified startup
- Has a client-side local-first wrapper (local-first-client.ts)

Dual-write route handlers will be wired incrementally per module
following the rNotes pattern established in Phase 2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 14:01:58 -08:00
Jeff Emmett b2ea5e04cf feat: unified space lifecycle & module scoping contract (Phase 0+1)
Extend RSpaceModule with scoping, lifecycle hooks (onInit, onSpaceCreate/Delete
with SpaceLifecycleContext, onSpaceEnable/Disable), and DocSchema support.
Add scoping to all 25 modules (8 space, 11 global-configurable, 6 global-fixed).
Consolidate 4 space creation endpoints into shared createSpace() function.
Add enabledModules enforcement middleware and module configuration API
(GET/PATCH /api/spaces/:slug/modules). Deprecation header on /api/communities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:35:41 -08:00
Jeff Emmett 347c7193d0 fix: rcal API base URL — match /rcal path and fall back to space attribute
The regex matched /cal instead of /rcal, so getApiBase() always returned
empty string, causing 404s on api/events, api/lunar, and api/sources.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 13:27:49 -08:00
Jeff Emmett 91494a9c5c feat: port spatio-temporal calendar from standalone rcal-online
Rewrite folk-calendar-view with 5 views (Day/Week/Month/Season/Year),
3 tabs (Temporal/Spatial/Lunar), Leaflet map with event markers and
transit polylines, temporal-spatial zoom coupling, and lunar phase display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 12:45:24 -08:00
Jeff Emmett 3808b51a64 feat: strip demo pages to show just the interactive component
Demo pages now render the same clean shell as regular spaces — just the
<folk-*> component full-page, no marketing wrapper (hero, feature cards,
CTA). Descriptions belong on landing pages, not demos.

- Remove demo branch from 7 module route handlers (rcal, rcart, rfunds,
  rnotes, rtrips, rtube, rvote)
- Delete 7 demo.ts files (~1200 lines of dead markup)
- Remove renderDemoShell() and DEMO_PAGE_CSS from server/shell.ts
- Remove demoPage field from RSpaceModule interface
- Rename top rApp dropdown item from "rSpace" to "rStack"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 15:03:46 -08:00
Jeff Emmett 4979c3d80c feat(rcal): replace static demo with interactive folk-calendar-view
The demo page was a frozen July 2026 static HTML grid with no real
functionality. Now embeds <folk-calendar-view space="demo"> which
provides full month/week/day views, navigation, lunar overlay, source
filtering, event modals, keyboard shortcuts, and 37 demo events.
Keeps hero, temporal zoom showcase, feature cards, ecosystem
integrations, and CTA sections around the interactive component.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:49:13 -08:00
Jeff Emmett 75b148e772 Merge branch 'dev'
# Conflicts:
#	modules/rcal/mod.ts
#	modules/rfiles/mod.ts
#	modules/rforum/mod.ts
#	modules/rmaps/mod.ts
#	modules/rnetwork/mod.ts
#	modules/rswag/mod.ts
#	modules/rwork/mod.ts
#	shared/module.ts
2026-02-28 19:51:51 -08:00
Jeff Emmett 5613370817 refactor: rename module directories to match r-prefixed module IDs
All 22 module directories under modules/ now match their module IDs
(e.g. modules/cart → modules/rcart, modules/canvas → modules/rspace).
Updated all import paths, vite build config, HTML template asset refs,
docker-compose standalone commands, and .gitignore accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:49:26 -08:00