Commit Graph

412 Commits

Author SHA1 Message Date
Jeff Emmett d672275adf feat: combine email verification and device linking into single flow
- Modified handleRequestDeviceLink to accept unverified/new emails
- User can now create account via email on any device
- handleLinkDevice now also verifies email when completing device link
- Updated frontend CryptID.tsx with contextual messaging
- Added needsUsername flow for new account creation via email
- One click now verifies email AND links device, saving user steps

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 04:47:40 -08:00
Jeff Emmett be6f58630f Create task task-021 2025-12-04 04:37:30 -08:00
Jeff Emmett cbc3c8d802 Create task task-020 2025-12-04 04:32:18 -08:00
Jeff Emmett c0310791ae feat: add CryptID email recovery and device management
- Add /verify-email and /link-device routes to App.tsx
- Add email linking flow to CryptID.tsx (register with email option)
- Add Profile.tsx email management UI (link email, view/revoke devices)
- Add comprehensive crypto-auth.css styling for modals
- Update worker/types.ts with D1 schema types
- Add CryptID auth API routes to worker.ts

Requires D1 database setup before deployment:
- task-018: Create cryptid-auth D1 database
- task-019: Configure SendGrid secrets
- task-017: Test on dev environment

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 04:26:06 -08:00
Jeff Emmett f15f46f742 Update task task-001 2025-12-04 04:13:56 -08:00
Jeff Emmett 9c1e8cbcaa Update task task-001 2025-12-04 04:09:47 -08:00
Jeff Emmett 60a6825dfd chore: clean up duplicate task-016 files
Removed auto-generated duplicates that were overwritten.
Correct tasks are now task-018 and task-019.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 04:04:57 -08:00
Jeff Emmett 0edac2968b Update task task-015 2025-12-04 04:03:00 -08:00
Jeff Emmett 1ccaf32d1a Update task task-018 2025-12-04 04:02:57 -08:00
Jeff Emmett a6f2d6e015 Update task task-017 2025-12-04 04:02:50 -08:00
Jeff Emmett f5c775e417 Create task task-019 2025-12-04 04:02:22 -08:00
Jeff Emmett 7191e2543d Create task task-018 2025-12-04 04:02:21 -08:00
Jeff Emmett cd58b1c1cd fix: accept all valid tldraw fractional indices (b1, c10, etc.)
The index validation was incorrectly rejecting valid tldraw fractional
indices like "b1", "c10", etc. tldraw's fractional indexing uses:
- First letter (a-z) indicates integer part length (a=1 digit, b=2 digits)
- Followed by alphanumeric characters for value and jitter

