Commit Graph

521 Commits

Author SHA1 Message Date
Jeff Emmett b525b14dda Update task task-001 2025-12-07 12:50:32 -08:00
Jeff Emmett df9655bb10 feat: add StandardizedToolWrapper and fix map interactions
- Wrap map component in StandardizedToolWrapper with header bar
- Add onPointerDown={stopPropagation} to all sidebar interactive elements
- Add handleMapWheel that forwards wheel zoom to map component
- Add pinnedToView, tags, isMinimized props for consistency
- Fix TypeScript type for stopPropagation handler

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 12:44:48 -08:00
Jeff Emmett 8771fb04b7 Merge branch 'feature/mapshapeutil-fixes' into dev
Resolve conflict by taking feature branch MapShapeUtil changes for:
- Higher z-index on map buttons
- pointer-events: auto for clickability
- handleWheel with preventDefault for map zoom

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 11:49:44 -08: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 d491d3ea72 Update task task-004 2025-12-06 22:43:37 -08:00
Jeff Emmett 494f2fa025 Update task task-024 2025-12-06 22:43:25 -08:00
Jeff Emmett 48c7e1decb fix: MapShapeUtil cleanup errors and schema validation
- Add isMountedRef to track component mount state
- Fix map initialization cleanup with named event handlers
- Add try/catch blocks for all MapLibre operations
- Fix style change, resize, and annotations effects with mounted checks
- Update callbacks (observeUser, selectSearchResult, findNearby) with null checks
- Add legacy property support (interactive, showGPS, showSearch, showDirections, sharingLocation, gpsUsers)
- Prevents 'getLayer' and 'map' undefined errors during component unmount
- Complete Mapus-style UI with sidebar, search, find nearby, annotations, and drawing tools

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 22:42:59 -08:00
Jeff Emmett 8d4562848a fix: MapShapeUtil cleanup errors and schema validation
- Add isMountedRef to track component mount state
- Fix map initialization cleanup with named event handlers
- Add try/catch blocks for all MapLibre operations
- Fix style change, resize, and annotations effects with mounted checks
- Update callbacks (observeUser, selectSearchResult, findNearby) with null checks
- Add legacy property support (interactive, showGPS, showSearch, showDirections, sharingLocation, gpsUsers)
- Prevents 'getLayer' and 'map' undefined errors during component unmount
- Complete Mapus-style UI with sidebar, search, find nearby, annotations, and drawing tools

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 22:39:45 -08:00
Jeff Emmett 23c1705d97 Update task task-024 2025-12-06 22:32:53 -08:00
Jeff Emmett 88e4a034e1 Create task task-043 2025-12-06 22:31:37 -08:00
Jeff Emmett bb3c531513 Update task task-024 2025-12-06 22:21:50 -08:00
Jeff Emmett 623190fb6a Update task task-024 2025-12-05 23:22:36 -08:00
Jeff Emmett 70085852d8 feat: add canvas users to CryptID connections dropdown
Shows all collaborators currently on the canvas with their connection status:
- Green border: Trusted (edit access)
- Yellow border: Connected (view access)
- Grey border: Not connected

Users can:
- Add unconnected users as Connected or Trusted
- Upgrade Connected users to Trusted
- Downgrade Trusted users to Connected
- Remove connections

Also fixes TypeScript errors in networking module.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 23:08:16 -08:00
Jeff Emmett bb22ee62d2 Update task task-027 2025-12-05 22:55:21 -08:00
Jeff Emmett 6775dcca93 fix: correct networking imports and API response format
- Fix useSession → useAuth import (matches actual export)
- Fix GraphEdge properties: source/target instead of fromUserId/toUserId
- Add missing trustLevel, effectiveTrustLevel to edge response
- Add myConnections to NetworkGraph type
- Prefix unused myConnections param with underscore

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 22:51:58 -08:00
Jeff Emmett e30dd4d1ec Update task task-041 2025-12-05 22:46:57 -08:00
Jeff Emmett fad0c8af9a Create task task-042 2025-12-05 22:46:50 -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 633dfcb294 Update task task-024 2025-12-05 22:40:20 -08:00
Jeff Emmett 9b350a9863 Update task task-018 2025-12-05 22:39:25 -08:00
Jeff Emmett 1359283a79 Update task task-041 2025-12-05 22:38:33 -08:00
Jeff Emmett 9d513e37bd feat: implement user permissions system (view/edit/admin)
Phase 1 of user permissions feature:
- Add board permissions schema to D1 database
  - boards table with owner, default_permission, is_public
  - board_permissions table for per-user permissions
