Commit Graph

427 Commits

Author SHA1 Message Date
Jeff Emmett 8892a9cf3a feat: add Google integration to user dropdown and keyboard shortcuts panel
- Add Google Workspace integration directly in user dropdown (CustomPeopleMenu)
  - Shows connection status (Connected/Not Connected)
  - Connect button to trigger OAuth flow
  - Browse Data button to open GoogleExportBrowser modal
- Add toggleable keyboard shortcuts panel (? icon)
  - Shows full names of tools and actions with their shortcuts
  - Organized by category: Tools, Custom Tools, Actions, Custom Actions
  - Toggle on/off by clicking, closes when clicking outside
- Import GoogleExportBrowser component for data browsing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 19:21:21 -08:00
Jeff Emmett 09bce4dd94 feat: implement Phase 5 - permission flow and drag detection for data sovereignty
- Add VisibilityChangeModal for confirming visibility changes
- Add VisibilityChangeManager to handle events and drag detection
- GoogleItem shapes now dispatch visibility change events on badge click
- Support both local->shared and shared->local transitions
- Auto-detect when GoogleItems are dragged outside PrivateWorkspace
- Session storage for "don't ask again" preference

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:59:58 -08:00
Jeff Emmett 84c6bf834c feat: Add GoogleItemShape with privacy badges (Phase 4)
Privacy-aware item shapes for Google Export data:

- GoogleItemShapeUtil: Custom shape for Google items with:
  - Visual distinction: dashed border + shaded overlay for LOCAL items
  - Solid border for SHARED items
  - Privacy badge (🔒 local, 🌐 shared) in top-right corner
  - Click badge to trigger visibility change (Phase 5)
  - Service icon, title, preview, date display
  - Optional thumbnail support for photos
  - Dark mode support

- GoogleItemTool: Tool for creating GoogleItem shapes

- Updated ShareableItem type to include `service` and `thumbnailUrl`

- Updated usePrivateWorkspace hook to create GoogleItem shapes
  instead of placeholder text shapes

Items added from GoogleExportBrowser now appear as proper
GoogleItem shapes with privacy indicators inside the workspace.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 17:52:54 -08:00
Jeff Emmett 052c98417d feat: Add Private Workspace zone for data sovereignty (Phase 3)
- PrivateWorkspaceShapeUtil: Frosted glass container shape with:
  - Dashed indigo border for visual distinction
  - Pin/collapse/close buttons in header
  - Dark mode support
  - Position/size persistence to localStorage
  - Helper functions for zone detection

- PrivateWorkspaceTool: Tool for creating workspace zones

- usePrivateWorkspace hook:
  - Creates/toggles workspace visibility
  - Listens for 'add-google-items-to-canvas' events
  - Places items inside the private zone
  - Persists visibility state

- PrivateWorkspaceManager: Headless component that manages
  workspace lifecycle inside Tldraw context

Items added from GoogleExportBrowser will now appear in the
Private Workspace zone as placeholder text shapes (Phase 4
will add proper GoogleItemShape with visual badges).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:54:27 -08:00
Jeff Emmett 33f5dc7e7f refactor: Rename GoogleDataBrowser to GoogleExportBrowser
- Rename component file and interface for consistent naming
- Update all imports and state variables in UserSettingsModal
- Better reflects the purpose as a data export browser

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:46:10 -08:00
Jeff Emmett a754ffab57 feat(components): add GoogleDataBrowser popup modal
Phase 2 of Data Sovereignty Zone implementation:
- Create GoogleDataBrowser component with service tabs (Gmail, Drive, Photos, Calendar)
- Searchable item list with checkboxes for multi-select
- Select All/Clear functionality
- Dark mode support with consistent styling
- "Add to Private Workspace" button
- Privacy note explaining local-only encryption
- Emits 'add-google-items-to-canvas' event for Board.tsx integration

