Add comprehensive integration tests for Auto Run and Session List
interaction in AutoRunSessionList.test.tsx (26 tests):
- Session Selection (7 tests): session switching loads correct
Auto Run content, preserves document selection, handles groups
and different folder paths, graceful unconfigured session handling
- Session Deletion (5 tests): deleting active session switches
to next with correct Auto Run, non-active and in-group deletion
- Group Filtering (7 tests): collapsing/expanding groups,
filtering sessions, drag-and-drop between groups
- Bookmarks (2 tests): bookmarking preserves state, selection works
- Edge Cases (4 tests): empty/long/unicode content, concurrent ops
This completes Phase 5 of the Auto Run testing improvement plan
with 103 integration tests total across 3 test files.
Created src/__tests__/integration/AutoRunRightPanel.test.tsx with 31 tests covering:
- Tab Switching State Management (8 tests): unsaved content behavior, external content changes via contentVersion, mode preservation, cursor position, dirty state, document selection, rapid tab switching
- Panel Resize Content Preservation (6 tests): content during width resize, collapse/reopen, mode during resize, scroll position, min/max width handling
- Expanded Modal Panel Sync (5 tests): content sync, mode changes, contentVersion updates, toggleAutoRunExpanded ref method
- Focus Management (2 tests): AutoRun focus on tab switch, focusAutoRun ref method
- State Persistence Across Tab Visibility (4 tests): unmount/remount behavior, saved content persistence, session change while on different tab
- Edge Cases (5 tests): null session, empty content, very long content, special characters, unicode
- Batch Run State Integration (2 tests): progress display on non-autorun tabs, locked editor during batch run
Tests document the expected behavior where AutoRun uses local content state for responsive typing that is NOT auto-synced to parent. Users must save changes before switching tabs to persist them.
Add comprehensive integration tests covering the interaction between
AutoRun component and batch processing. Tests verify:
- Batch run locks editing (readonly, cursor-not-allowed, keyboard disabled)
- Mode transitions (switches to preview during batch, restores after)
- Task checkbox updates during batch run
- Stop button cancels batch run
- Run button disabled when agent is busy/connecting
- Image upload disabled during batch run
- Imperative handle methods work during batch run
- State transitions from idle→running→stopping→stopped
Add comprehensive test coverage for Auto Run folder validation:
- 76 tests covering folder path validation, directory traversal
prevention, path normalization, subfolder scanning, hidden file
filtering, and symlink handling
- Completes Phase 4 of Testing-II plan (238 total tests)
Created AutoRunBlurSaveTiming.test.tsx with 26 tests covering:
- Save writes to correct session path (4 tests)
- Unsaved changes discarded on session switch (3 tests)
- savedContent state prevents duplicate saves (4 tests)
- Save clears dirty state (3 tests)
- Edge cases for save timing (5 tests)
- Save during batch run lock (2 tests)
- Save with missing required props (2 tests)
- savedContent state reset behavior (3 tests)
This completes Phase 1 of the Auto Run testing improvement plan with
a total of 69 tests across 3 test files.
Created AutoRunContentSync.test.tsx with 25 tests covering:
- Async content load protection (5 tests)
- Local edit state protection during async updates (3 tests)
- contentVersion force sync behavior (4 tests)
- Dirty state and save consistency (4 tests)
- Edge cases including unicode, long content, whitespace (6 tests)
- Saved content state reset on context change (3 tests)
These tests ensure that:
- Local edits are preserved when content prop changes without session/document change
- contentVersion changes force content sync (file watcher scenario)
- Dirty state tracks correctly across session/document switches
- Race conditions between typing and async prop updates are handled
Create AutoRunSessionIsolation.test.tsx with 18 tests covering:
- Session switching content isolation (editing in Session A doesn't affect Session B)
- Document switching within same session
- contentVersion force sync behavior for file watcher events
- Save/Revert with session context
- Dirty state tracking per session
- Rapid session switching
- Focus management on session switch
- Imperative handle with sessions (isDirty, save)
- Folder path isolation per session
All tests pass. This addresses the "No tests for session switching content isolation"
gap identified in Testing-II.md Phase 1 Task 1.1.
Move all built-in prompts from inline code to separate .md files in src/prompts/
for easier editing without code changes. Prompts use {{TEMPLATE_VARIABLES}} that
are substituted at runtime using the central substituteTemplateVariables function.
Changes:
- Add src/prompts/ directory with 7 prompt files (wizard, AutoRun, etc.)
- Add index.ts for central exports using Vite ?raw imports
- Add esbuild plugin in build-cli.mjs to support ?raw imports for CLI
- Update wizardPrompts.ts and phaseGenerator.ts to use central substitution
- Update CLAUDE.md documentation with new prompt location references
- Add TypeScript declaration for *.md?raw imports in global.d.ts
Claude ID: 38553613-f82f-4ce1-973e-fa80d42af3da
Maestro ID: b9bc0d08-5be2-4fdf-93cd-5618a8d53b35
Add a fully customizable theme option to the settings theme picker:
- New CustomThemeBuilder component with mini UI preview showing all 13 colors
- Initialize from any existing theme as a starting point
- Color pickers for each theme property (bgMain, accent, textMain, etc.)
- Export theme to JSON file / Import from JSON file
- Custom theme persists across app restarts via useSettings
- Tab key navigation cycles through all themes including custom
Claude ID: fa8f6ebc-92e4-49e3-acfa-ef202e664cf0
Maestro ID: b9bc0d08-5be2-4fdf-93cd-5618a8d53b35
- Version bump from 0.8.2 to 0.8.3 released 🚀
- Read-only mode now disabled during AutoRun execution 🔒
- Added locked tooltip explaining read-only restrictions during AutoRun 💬
- Read-only toggle shows warning styling when AutoRun active ⚠️
- Fixed layout alignment for session stats display area 📐
- Added comprehensive tests for AutoRun read-only interactions 🧪
- Improved user feedback for mode restrictions during automation 💡
- Enhanced UI consistency with minimum width constraints applied 📏
- Better visual indicators for locked functionality states added 🎨
- Test coverage expanded for new AutoRun safety features ✅
- Enhanced AutoRun state persistence across client connections 🔄
- Added local storage for AutoRun states in web server 💾
- New clients receive active AutoRun states upon connection 🔌
- Read-only mode pill locked during active AutoRun sessions 🔒
- Improved AutoRun state broadcasting with detailed logging 📡
- Added getAutoRunStates callback to WebSocket route handlers 🎯
- Enhanced AutoRun state synchronization for mobile clients 📱
- Better visual feedback for locked read-only mode states 👁️
- Improved debugging with comprehensive AutoRun state logging 🐛
- Seamless AutoRun experience across client reconnections ✨
Phase 2.7 of refactor - extracts the processInput function (~490 lines)
into a dedicated hook for handling user input processing:
- Slash command detection and execution for custom AI commands
- Message queuing when AI agent is busy (read-only/write mode handling)
- Terminal mode cd command tracking and cwd management
- Process spawning for Claude Code batch mode
- Broadcasting input to web clients
Hook receives processQueuedItemRef to avoid circular dependency issues
since processQueuedItem is defined later in the component.
Results:
- App.tsx: 6,095 → 5,627 lines (491 lines removed)
- New hook: 693 lines (useInputProcessing.ts)
- All 9000 tests pass
- Build successful
- Added debug logging for file write operations to trace cross-session contamination 🔍
- Removed automatic content update after save to prevent session mixing issues 🛡️
- Moved Cmd+S keyboard shortcut handling to unified keyboard event handler 🎹
- Added explicit event propagation control for better keyboard shortcut management ⚡
- Improved file save reliability during rapid session switching scenarios 🚀
- Enhanced debug console output for tracking write operations across sessions 📊
- Simplified save function to prevent unintended side effects on active sessions ✨
- Consolidated keyboard event handling into single comprehensive handler 🎯
- Added stopPropagation to Cmd+S to prevent conflicts with other shortcuts 🔒
- Streamlined content synchronization between editor and file system 🔄
- Fixed Auto Run content to always reload fresh data when switching sessions 🔄
- Prevented stale document content from displaying across different sessions 🚫
- Improved session switching behavior by forcing content refresh from disk 💾
- Enhanced data consistency when navigating between multiple sessions ✨
- Removed conditional loading that caused outdated content to persist 🧹
- Ensured Auto Run documents always show current file state 📄
- Streamlined content loading logic for better reliability 🎯
- Fixed bug where old session content would incorrectly appear 🐛
- Improved user experience with accurate document previews 👀
- Made session management more predictable and trustworthy 🔒
- Replaced auto-save with manual save model for better control 🎯
- Added Save and Revert buttons when content has unsaved changes 💾
- Implemented Cmd+S keyboard shortcut for quick saving ⌨️
- Fixed content cross-contamination between sessions and documents 🔒
- Moved content storage to per-session state instead of global 📦
- Added dirty state tracking to show when changes need saving 🚨
- Improved UI to hide controls when no folder is selected 🎨
- Added save confirmation before running batch operations ✅
- Enhanced modal with matching save/revert functionality 🔄
- Fixed image button visibility in both edit and preview modes 🖼️
- Removed PWA icon generation scripts for cleaner codebase 🧹
- Deleted Maestro icon generator script with conductor silhouette 🎭
- Removed GitHub community analytics scripts for stargazers/forkers 📊
- Added keyboard shortcuts support to tour overlay component ⌨️
- Enhanced quick actions modal with shortcut key display 🚀
- Added dynamic shortcut placeholder replacement in tour steps 🔄
- Improved tour descriptions with keyboard shortcut references 💡
- Added helper function for formatting shortcuts in tour text ✨
- Cleaned up package.json by removing unused script commands 📦
- Streamlined build process by removing icon generation dependencies 🏗️
Found expired OAuth token, attempting refresh...
Token refresh successful
# CHANGES
- Improved task count display in document selector with completion percentages 🎯
- Fixed content saving when switching between documents and sessions 💾
- Added starred session persistence through Claude session origins 🌟
- Enhanced document selector dropdown to show wider for better visibility 📐
- Fixed test cases for proper content preservation during switches ✅
- Added real-time task counting for all documents in the folder 📊
- Improved wizard validation to require agent name before proceeding 🧙
- Updated tests to use new starred session storage mechanism 🔧
- Fixed dropdown styling to properly highlight selected documents 🎨
- Enhanced auto-save behavior to prevent data loss between documents 🛡️
- Added leaderboard opt-out functionality with server removal request 🚪
- Enhanced focus toggle between input field and output panel 🔄
- Improved Auto Run stall detection for unchanged document content 🛑
- Added task completion counter display in Auto Run interface ✅
- Fixed scroll position synchronization between edit/preview modes 📜
- Updated shortcut labels to preserve user's custom key bindings ⌨️
- Added hover bridge for thinking status dropdown accessibility 🌉
- Enhanced toast duration formatting to support days display ⏱️
- Fixed history panel scroll position preservation on refresh 📍
- Added sidebar DOM focus for better keyboard navigation support 🎯
Created two new hooks to consolidate mobile-specific effects:
useMobileViewState (150 lines):
- Screen size tracking (isSmallScreen state with resize listener)
- Initial view state loading from localStorage
- Debounced persistence functions for view, history, and session state
useMobileAutoReconnect (110 lines):
- Auto-reconnect countdown timer when disconnected (30-second interval)
- Manages reconnectCountdown state with proper cleanup
mobile/App.tsx reduced from 1,134 → 1,089 lines (45 line reduction, 4.0%)
All tests pass (9000 tests)
Created new hook containing:
- Session state management (sessions, activeSessionId, activeTabId)
- Session logs state and fetching logic
- Session selection handlers (handleSelectSession, handleSelectTab, etc.)
- User log entry handler for command submission
- WebSocket event handlers for all session-related events
- Previous session state tracking for busy→idle transitions
Mobile App.tsx reduced from 1,407 → 1,134 lines (19.4% reduction)
- Created src/web/hooks/useMobileKeyboardHandler.ts (114 lines)
- Handles keyboard shortcuts: Cmd+J mode toggle, Cmd+[/] tab navigation
- Exported from web/hooks/index.ts with TypeScript types
- Mobile App.tsx reduced from 1,448 to 1,407 lines (41 line reduction)
- All 9000 tests pass
- Create useSortedSessions hook with:
- sortedSessions: Sessions sorted by group then alphabetically
- visibleSessions: Sessions visible for jump shortcuts (Opt+Cmd+NUMBER)
- stripLeadingEmojis: Utility to strip emojis for sorting
- compareNamesIgnoringEmojis: Comparator function for alphabetization
- App.tsx reduced from 6,071 → 6,017 lines (54 line reduction, 0.9%)
- Export hook and types from hooks/index.ts
- All tests pass (9000 tests)
Extract theme CSS variable management and scrollbar fade animation logic
into a dedicated hook. This continues the App.tsx decomposition effort.
- Created src/renderer/hooks/useThemeStyles.ts (97 lines)
- Sets --accent-color and --highlight-color CSS variables for scrollbar styling
- Manages scrollbar fade animations with scrolling/fading class toggles
- Proper cleanup for scroll and fade timeouts
- App.tsx reduced from 6,126 → 6,071 lines (55 line reduction)
- All 9000 tests pass
- Created src/renderer/hooks/useCliActivityMonitoring.ts (76 lines)
- Listens for CLI activity changes when CLI is running playbooks
- Updates session states to show busy when CLI is active
- Clears busy state when CLI activity ends (unless AI process is still running)
- Exported from hooks/index.ts with full TypeScript types
- App.tsx reduced from 6,165 → 6,126 lines (39 line reduction)
- All 9000 tests pass
Extract external history change listener into dedicated hook for better
code organization. Tab change broadcasting was already extracted to
useRemoteIntegration hook in Phase 2.2.
The new hook listens for onExternalChange events from CLI/external sources
and triggers history reload + panel refresh when changes are detected.