Commit Graph

68 Commits

Author SHA1 Message Date
Jeff Emmett 5eac403211 fix: align vitest version with coverage-v8 to fix CI
Updated vitest from 3.2.4 to 4.0.16 to match @vitest/coverage-v8 4.0.16

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 18:41:41 +01:00
Jeff Emmett 9410961486 chore: add Web3/wallet dependencies
Added wagmi, viem, and related packages for wallet integration:
- wagmi: React hooks for Ethereum
- viem: Low-level Ethereum interactions
- @tanstack/react-query: Data fetching for wallet state
- @web3modal/wagmi: WalletConnect modal
- @noble/hashes, @noble/secp256k1: Cryptographic utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 18:25:40 +01:00
Jeff Emmett db070f47ee fix: resolve Three.js Text component error and modal close issues
- Downgrade three.js from 0.182 to 0.168 to fix customDepthMaterial
  getter-only property breaking change (drei issue #2403)
- Add stable useCallback for modal close handler to prevent
  reference instability
- Improve ESC key handler with ref pattern and capture phase
  to ensure reliable modal closing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 15:08:55 -05:00
Jeff Emmett 525ea694b5 feat: add PWA support for offline cold load
- Add vite-plugin-pwa with Workbox caching strategy
- Cache all static assets (JS, CSS, HTML, fonts, WASM)
- Enable service worker in dev mode for testing
- Add PWA manifest with app name and icons
- Add SVG icons for PWA (192x192 and 512x512)
- Increase cache limit to 10MB for large chunks (Board ~8MB)
- Add runtime caching for API responses and Google Fonts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 21:34:05 -05:00
Jeff Emmett 98a4aee927 feat: 3D network graph with trust clustering and broadcast mode
3D Visualization (NetworkGraph3D):
- Three.js force-directed graph with React Three Fiber
- Trust-level shells: trusted (inner), connected (middle), unconnected (outer)
- Node sizing proportional to decision power (incoming connections)
- Animated particle flows along edges showing delegation direction
- Zoom to user with smooth camera animation
- Orbit controls for 3D navigation (drag rotate, scroll zoom)

Broadcast Mode:
- "View as User" button syncs camera to selected user's view
- Visual indicator at top: "Viewing as [User] - ESC to exit"
- ESC or X key to stop following
- URL deep linking with ?followId parameter

UI Improvements:
- Panel now stacks directly above tldraw minimap
- Matched width (200px) with minimap for alignment
- Fixed D3 simulation stability (was reinitializing every render)
- 3-state display: minimized icon, normal panel, maximized 3D modal

Dependencies:
- three@^0.182.0
- @react-three/fiber@8.17.10 (React 18 compatible)
- @react-three/drei@9.114.3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 21:06:50 -05:00
Jeff Emmett 4f6ff1797f feat: add worker unit tests for CryptID auth handlers
- Create 25 unit tests for CryptID authentication handlers
- Add vitest.worker.config.ts for worker test environment
- Update CI workflow to run worker tests
- Test coverage for:
  - handleCheckUsername (validation, normalization)
  - handleLinkEmail (validation, database errors)
  - handleVerifyEmail (token validation)
  - handleRequestDeviceLink (validation, 404 handling)
  - handleLinkDevice (token validation)
  - handleLookup (publicKey validation)
  - handleGetDevices (auth validation)
  - handleRevokeDevice (auth and validation)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 02:46:28 -05:00
Jeff Emmett a662b4798f feat: add comprehensive test suite for CRDT, offline storage, and auth
- Add Vitest for unit tests with jsdom environment
- Add Playwright for E2E browser testing
- Create 27 unit tests for WebCrypto and IndexedDB
- Create 27 E2E tests covering:
  - Real-time collaboration (CRDT sync)
  - Offline storage and cold reload
  - CryptID authentication flows
- Add CI/CD workflow with coverage gates
- Configure test scripts in package.json

Test Results:
- Unit tests: 27 passed
- E2E tests: 26 passed, 1 flaky

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 02:42:01 -05:00
Jeff Emmett c2469a375d perf: optimize bundle size with lazy loading and dependency removal
- Add route-level lazy loading for all pages (Default, Board, Dashboard, etc.)
- Remove gun, webnative, holosphere dependencies (175 packages removed)
- Stub HoloSphereService for future Nostr integration (keeps h3-js for holon calculations)
- Stub FileSystemContext (webnative removed)
- Defer Daily.co initialization until needed
- Add loading spinner for route transitions
- Remove large-utils manual chunk from vite config

Initial page load significantly reduced - heavy Board component (7.5MB)
now loads on-demand instead of upfront.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 18:59:52 -05:00
Jeff Emmett 2988b84689 feat: add Drawfast tool, improve share UI, and various UI enhancements
New features:
- Add Drawfast tool and shape for quick drawing
- Add useLiveImage hook for real-time image generation
- Improve ShareBoardButton with better UI and functionality

UI improvements:
- Refactor CryptIDDropdown for cleaner interface
- Enhance components.tsx with better tool visibility handling
- Add context menu and toolbar enhancements
- Update MycelialIntelligenceBar styling

Backend:
- Add board permissions API endpoints
- Update worker with new networking routes
- Add html2canvas dependency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 00:03:12 -05:00
Jeff Emmett 81140bd397 feat: add invite/share feature with QR code, URL, NFC, and audio connect
- Add InviteDialog component with tabbed interface for sharing boards
- Add ShareBoardButton component to toolbar
- Integrate qrcode.react for QR code generation
- Implement Web NFC API for NFC tag writing
- Add placeholder for audio connect feature (coming soon)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 05:35:30 +01:00
Jeff Emmett 637f05b715 fix: enable open-mapping module with TypeScript fixes
- Fix unused parameter errors (prefix with underscore)
- Fix TrustCircleManager API: add getTrustLevel/setTrustLevel methods
- Fix MyceliumNetwork method calls: addNode→createNode, addHypha→createHypha
- Fix createCommitment signature to use CommitmentParams object
- Fix GeohashCommitment type with proper geohash field
- Fix PRECISION_CELL_SIZE usage (returns {lat,lng} object)
- Add type assertions for fetch response data
- Fix MapCanvas attributionControl type
- Fix GPSCollaborationLayer markerStyle merge with defaults
- Update MapShapeUtil with better event handling:
  - Raise z-index to 10000 for all map buttons
  - Add pointerEvents: auto for button clickability
  - Add handleWheel with preventDefault to enable map zoom
  - Add capturePointerEvents for proper interaction

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 11:48:49 -08:00
Jeff Emmett 5af19bbbb2 feat: integrate read-only mode for board permissions
- Add permission fetching and state management in Board.tsx
- Fetch user's permission level when board loads
- Set tldraw to read-only mode when user has 'view' permission
- Show AnonymousViewerBanner for unauthenticated users
- Banner prompts CryptID sign-up with your specified messaging
- Update permission state when user authenticates
- Wire up permission API routes in worker/worker.ts
  - GET /boards/:boardId/permission
  - GET /boards/:boardId/permissions (admin)
  - POST /boards/:boardId/permissions (admin)
  - DELETE /boards/:boardId/permissions/:userId (admin)
  - PATCH /boards/:boardId (admin)
- Add X-CryptID-PublicKey to CORS allowed headers
- Add PUT, PATCH, DELETE to CORS allowed methods

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 22:45:31 -08:00
Jeff Emmett 2dd8f90d5b feat: implement binary Automerge CRDT sync and open-mapping module
Binary Automerge Sync:
- CloudflareAdapter: binary sync messages with documentId tracking
- Message buffering for early server messages before documentId set
- Worker sends initial sync on WebSocket connect
- Removed JSON HTTP POST sync in favor of native Automerge protocol
- Multi-client binary sync verified working

Worker CRDT Infrastructure:
- automerge-init.ts: WASM initialization for Cloudflare Workers
- automerge-sync-manager.ts: sync state management per peer
- automerge-r2-storage.ts: binary document persistence to R2
- AutomergeDurableObject: integrated CRDT sync handling

Open Mapping Module:
- Collaborative map component with real-time sync
- MapShapeUtil for tldraw canvas integration
- Presence layer with location sharing
- Privacy system with ZK-GPS protocol concepts
- Mycelium network for organic route visualization
- Conic sections for map projection optimization
- Discovery system (spores, hunts, collectibles, anchors)
- Geographic transformation utilities

UI Updates:
- ConnectionStatusIndicator for offline/sync status
- Map tool in toolbar
- Context menu updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 19:45:02 -08:00
Jeff Emmett b183a4f7ea Add backlog tasks from worktrees and feature branches
- task-002: RunPod AI API Integration (worktree: add-runpod-AI-API)
- task-003: MulTmux Web Integration (worktree: mulTmux-webtree)
- task-004: IO Chip Feature (worktree: feature/io-chip)
- task-005: Automerge CRDT Sync
- task-006: Stripe Payment Integration
- task-007: Web3 Integration
- task-008: Audio Recording Feature
- task-009: Web Speech API Transcription
- task-010: Holon Integration
- task-011: Terminal Tool
- task-012: Dark Mode Theme

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:56:54 -08:00
Jeff Emmett 139abcb5f2 fix: override sharp to 0.33.5 for Cloudflare Pages compatibility
Sharp 0.33.5 has prebuilt binaries for linux-x64 while the older
0.32.x version in @xenova/transformers requires native compilation.
Using npm overrides to force 0.33.5 throughout the dependency tree.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 23:15:32 -08:00
Jeff Emmett ee13540646 fix: skip optional deps to avoid sharp compilation on Cloudflare Pages
Added omit=optional to .npmrc to prevent @xenova/transformers from
trying to compile sharp with native dependencies. Sharp is only used
for server-side image processing which isn't needed in the browser.

Also added override for sharp version in package.json as fallback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 23:03:36 -08:00
Jeff Emmett 3738b9c56b feat: fix Holon shape H3 validation + offline persistence + geometry error handling
Holon Shape Improvements:
- Add H3 cell ID validation before connecting to Holosphere
- Extract coordinates and resolution from H3 cell IDs automatically
- Improve data rendering with proper lens/item structure display
- Add "Generate H3 Cell" button for quick cell ID creation
- Update placeholders and error messages for H3 format
- Fix HolonBrowser validation and placeholder text

Geometry Error Fix:
- Add try-catch in ClickPropagator.eventHandler for shapes with invalid paths
- Add try-catch in CmdK for getShapesAtPoint geometry errors
- Prevents "No nearest point found" crashes from corrupted draw/line shapes

Offline Persistence:
- Add IndexedDB storage adapter for Automerge documents
- Implement document ID mapping for room persistence
- Merge local and server data on reconnection
- Support offline editing with automatic sync

Other Changes:
- Update .env.example with Ollama and RunPod configuration
- Add multmux Docker configuration files
- UI styling improvements for toolbar and share zone
- Remove auto-creation of MycelialIntelligence shape (now permanent UI bar)
- Various shape utility minor fixes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 21:36:02 -08:00
Jeff Emmett 144f5365c1 feat: move Mycelial Intelligence to permanent UI bar + fix ImageGen RunPod API
- Mycelial Intelligence UI refactor:
  - Created permanent floating bar at top of screen (MycelialIntelligenceBar.tsx)
  - Bar stays fixed and doesn't zoom with canvas
  - Collapses when clicking outside
  - Removed from toolbar tool menu
  - Added deprecated shape stub for backwards compatibility with old boards

- ImageGen RunPod fix:
  - Changed from async /run to sync /runsync endpoint
  - Fixed output parsing for output.images array format with base64

- Other updates:
  - Added FocusLockIndicator and UserSettingsModal UI components
  - mulTmux server and shape updates
  - Automerge sync and store improvements
  - Various CSS and UI refinements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 23:57:26 -08:00
Jeff Emmett 1aec51e97b feat: add mulTmux collaborative terminal tool
Add mulTmux as an integrated workspace in canvas-website project:

- Node.js/TypeScript backend with tmux session management
- CLI client with blessed-based terminal UI
- WebSocket-based real-time collaboration
- Token-based authentication with invite links
- Session management (create, join, list)
- PM2 deployment scripts for AI server
- nginx reverse proxy configuration
- Workspace integration with npm scripts

Usage:
- npm run multmux:build - Build server and CLI
- npm run multmux:start - Start production server
- multmux create <name> - Create collaborative session
- multmux join <token> - Join existing session

See MULTMUX_INTEGRATION.md for full documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 02:41:03 -08:00
Jeff Emmett e69fcad457 fix: preserve coordinates and convert geo shape text during JSON import
- Fix coordinate collapse bug where shapes were resetting to (0,0)
- Convert geo shape props.text to props.richText (tldraw schema change)
- Preserve text in meta.text for backward compatibility
- Add .nvmrc to enforce Node 20
- Update package.json to require Node >=20.0.0
- Add debug logging for sync and import operations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:14:23 -07:00
Jeff Emmett e96e6480fe refactor: remove OddJS dependency and fix Automerge sync
Major Changes:
- Fix Automerge "Document unavailable" error by awaiting repo.find()
- Remove @oddjs/odd package and all related dependencies (205 packages)
- Remove location sharing features (OddJS filesystem-dependent)
- Simplify auth to use only CryptoAuthService (WebCryptoAPI-based)

Auth System Changes:
- Refactor AuthService to remove OddJS filesystem integration
- Update AuthContext to remove FileSystem references
- Delete unused auth files (account.ts, backup.ts, linking.ts)
- Delete unused auth components (Register.tsx, LinkDevice.tsx)

Location Features Removed:
- Delete all location components and routes
- Remove LocationShareShape from shape registry
- Clean up location references across codebase

Documentation Updates:
- Update WEBCRYPTO_AUTH.md to remove OddJS references
- Correct component names (CryptoLogin → CryptID)
- Update file structure and dependencies
- Fix Automerge README WebSocket path documentation

Build System:
- Successfully builds without OddJS dependencies
- All TypeScript errors resolved
- Production bundle size optimized

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 20:19:02 -07:00
Jeff Emmett 32e5fdb21c refactor: move wrangler config files to root directory
Moved wrangler.toml and wrangler.dev.toml from worker/ to root directory to fix Cloudflare Pages deployment. Updated package.json scripts to reference new config locations. This resolves the "Missing entry-point to Worker script" error during Pages builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 19:17:54 -07:00
Jeff Emmett fe2253e6c0 fix: move wrangler.dev.toml to worker/ directory to fix Pages deployment
Cloudflare Pages was detecting wrangler.dev.toml at root level and
switching to Worker deployment mode (running 'npx wrangler deploy')
instead of using the configured build command ('npm run build').

Changes:
- Move wrangler.dev.toml to worker/ directory alongside wrangler.toml
- Update all package.json scripts to reference new location
- Simplify .cfignore since all wrangler configs are now in worker/

This allows Pages to use the correct build command and deploy the
static site with proper routing for /contact and /presentations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 18:43:34 -07:00
Jeff Emmett 2f53818b47 chore: remove Vercel dependencies
- Remove @vercel/analytics package
- Remove vercel CLI package
- Site uses Cloudflare Pages for deployment

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 17:52:32 -07:00
Jeff Emmett 59d0b9a5ff fix: move Worker config to separate file for Pages compatibility
Move wrangler.toml to worker/wrangler.toml to separate Worker and Pages configurations.
Cloudflare Pages was trying to read wrangler.toml and failing because it contained
Worker-specific configuration (Durable Objects, migrations, etc.) that Pages doesn't support.

Changes:
- Move wrangler.toml → worker/wrangler.toml
- Update deploy scripts to use --config worker/wrangler.toml
- Pages deployment now uses Cloudflare dashboard configuration only

This resolves the deployment error:
"Configuration file cannot contain both 'main' and 'pages_build_output_dir'"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 04:14:40 -07:00
Jeff Emmett 8a45c16b5c update package.json, remove cloudflare worker deployment 2025-11-10 12:46:49 -08:00
Jeff Emmett e727deea19 everything working in dev 2025-11-10 11:06:13 -08:00
Jeff Emmett a2e9893480 automerge, obsidian/quartz, transcribe attempt, fix AI APIs 2025-09-21 11:43:06 +02:00
Jeff Emmett 38566e1a75 separate worker and buckets between dev & prod, fix cron job scheduler 2025-09-04 15:12:44 +02:00
Jeff Emmett bab61ecf6b update env vars 2025-09-01 20:47:22 +02:00
Jeff Emmett dfd6e03ca2 Merge branch 'auth-webcrypto' 2025-08-25 16:11:46 +02:00
Jeff Emmett 2db320a007 shared piano in progress 2025-08-23 16:07:43 +02:00
Jeff Emmett 71a6b29165 add in gestures and ctrl+space command tool (TBD add global LLM) 2025-07-29 16:02:51 -04:00
Jeff Emmett bc831c7516 implemented collections and graph layout tool 2025-07-29 14:52:57 -04:00
Jeff Emmett 39294a2f0c auth in progress 2025-04-17 15:51:49 -07:00
Shawn Anderson 1ca84d958d Revert "update wrangler"
This reverts commit 5ebd37dd6c.
2025-04-16 13:05:52 -07:00
Jeff-Emmett 5ebd37dd6c update wrangler 2025-04-08 15:32:37 -07:00
Jeff-Emmett 12d26d0643 Fixed asset upload CORS for broken links, updated markdown tool, changed keyboard shortcuts & menu ordering 2025-03-19 17:24:22 -07:00
Jeff-Emmett d4bd27dd6a update wrangler 2025-02-08 17:57:50 +01:00
Jeff-Emmett ff95f95f2f working llm util 2025-01-23 22:38:27 +01:00
Jeff-Emmett a0e73b0f9e slidedeck shape installed, still minor difficulty in keyboard arrow transition between slides (last slide + wraparound) 2025-01-23 14:14:04 +01:00
Jeff-Emmett 2590a86352 added scoped propagators (with javascript object on arrow edge to control) 2025-01-21 23:25:28 +07:00
Jeff-Emmett 6f5ee6a673 removed padding from printtoPDF, hid mycrozine template tool (need to fix sync), cleaned up redundancies between app & board, installed marked npm package, hid markdown tool (need to fix styles) 2025-01-03 09:42:53 +07:00
Jeff Emmett fb3a525340 videochat tool update 2024-12-08 18:13:47 -05:00
Jeff Emmett 0259ae4149 fix vitejs plugin dependency 2024-12-08 14:01:30 -05:00
Jeff Emmett 330378b99b update package engine 2024-12-08 13:58:40 -05:00
Jeff Emmett ab5e401fdf update jspdf package types 2024-12-08 13:54:58 -05:00
Jeff Emmett 10c191212c PrintToPDF integration 2024-12-08 13:31:53 -05:00
Jeff Emmett f186d69886 fix dev script 2024-12-07 22:49:39 -05:00
Jeff Emmett d63ff44c03 npm 2024-12-07 22:48:02 -05:00