Integration with UserSettingsModal:
- Import and render GoogleDataBrowser when "Open Data Browser" clicked
- Handler for adding selected items to canvas

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:40:52 -08:00
Jeff Emmett c9c8c008b2 feat(settings): add Google Workspace integration card
Phase 1 of Data Sovereignty Zone implementation:
- Add Google Workspace section to Settings > Integrations tab
- Show connection status, import counts (emails, files, photos, events)
- Connect/Disconnect Google account buttons
- "Open Data Browser" button (Phase 2 will implement the browser)
- Add getStoredCounts() and getInstance() to GoogleDataService

Privacy messaging: "Your data is encrypted with AES-256 and stored
only in your browser. Choose what to share to the board."

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:33:39 -08:00
Jeff Emmett 8bc3924a10 Merge origin/main into feature/google-export
Bring in all the latest changes from main including:
- Index validation and migration for tldraw shapes
- UserSettingsModal with integrations tab
- CryptID authentication updates
- AI services (image gen, video gen, mycelial intelligence)
- Automerge sync improvements
- Various UI improvements

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:29:34 -08:00
Jeff Emmett e69ed0e867 feat: implement Google Data Sovereignty module for local-first data control
Core modules:
- encryption.ts: WebCrypto AES-256-GCM, HKDF key derivation, PKCE utilities
- database.ts: IndexedDB schema for gmail, drive, photos, calendar
- oauth.ts: OAuth 2.0 PKCE flow with encrypted token storage
- share.ts: Create tldraw shapes from encrypted data
- backup.ts: R2 backup service with encrypted manifest

Importers:
- gmail.ts: Gmail import with pagination and batch storage
- drive.ts: Drive import with folder navigation, Google Docs export
- photos.ts: Photos thumbnail import (403 issue pending investigation)
- calendar.ts: Calendar import with date range filtering

Test interface at /google route for debugging OAuth flow.

Known issue: Photos API returning 403 on some thumbnail URLs - needs
further investigation with proper OAuth consent screen setup.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 15:22:40 -08:00
Jeff Emmett 966e1855c1 chore: remove open-mapping files (should be on feature branch) 2025-12-04 06:45:27 -08:00
Jeff Emmett 8c90727b93 Create task task-024 2025-12-04 06:30:57 -08:00
Jeff Emmett 7a471b0e37 fix: properly validate tldraw fractional indexing format
The previous validation allowed "b1" which is invalid because 'b' prefix
expects 2-digit integers (10-99), not 1-digit. This caused ValidationError
when selecting old format content.

Now validates that:
- 'a' prefix: 1 digit (a0-a9)
- 'b' prefix: 2 digits (b10-b99)
- 'c' prefix: 3 digits (c100-c999)
- etc.

Invalid indices are converted to 'a1' as a safe default.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 06:30:50 -08:00
Jeff Emmett 068ff7d3be Merge main, resolve conflict taking remote 2025-12-04 15:04:22 +01:00
Jeff Emmett 075e317a0d Update backlog tasks from server 2025-12-04 15:02:54 +01:00
Jeff Emmett de770a4f91 docs: add data sovereignty architecture for Google imports and local file uploads
- Add GOOGLE_DATA_SOVEREIGNTY.md: comprehensive plan for secure local storage
  of Gmail, Drive, Photos, Calendar data with client-side encryption
- Add LOCAL_FILE_UPLOAD.md: multi-item upload tool with same encryption model
  for local files (images, PDFs, documents, audio, video)
- Update OFFLINE_STORAGE_FEASIBILITY.md to reference new docs

Key features:
- IndexedDB encrypted storage with AES-256-GCM
- Keys derived from WebCrypto auth (never leave browser)
- Safari 7-day eviction mitigations
- Selective sharing to boards via Automerge
- Optional encrypted R2 backup

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 04:47:22 -08:00
Jeff Emmett aa742919cb Update task task-018 2025-12-04 04:27:37 -08:00
Jeff Emmett 5a6e04f26b Update task task-017 2025-12-04 04:27:35 -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