This was causing ValidationError on production for Embed shapes with
index "b1". Fixed regex in all validation functions to accept any
lowercase letter prefix, not just 'a'.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 04:01:35 -08:00
Jeff Emmett 01b5a84e42 Create task task-016 2025-12-04 04:01:02 -08:00
Jeff Emmett 478c1f6774 Create task task-017 2025-12-04 04:00:59 -08:00
Jeff Emmett 420ad28d9a Create task task-016 2025-12-04 04:00:57 -08:00
Jeff Emmett b1c3ceeab7 Create task task-016 2025-12-04 04:00:55 -08:00
Jeff Emmett a5c5c7f441 Create task task-015 2025-12-04 04:00:53 -08:00
Jeff Emmett abb80c05d8 fix: improve Multmux terminal resize handling
- Add ResizeObserver for reliable resize detection
- Use requestAnimationFrame for smoother fit operations
- Apply full-size styles to xterm elements after fit
- Hide tags to maximize terminal area
- Fix flex layout for proper container sizing
- Add error handling for fit operations during rapid resize

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 03:54:51 -08:00
Jeff Emmett 5ca4b19aec Update task task-014 2025-12-04 03:47:40 -08:00
Jeff Emmett 1d212c385d Create task task-014 2025-12-04 03:46:50 -08:00
Jeff Emmett 26a15b7aaf feat: add custom system prompt support to LLM utility
- Allow passing full system prompts (>100 chars) or personality IDs
- Auto-detect prompt type based on length
- Pass custom prompts through provider chain with retry logic

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 03:16:13 -08:00
Jeff Emmett 2cee2cb31b feat: improve Markdown tool toolbar UX
- Increase default width from 500px to 650px to fit full toolbar
- Add fixed-position toggle button (top-right) that doesn't move between states
- Remove horizontal scrollbar with overflow: hidden
- Add right padding to toolbar for toggle button space
- Tighten toolbar spacing (gap: 1px, padding: 4px 6px)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 03:00:48 -08:00
Jeff Emmett 26a931acf5 feat: refine Mycelial Intelligence prompt for concise, action-focused responses
- Shorten system prompt to emphasize brevity (1-3 sentences)
- Add explicit "never write code unless asked" instruction
- Include good/bad response examples for clarity
- Focus on suggesting tools and canvas actions over explanations
- Remove verbose identity/capability descriptions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 02:39:05 -08:00
Jeff Emmett f3a9a28724 Replace CLAUDE.md symlink with actual file for Docker compatibility
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 02:29:06 -08:00
Jeff Emmett b2a7879d2c fix: make Markdown tool dark mode reactive to theme changes
- Replace useMemo with useState + MutationObserver for isDarkMode detection
- Add MDXEditor's built-in 'dark-theme' class for proper toolbar/icon theming
- Theme now switches instantly when user toggles dark/light mode

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 22:57:25 -08:00
Jeff Emmett 5f2166075b Fix Traefik routing - use single service for multiple routers
Traefik cannot auto-link routers when multiple services are defined.
Fixed by using a single service (canvas) that both routers explicitly
reference via the .service label.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 22:52:41 -08:00
Jeff Emmett ebf602fd21 Create task task-high.02 2025-12-03 22:35:50 -08:00
Jeff Emmett 0906704693 Create task task-high.01 2025-12-03 22:34:45 -08:00
Jeff Emmett 343f408661 Add production Traefik labels for jeffemmett.com
- Add router rules for jeffemmett.com and www.jeffemmett.com
- Keep staging.jeffemmett.com for testing
- Preparing for migration from Cloudflare Pages to Docker deployment

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 22:34:34 -08:00
Jeff Emmett 49cf763858 Update task task-013 2025-12-03 22:29:46 -08:00
Jeff Emmett d73aee3530 Create task task-013 2025-12-03 22:29:30 -08:00
Jeff Emmett 8bb87075ad Update task task-012 2025-12-03 22:29:14 -08:00
Jeff Emmett 42c3ec7587 Fix npm peer dependency conflict with --legacy-peer-deps 2025-12-03 22:06:09 -08:00
Jeff Emmett 55ac9381fa Add Docker configuration for self-hosted deployment
- Dockerfile: Multi-stage build with Vite frontend, nginx for serving
- nginx.conf: SPA routing, gzip, security headers
- docker-compose.yml: Traefik labels for staging.jeffemmett.com

Backend sync still uses Cloudflare Workers (jeffemmett-canvas.jeffemmett.workers.dev)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 22:03:25 -08:00
Jeff Emmett d89fb4baaf 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 b8d014a0af Create task task-001 2025-12-03 15:42:13 -08:00
Jeff Emmett c396bbca85 feat: standardize tool shapes with pin functionality and UI improvements
- Add pin functionality to ImageGen and VideoGen shapes
- Refactor ImageGen to use StandardizedToolWrapper with tags support
- Update StandardizedToolWrapper: grey tags, fix button overlap, improve header drag
- Fix index validation in AutomergeToTLStore for old format indices
- Update wrangler.toml with latest compatibility date and RunPod endpoint docs
- Refactor VideoGen to use captured editor reference for consistency

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 21:14:51 -08:00
Jeff Emmett 090646f893 fix: sanitize shape indices and improve RunPod error handling
- Add index sanitization in Board.tsx to fix "Expected an index key"
  validation errors when selecting shapes with old format indices
