Commit Graph

660 Commits

Author SHA1 Message Date
Jeff Emmett 8a4cc5dfae Create task task-060 2026-01-02 17:08:00 +01:00
Jeff Emmett 2783def139 backlog: Add document doc-001 2026-01-02 17:07:16 +01:00
Jeff Emmett 7d6d084815 Update task task-007 2026-01-02 16:54:59 +01:00
Jeff Emmett f17d6dea17 feat: enable custom tools in staging, add BlenderGen to context menu
- Changed feature flags to use VITE_WORKER_ENV instead of PROD
- Staging environment now shows experimental tools (Drawfast, Calendar, Workflow)
- Added BlenderGen to context menu "Create Tool" submenu
- Tools now available in both toolbar and right-click menu

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 15:35:44 +01:00
Jeff Emmett a45ad2844d fix: add type assertion for BlenderGen API response
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 14:23:28 +01:00
Jeff Emmett e891f8dd33 fix: video generation API routing and worker URL configuration
- Fix itty-router route patterns: :endpoint(*) -> :endpoint+
  The (*) syntax is invalid; :endpoint+ correctly captures multi-segment paths
- Update getWorkerApiUrl() to use VITE_WORKER_ENV for all environments
- Fix dev/staging worker URLs to use jeffemmett-canvas-automerge-dev
- Update wrangler.toml dev environment to use shared D1 database

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 14:21:10 +01:00
Jeff Emmett 7dd03b6f6f feat: add BlenderGen to toolbar menu
Added Blender 3D tool to the toolbar menu alongside Image and Video generation tools.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 13:05:28 +01:00
Jeff Emmett 0677ad3b5d feat: add BlenderGen shape for 3D Blender rendering
Add custom tldraw shape and tool for generating 3D renders via Blender:
- BlenderGenShapeUtil.tsx: custom shape with preset selector and controls
- BlenderGenTool.ts: toolbar tool for creating Blender render shapes
- Worker routes for /api/blender/render and /api/blender/status/:jobId
- Proxies requests to Netcup-hosted Blender render server

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 07:45:03 +01:00
Jeff Emmett 1b67a2fe7f fix: move Daily.co API key to server-side for security
- Worker now uses DAILY_API_KEY secret instead of client-sent auth header
- Added GET /daily/rooms/:roomName endpoint for room info lookup
- Frontend no longer exposes or sends API key
- All Daily.co API calls now proxied securely through worker

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:53:06 +01:00
Jeff Emmett d2101ef1cf fix: prevent onboarding tour tooltip from cutting off at step 4
Increased estimated tooltip height from 200px to 300px so the viewport
clamping function correctly positions the tooltip, keeping the Next
button visible on all steps.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 22:23:59 -05:00
Jeff Emmett 911881054a fix: improve E2E test stability with better canvas wait logic
- Wait for both .tl-container and .tl-canvas before interacting
- Add explicit waitFor in createShape and drawLine helpers
- Increase wait times for sync operations in CI
- Add retries for flaky offline tests
2025-12-26 20:39:37 -05:00
Jeff Emmett 0273133e0a feat: add Drawfast to toolbar (dev only)
Added Drawfast button to toolbar between VideoGen and Map.
Only visible in development mode.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:03:44 -05:00
Jeff Emmett bf9c9fad93 feat: enable Drawfast in dev, add Workflow to context menu
- Changed Drawfast from disabled to dev-only (can test in dev mode)
- Added WorkflowBlock to overrides.tsx for context menu support
- Added Workflow to context menu (dev only)

All three features (Drawfast, Calendar, Workflow) now available in dev only.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 16:51:10 -05:00
Jeff Emmett 36e269c55f feat: hide Drawfast and Calendar from context menu in production
Extended feature flags to context menu:
- ENABLE_DRAWFAST = false (disabled everywhere)
- ENABLE_CALENDAR = !IS_PRODUCTION (dev only)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 16:43:58 -05:00
Jeff Emmett 6a20897322 feat: disable Workflow, Calendar in production (dev only)
Added feature flags to conditionally disable experimental features:
- ENABLE_WORKFLOW: Workflow blocks (dev only)
- ENABLE_CALENDAR: Calendar shape/tool (dev only)
- Drawfast was already disabled

