How ruben-hayrapetyan/ccanvas works
ccanvas is a desktop/web infinite-canvas workspace for driving Claude Code alongside shells, files, editors, and live previews. The main workflow is to create or open a folder-bound canvas, add and arrange widgets, work in agents or terminals, and save the workspace. Supporting branches cover agent status and transcript-derived context, file and editor access, and workspace navigation and recall. The README documents several capabilities whose implementations were not sampled; those are represented at their documented paths, with uncertain internal wiring omitted.
Main entry points: workspace.ts Workspace store · backend.ts Backend client · Canvas.tsx Infinite canvas · terminal.ts Terminal runtime
Components 24
Canvas surface
- App shell
src/App.tsx - Infinite canvas
src/canvas/Canvas.tsx - Canvas elements
src/canvas/ElementView.tsx
Workspace state
- Workspace store
src/store/workspace.ts - Workspace persistence
src/lib/persistence.ts
Agents and widgets
- Terminal runtime
src/lib/terminal.ts - Agent orchestration
src/lib/agents.ts - Session transcripts
src/lib/transcript.ts - Context meter
src/lib/context.ts - Session titles
src/lib/sessionTitle.ts - Widget views
src/widgets/TerminalBody.tsx - File and editor views
src/widgets/FilesBody.tsx
System integrations
- Backend client
src/lib/backend.ts - Desktop backend
src-tauri/src/lib.rs - Native PTY
src-tauri/src/pty.rs - Local web backend
server/pty-server.mjs - Plan usage
src-tauri/src/plan_usage.rs
Navigation and tools
- Follow camera
src/ui/FollowController.tsx - Canvas search
src/ui/CanvasSearch.tsx - File tracking
src/lib/tracker.ts - Memory panel
src/ui/MemoryPanel.tsx - Checkpoints
src/lib/checkpoints.ts - Prompt library
src/ui/PromptLibrary.tsx
Other components
- Workspace user
Connections 23
- Workspace user → App shell: uses
- App shell → Infinite canvas: renders
- Infinite canvas → Workspace store: reads and updates
- Infinite canvas → Canvas elements: renders
- Workspace store → Workspace persistence: loads and saves
- Workspace store → Backend client: opens and saves files
- Canvas elements → Widget views: renders widgets
- Widget views → Terminal runtime: starts sessions
- Terminal runtime → Backend client: connects for PTY
- Backend client → Desktop backend: invokes desktop commands
- Desktop backend → Native PTY: manages PTYs
- Backend client → Local web backend: requests local services
- Agent orchestration → Terminal runtime: manages agents
- Context meter → Session transcripts: reads session data
- Session titles → Session transcripts: reads session data
- Follow camera → Workspace store: selects and centers agents
- Follow camera → Agent orchestration: observes status
- Canvas search → Workspace store: searches and focuses
- File tracking → Workspace store: tracks agent files
- Memory panel → Backend client: reads folder memory
- Checkpoints → Backend client: uses Git and files
- Prompt library → Workspace store: manages prompts
- Plan usage → Backend client: provides plan usage