Split monolithic index.ts (~1400 lines) into modular structure:
- config.ts: Server configuration and constants
- db/: Database initialization, migrations, and seeds
- routes/: API handlers by domain (themes, canvas, components, etc.)
- services/: Terminal WebSocket server
- utils/: CORS helpers
Entry point now only coordinates initialization.
- Add token API endpoint to server for storing/retrieving pending tokens
- Add token polling in frontend to auto-detect and connect with tokens
- Add xterm dependencies for terminal functionality
- Add terminal page support in toolRegistry
- Server keeps PTY sessions alive on client disconnect
- Output buffer replays history on reconnect
- FloatingTerminal component accessible from any page
- Responsive: floating window on desktop, fullscreen on mobile
- macOS-style header with traffic light buttons
- Add /source page with file explorer and code viewer
- Connect to Gitea API for repository browsing
- Implement MCP tools: get_repo_info, list_repo_files, read_repo_file, search_repo_code
- Default to nucleo000/agent-ui repository
- Support branch switching and file search
- Add project_canvas and canvas_components tables for persistent canvas storage
- Add ProjectCanvas store with full CRUD operations
- Add ProjectCanvasPage for rendering saved canvas with components
- Add ProjectsPage for managing canvas list (create, clone, delete)
- Add HomePage that loads default canvas or falls back to dynamic canvas
- Add toolbar support for displaying canvas as pages with custom icons
- Add component usage validation to prevent deletion of components in use
- Add MCP tools for canvas management (list, create, update, delete, clone)
- Update router with /canvas/:id and /projects routes
- Update Toolbar to show dynamic canvas pages from database
Backend:
- Add PUT /api/themes/:id endpoint for updating existing themes
Store:
- Add updateTheme method to theme store
MCP:
- Add update_theme tool to modify name, description, or save current variables
UI:
- Add edit button to ThemeListItem (custom themes only)
- Add edit modal with name and description fields
- Support editing from both desktop sidebar and mobile dropdown
- Backend: themes table and API endpoints (CRUD, export, design-tokens)
- Theme store with preview, apply, and persistence
- ThemesPage with collapsible variables editor and live preview
- Components: ColorPicker (HSL), VariableEditor, ThemePreview, ThemeListItem
- Integration: $theme helper for dynamic components, get_design_tokens MCP tool
- Navigation: /themes route with palette icon in toolbar
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add dynamicComponents.ts service (~300 lines)
- CSS scoping with high specificity
- Async setup support with Suspense
- Event bus for inter-component communication
- Shared Pinia store with main app
- No app overhead (uses render + createVNode)
- Add MCP tools for Vue components
- render_vue_component
- save_vue_component
- load_vue_component
- list_vue_components
- delete_vue_component
- Add SQLite table for component persistence
- Add TypeScript declarations for webmcp
- Configure Vite for runtime template compilation
- Add comprehensive README with documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>