These features will only appear in development builds.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 16:38:42 -05:00
Jeff Emmett 57c49096de fix: use WORKER_URL for networking API to fix connections loading
The connectionService was using a relative path '/api/networking' which
caused requests to go to the Pages frontend URL instead of the Worker API.
This resulted in HTML being returned instead of JSON.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 10:49:03 -05:00
Jeff Emmett 101f386f4a feat: switch ImageGen from RunPod to fal.ai, reduce logging, disable Drawfast
- ImageGen now uses fal.ai Flux-Dev model instead of RunPod
  - Faster generation (no cold start delays)
  - More reliable (no timeout issues)
  - Simpler response handling

- Reduced verbose console logging in CloudflareAdapter
  - Removed debug logs for send/receive operations
  - Kept essential error logging

- Disabled Drawfast tool pending debugging (task-059)
  - Commented out imports and registrations in Board.tsx

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 00:33:47 -05:00
Jeff Emmett 4ce5524cfb Create task task-059 2025-12-25 23:37:36 -05:00
Jeff Emmett afc3a4fb7f fix: exclude automerge-repo-react-hooks from automerge chunk to fix React context loading order 2025-12-25 22:00:05 -05:00
Jeff Emmett 7f1315c2a8 refactor: improve unknown shape type handling and filtering
- Move CUSTOM_SHAPE_TYPES to module level for single source of truth
- Filter ALL unknown shape types (not just SharedPiano) to prevent validation errors
- Add detailed error logging for unknown shapes with fix instructions
- Fix MycelialIntelligenceShape comment (was incorrectly marked as deprecated)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 20:35:36 -05:00
Jeff Emmett 0aa74f952e Update task task-058 2025-12-25 20:26:35 -05:00
Jeff Emmett 5bad65eed6 feat: add server-side AI service proxies for fal.ai and RunPod
Add proxy endpoints to Cloudflare Worker for AI services, keeping
API credentials server-side for better security architecture.

