The server's serializeAsHTML() returns the full terminal screen state, not incremental chunks. Updated the dashboard to:
1. Handle initial_state event to receive current terminal state on connection
2. Replace output instead of appending (output event now replaces session.output)
3. Simplify renderSessionOutput() to always do full innerHTML replacement
This fixes the issue where output was being duplicated/appended incorrectly.
Embed SVG path data in TypeScript to enable runtime color switching based on app state (idle/processing/error) without maintaining multiple static SVG files.
Frontend now fetches existing sessions from /api/sessions when SSE connects.
Previously only listened for session_start events, causing sessions to
disappear after page reload.
Issue 1: Move focusSessionId out of settings to prevent localStorage persistence
- Moved focusSessionId to top-level state property (not in settings)
- Updated all references from state.settings.focusSessionId to state.focusSessionId
- Removed saveSettings() calls from session filter functions
Issue 2: Add active state to wrap toggle button
- Added .active class to wrap-toggle button when wrapText is enabled
- Updated updateSettingsUI() to toggle .active class based on wrapText state
Issue 3: Document auto-scroll ephemeral behavior
- Added comment explaining why auto-scroll is per-session and not persisted
- Clarifies this is intentional design decision
Issue 4: Replace inline styles with CSS class for session filter button
- Added .header-text-btn CSS class with styling
- Removed inline style attribute from sessions-filter-btn
QuestionPrompt has a questions array, not flat fields. Updated rendering
to iterate over each question item with its own header, question text,
and options.
Replaced placeholder index.html with a fully functional mobile-first dashboard that connects to the server via SSE and provides real-time session monitoring and prompt approval.
Features:
- Mobile-first design with large touch targets (44px min) and readable fonts
- SSE connection to /events with automatic reconnection on disconnect
- Live display of active sessions with collapsible output views
- Pending prompts section with approve/reject buttons
- Real-time updates for session start/end, streaming output, and prompts
- Dark mode by default with light mode support via prefers-color-scheme
- Plain text terminal output (monospace, scrolls to bottom)
- Connection status indicator in header
Implementation is a single HTML file (~300 lines) with inline CSS and vanilla JS, no frameworks or dependencies.
Moved index.ts to src/server.ts and created stub files for types, db, auth,
and cli modules. Added minimal placeholder for dashboard. Removed generated
README.md in favor of CLAUDE.md and docs/plan.md.