- Add permission types (PermissionLevel) to worker and client
- Implement permission API handlers in worker/boardPermissions.ts
  - GET /boards/:boardId/permission - check user's permission
  - GET /boards/:boardId/permissions - list all (admin only)
  - POST /boards/:boardId/permissions - grant permission (admin)
  - DELETE /boards/:boardId/permissions/:userId - revoke (admin)
  - PATCH /boards/:boardId - update board settings (admin)
- Update AuthContext with permission fetching and caching
  - fetchBoardPermission() - fetch and cache permission for a board
  - canEdit() - check if user can edit current board
  - isAdmin() - check if user is admin for current board
- Create AnonymousViewerBanner component with CryptID signup prompt
- Add CSS styles for anonymous viewer banner
- Fix automerge sync manager to flush saves on peer disconnect

Permission levels:
- view: Read-only, cannot create/edit/delete shapes
- edit: Can modify board contents
- admin: Full access + permission management

Next steps:
- Integrate with Board component for read-only mode
- Wire up permission checking in Automerge sync
- Add permission management UI for admins

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-05 22:27:12 -08:00
Jeff Emmett 8e9f6fbd19 Update task task-041 2025-12-05 22:24:37 -08:00
Jeff Emmett 96abf73e48 Create task task-041 2025-12-05 22:17:54 -08:00
Jeff Emmett 776ea78543 Update task task-027 2025-12-05 14:05:24 -08:00
Jeff Emmett 9df6943c30 Create task task-040 2025-12-05 13:58:56 -08:00
Jeff Emmett 26ebed5c5d chore: exclude open-mapping from build, fix TypeScript errors
- Add src/open-mapping/** to tsconfig exclude (21K lines, to harden later)
- Delete MapShapeUtil.backup.tsx
- Fix ConnectionStatus type in OfflineIndicator
- Fix data type assertions in MapShapeUtil (routing/search)
- Fix GoogleDataService.authenticate() call with required param
- Add ts-expect-error for Automerge NetworkAdapter 'ready' event
- Add .wasm?module type declaration for Wrangler imports
- Include GPS location sharing enhancements in MapShapeUtil

TypeScript now compiles cleanly. Vite build needs NODE_OPTIONS for memory.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 12:16:29 -08:00
Jeff Emmett 698d3a2c71 Update task task-024 2025-12-04 21:35:10 -08:00
Jeff Emmett a1bef4174a chore: add D1 database ID and refactor MapShape
- Add production D1 database ID for cryptid-auth
- Refactor MapShapeUtil for cleaner implementation
- Add map layers module
- Update UI components

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 21:32:46 -08:00
Jeff Emmett e9fef27f82 Update task task-024 2025-12-04 21:29:10 -08:00
Jeff Emmett 79626b0b0e Update task task-024 2025-12-04 20:01:59 -08:00
Jeff Emmett a5148e9f38 Update task task-027 2025-12-04 19:53:01 -08:00
Jeff Emmett 4b2e81a35b Update task task-037 2025-12-04 19:52:54 -08:00
Jeff Emmett 07425ba15b Update task task-024 2025-12-04 19:52:54 -08:00
Jeff Emmett bf4d8095e7 Merge feature/open-mapping: Automerge CRDT sync and open-mapping module
Key changes:
- Automerge CRDT infrastructure for offline-first sync
- Open-mapping collaborative route planning module
- MapShape integration with canvas
- Connection status indicator
- Binary document persistence in R2
- Resolved merge conflicts with PrivateWorkspace feature

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 19:48:38 -08:00
Jeff Emmett f73e223349 Update task task-024 2025-12-04 19:45:28 -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 17250fe056 Update task task-027 2025-12-04 19:42:48 -08:00
Jeff Emmett be08a49e27 Update task task-005 2025-12-04 19:41:18 -08:00
Jeff Emmett f81994714b Update task task-039 2025-12-04 19:41:04 -08:00
Jeff Emmett b01bfb830d Update task task-039 2025-12-04 19:40:55 -08:00
Jeff Emmett d4a0950eff 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 6012b3dad9 Update task task-039 2025-12-04 18:45:13 -08:00
Jeff Emmett 682a0bf8d9 Update task task-039 2025-12-04 18:35:47 -08:00
Jeff Emmett 74ddadc5cb Update task task-039 2025-12-04 18:28:48 -08:00
Jeff Emmett 1d591e4648 Update task task-039 2025-12-04 18:21:01 -08:00
Jeff Emmett b3be1863ae Create task task-039 2025-12-04 18:12:01 -08:00
Jeff Emmett 3829ae2c52 Update task task-038 2025-12-04 18:00:58 -08:00
Jeff Emmett b06d55dfb3 Create task task-038 2025-12-04 18:00:52 -08:00
Jeff Emmett e341c45c55 Update task task-035 2025-12-04 18:00:10 -08:00