Changes:
- Add fal.ai proxy endpoints (/api/fal/*) for image generation
- Add RunPod proxy endpoints (/api/runpod/*) for image, video, text, whisper
- Update client code to use proxy pattern:
  - useLiveImage.tsx (fal.ai live image generation)
  - VideoGenShapeUtil.tsx (video generation)
  - ImageGenShapeUtil.tsx (image generation)
  - runpodApi.ts (whisper transcription)
  - llmUtils.ts (LLM text generation)
- Add Environment types for AI service configuration
- Improve Automerge migration: compare shape counts between formats
  to prevent data loss during format conversion

To deploy, set secrets:
  wrangler secret put FAL_API_KEY
  wrangler secret put RUNPOD_API_KEY

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 20:26:04 -05:00
Jeff Emmett fc117299ab Update task task-027 2025-12-25 18:59:45 -05:00
Jeff Emmett 1063ea7730 fix: add debug logging and re-emit peer-candidate for Automerge sync
- Add extensive debug logging to track sync message flow
- Re-emit peer-candidate after documentId is set to trigger Repo sync
- Fix timing issue where peer connected before document existed
- This should enable Automerge binary sync protocol (task-027)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 18:59:21 -05:00
Jeff Emmett 142433669e Update task task-051 2025-12-25 18:38:50 -05:00
Jeff Emmett ad2cb095e0 Update task task-027 2025-12-25 18:38:09 -05:00
Jeff Emmett 0fc80f7496 fix: convert props.text to richText for text shape sync (task-026)
Text shapes arriving from other clients had props.text but the
deserialization code was initializing richText to empty before
deleting props.text, causing content loss.

Added text → richText conversion in AutomergeToTLStore.ts before
the empty initialization, similar to the existing conversion for
geo shapes.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 18:34:52 -05:00
Jeff Emmett 9a4cf18e13 Update task task-058 2025-12-25 18:33:19 -05:00
Jeff Emmett 406d5fb056 Update task task-026 2025-12-25 18:30:28 -05:00
Jeff Emmett 7ce7a9aab6 Create task task-058 2025-12-25 18:30:07 -05:00
Jeff Emmett ccb5acc164 perf: improve loading times with better code splitting
- Improve Vite chunk splitting (Board.js 7.3MB → 5.6MB, 23% smaller)
- Add separate chunks for codemirror, onnx, daily-video, sanitizers
- Enable gzip for wasm and octet-stream in nginx
- Add dns-prefetch and preconnect hints for worker URLs
- Increase gzip compression level to 6

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 23:36:57 -05:00
Jeff Emmett 6f606995a4 feat: update Docker config for VITE_WORKER_ENV support
- Dockerfile now uses VITE_WORKER_ENV instead of hardcoded worker URL
- docker-compose.yml uses VITE_WORKER_ENV=production
- docker-compose.dev.yml uses VITE_WORKER_ENV=staging (points to dev worker)
- Staging site will use jeffemmett-canvas-dev.jeffemmett.workers.dev

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 22:48:27 -05:00
Jeff Emmett f15397d19f fix: correct dev worker URL after deployment
- jeffemmett-canvas-dev.jeffemmett.workers.dev is the actual deployed URL

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 22:45:19 -05:00
Jeff Emmett cf554986a1 feat: add staging environment for Netcup deployment
- Update workerUrl.ts to support staging/dev environments pointing to Cloudflare dev worker
- 'staging' and 'dev' now use jeffemmett-canvas-automerge-dev worker
- 'local' still uses localhost:5172 for local development
- Set VITE_WORKER_ENV=staging when building for Netcup staging

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 22:32:19 -05:00
Jeff Emmett f9208719b0 fix: address multiple runtime issues
- Register missing shape types in Automerge schema (CalendarEvent, HolonBrowser, PrivateWorkspace, GoogleItem, WorkflowBlock)
- Improve connections API error handling to detect HTML responses gracefully
- Clean up Vite config debug logs
- Add static PWA manifest and link to index.html for proper manifest serving

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 21:06:20 -05:00
Jeff Emmett 0d6b62d1c7 fix: remove orphaned debug statements causing build errors
- Remove incomplete console.log cleanup artifacts across 17 files
- Fix orphaned object literals left from previous debug removal
- Prefix unused callback parameters with underscores
- Update Drawfast shape to side-by-side INPUT/OUTPUT layout (900x500)
- Remove unused overlay toggle from Drawfast controls

Files fixed: AutomergeToTLStore, TLStoreToAutomerge, useAutomergeSyncRepo,
FathomMeetingsPanel, NetworkGraphPanel, sessionPersistence, quartzSync,
testClientConfig, useCollaboration, Board, DrawfastShapeUtil,
FathomMeetingsBrowserShapeUtil, MapShapeUtil, FathomMeetingsTool,
HolonTool, overrides, githubSetupValidator

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 19:38:27 -05:00
Jeff Emmett 771840605a chore: remove verbose console.log debug statements
Cleaned up ~280 console.log statements across 64 files:
- Board.tsx: removed permission, auth, and shape visibility debug logs
- useWhisperTranscriptionSimple.ts: removed audio processing debug logs
- Automerge files: removed sync and patch debug logs
- Shape utilities: removed component lifecycle debug logs
- Lib files: removed API and config debug logs

Kept console.error and console.warn for actual error conditions.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:32:58 -05:00
Jeff Emmett c6f716bafa fix: add crossOrigin to video element to prevent tainted canvas errors
Videos from fal.media were causing "Tainted canvases may not be exported"
errors when tldraw tried to capture screenshots/exports. Adding crossOrigin="anonymous"
allows the browser to request the video with CORS headers.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:29:11 -05:00
Jeff Emmett 4f4555b414 feat: auto-configure FAL API key for Drawfast tool
- Updated LiveImageProvider to use getFalConfig() from clientConfig
- Drawfast now automatically uses the default FAL API key
- Users no longer need to manually enter API key to use the tool

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 11:07:57 -05:00
Jeff Emmett 6cff29e164 feat: disable Holon functionality via HOLON_ENABLED flag
- Added HOLON_ENABLED feature flag (set to false) to completely disable Holon functionality
- HoloSphereService methods now return early with default values when disabled
- Removed all console.log/error output when Holon is disabled
- HolonShapeUtil shows "Feature Disabled" message when flag is false
- HolonBrowser shows disabled message instead of attempting connections
- Code preserved for future Nostr integration re-enablement

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:54:13 -05:00
Jeff Emmett bba1f7955a fix: prevent stale cache issues with proper no-cache headers
- Add no-cache headers for index.html, sw.js, registerSW.js, manifest.webmanifest
- Add skipWaiting and clientsClaim to workbox config for immediate SW updates
- This ensures new deployments are picked up immediately without manual cache clearing

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:43:25 -05:00
Jeff Emmett 3ff8d5c692 chore: clean up verbose console logs in AuthContext and VideoChatShapeUtil
Removed debug console.log statements while keeping console.error for
actual error conditions. This reduces console noise during normal
operation.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:42:14 -05:00
Jeff Emmett c6ed0b77d8 fix: register Calendar and Drawfast shapes in automerge store
Added missing Calendar and Drawfast shapes to the automerge store
schema registration to fix ValidationError when using these tools.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:36:51 -05:00
Jeff Emmett c4cb97c0bf chore: disable Multmux, Holon, and MycroZineGenerator tools
Temporarily hiding these tools from context menu and toolbar
until they are in a better working state.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 09:17:50 -05:00
Jeff Emmett 0111f04db2 feat: enable all tools in context menu and toolbar for dev testing
Enabled:
- Drawfast
- Holon
- Multmux/Terminal
- MycroZineGenerator

All tools now available in both the right-click context menu and
the top toolbar for testing on the dev/staging branch.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 01:31:12 -05:00
Jeff Emmett 0329395362 feat: switch VideoGen from RunPod to fal.ai
- Add fal.ai configuration to clientConfig.ts with default API key
- Update VideoGenShapeUtil to use fal.ai WAN 2.1 endpoints
- I2V mode uses fal-ai/wan-i2v, T2V mode uses fal-ai/wan-t2v
- Much faster startup time (no cold start) vs RunPod
- Processing time reduced from 2-6 min to 30-90 seconds

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 20:31:04 -05:00
Jeff Emmett 79f3d7e96b feat: re-enable VideoGen tool in toolbar and context menu
Re-enabled the video generation tool for testing with the new fal.ai
MCP server backend. The tool was previously hidden while being developed.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 20:22:20 -05:00
Jeff Emmett 5fc505f1fc feat: add Flowy-like workflow builder system
Implements a visual workflow builder with:
- WorkflowBlockShapeUtil: Visual blocks with typed input/output ports
- WorkflowBlockTool: Click-to-place tool for adding blocks
- Block registry with 20+ blocks (triggers, actions, conditions, transformers, AI, outputs)
- Port validation and type compatibility checking
- WorkflowPropagator for real-time data flow between connected blocks
- Workflow executor for manual execution with topological ordering
- WorkflowPalette UI sidebar with searchable block categories
- JSON serialization for workflow export/import
- Workflow templates (API request, LLM chain, conditional)

Blocks are accessible via "Workflow Blocks" button in toolbar dropdown.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 15:45:27 -05:00
Jeff Emmett a938b38d1f fix: use BaseBoxShapeTool for CalendarTool
The custom StateNode click handler wasn't working properly.
Switched to BaseBoxShapeTool like MapTool for reliable click-to-place.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 12:00:17 -05:00
Jeff Emmett 80202b2357 chore: remove broken workflow files temporarily
The Flowy workflow files have TypeScript errors that prevent builds.
Removing them entirely until they can be properly fixed and tested.

Files removed:
- src/components/workflow/
- src/css/workflow.css
- src/lib/workflow/
- src/propagators/WorkflowPropagator.ts
- src/shapes/WorkflowBlockShapeUtil.tsx
- src/tools/WorkflowBlockTool.ts

The commented-out imports in Board.tsx and CustomToolbar.tsx remain
as documentation of what needs to be re-added.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 11:33:50 -05:00