- Improve RunPod error handling to properly display status messages
  (IN_PROGRESS, IN_QUEUE, FAILED) instead of generic errors
- Update wrangler.toml with current compatibility date and document
  RunPod endpoint configuration for reference
- Add sanitizeIndex helper function to convert invalid indices like
  "b1" to valid tldraw fractional indices like "a1"

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 20:26:51 -08:00
Jeff Emmett 829dd4f642 fix: increase VideoGen timeout to 6 minutes for GPU cold starts
Video generation on RunPod can take significant time:
- GPU cold start: 30-120 seconds
- Model loading: 30-60 seconds
- Generation: 60-180 seconds

Increased polling timeout from 4 to 6 minutes and updated UI
to set proper expectations for users.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 18:51:41 -08:00
Jeff Emmett f2a77580b1 feat: add default RunPod endpoints for all AI services
All RunPod API functions now have hardcoded fallback values so
every user can access AI features without needing their own keys:

- Image Generation: Automatic1111 endpoint (tzf1j3sc3zufsy)
- Video Generation: Wan2.2 endpoint (4jql4l7l0yw0f3)
- Text Generation: vLLM endpoint (03g5hz3hlo8gr2)
- Transcription: Whisper endpoint (lrtisuv8ixbtub)
- Ollama: Netcup AI Orchestrator (ai.jeffemmett.com)

This ensures ImageGen, VideoGen, Mycelial Intelligence, and
transcription work for all users of the canvas out of the box.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 18:41:21 -08:00
Jeff Emmett e230d571e4 feat: add default AI endpoints for all users
Hardcoded fallback values for Ollama and RunPod text endpoints so
that all users have access to AI features without needing to
configure their own API keys:

- Ollama: defaults to https://ai.jeffemmett.com (Netcup AI Orchestrator)
- RunPod Text: defaults to pre-configured vLLM endpoint

This ensures Mycelial Intelligence works for everyone out of the box.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 18:38:09 -08:00
Jeff Emmett d42bae52d7 fix: register FathomNoteShape in customShapeUtils
The FathomNote shape was being created by FathomMeetingsBrowserShape
but wasn't registered with tldraw, causing "No shape util found for
type FathomNote" errors when loading canvases with Fathom notes.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 16:22:23 -07:00
Jeff Emmett dba981c2af fix: improve index migration to handle all invalid formats
- Added isValidTldrawIndex() function to properly validate tldraw
  fractional indices (e.g., "a1", "a1V" are valid, "b1", "c1" are not)
- Apply migration to IndexedDB data as well as server data
- This fixes ValidationError when loading old data with invalid indices

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 16:19:30 -07:00
Jeff Emmett 179a03057e 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 439a7f07e8 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 c070e673ad fix: migrate invalid shape indices in old data
Adds migrateStoreData() function to fix ValidationError when loading
old data with invalid index keys (e.g., 'b1' instead of fractional
indices like 'a1V'). The migration detects invalid indices and
regenerates valid ones using tldraw's getIndexAbove().

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 22:40:21 -08:00
Jeff Emmett c175c0f29a fix: handle corrupted shapes causing "No nearest point found" errors
- Add cleanup routine on editor mount to remove corrupted draw/line shapes
  that have no points/segments (these cause geometry errors)
- Add global error handler to suppress geometry errors from tldraw
  instead of crashing the entire app
- Both fixes ensure old JSON data with corrupted shapes loads gracefully

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 22:21:24 -08:00
Jeff Emmett 928a535aec fix: resolve TypeScript errors for Cloudflare Pages build
- Fix undefined 'result' variable reference in useWhisperTranscriptionSimple.ts
- Add type guards for array checks in ImageGenShapeUtil.tsx output handling
- Add Record<string, any> type assertions for response.json() calls in llmUtils.ts
- Remove unused 'isDark' parameter from MicrophoneIcon component
- Remove unused 'index' parameter in components.tsx map callback

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 21:51:54 -08:00
Jeff Emmett 33ff5216cc 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