Commit Graph

896 Commits

Author SHA1 Message Date
Pedram Amini
ccea26c27b MAESTRO: add Auto Run session switching E2E tests (Task 6.4)
Add comprehensive E2E tests for session switching with Auto Run:

- Session content preservation (4 tests): Display different content,
  preserve unsaved edits warning, restore content on round-trip,
  handle rapid switching
- Session document independence (5 tests): Different document lists,
  maintain selected document, correct task counts, isolate edits,
  handle unconfigured sessions
- Session mode preservation (3 tests): Edit/preview mode per session,
  scroll position, cursor position
- Session state isolation (4 tests): Dirty state, batch run state,
  undo/redo stacks, search state
- contentVersion handling (2 tests): Respect contentVersion changes,
  prevent content loss during concurrent operations
- Edge cases (4 tests): Empty document, very long document,
  special characters, images/attachments
- Session list integration (2 tests): Highlight correct session,
  update Auto Run on click
- Full integration (4 tests): Complete A->B->A cycle, switch during
  active edit (2 skipped for multi-session infrastructure)
- Accessibility (3 tests): Focus management, keyboard navigation,
  screen reader announcements

Also added 11 new session switching helper functions to the
electron-app.ts fixture for better test maintainability.

Total: 32 tests for session switching E2E coverage.
Completes Phase 6 of the Auto Run Testing Improvement Plan.
2025-12-14 05:14:13 -06:00
Pedram Amini
aa2108b27e MAESTRO: add Auto Run batch processing E2E tests (Task 6.3)
Add comprehensive E2E tests for batch processing functionality:
- Run button behavior (5 tests)
- Batch runner modal (5 tests)
- Task completion updates (5 tests, 2 skipped)
- Stop button behavior (4 tests - skipped)
- Editing lock during batch run (4 tests - skipped)
- Mode management (3 tests - skipped)
- Image upload state (2 tests - skipped)
- Multi-document support (5 tests - skipped)
- Progress display (3 tests - skipped)
- Accessibility (3 tests)
- Error handling (3 tests - skipped)

Also add 10 batch processing helper functions to e2e/fixtures/electron-app.ts.
2025-12-14 05:09:41 -06:00
Pedram Amini
bd7274797e MAESTRO: add Auto Run editing E2E tests (Task 6.2)
Created e2e/autorun-editing.spec.ts with 34 tests covering:
- Typing in edit mode (6 tests)
- Checkbox toggling (3 tests)
- Image paste and attachment (5 tests - skipped, need mocking)
- Mode switching (5 tests)
- Save and revert (3 tests)
- Search functionality (4 tests)
- Document selector (3 tests)
- Template variables (2 tests)
- Expanded modal (3 tests)
- Accessibility (3 tests)

Also expanded e2e/fixtures/electron-app.ts with 10 new Auto Run helper functions.
2025-12-14 05:05:49 -06:00
Pedram Amini
71c2d0dafe MAESTRO: add E2E test infrastructure and Auto Run setup wizard E2E test (Task 6.1)
- Install Playwright dependencies (@playwright/test, electron-playwright-helpers)
- Create playwright.config.ts for Electron E2E testing
- Add e2e/fixtures/electron-app.ts with Electron launch fixtures and helpers
- Create e2e/autorun-setup.spec.ts with 24 tests (13 active, 11 skipped pending dialog mocking):
  - Wizard Launch: keyboard shortcut, agent selection screen, Escape to close
  - Agent Selection Screen: Claude Code display, other agents, project name, keyboard navigation
  - Directory Selection Screen: (skipped - requires dialog mocking)
  - Document Creation Flow: (skipped - requires full wizard flow)
  - Wizard Navigation: step indicators, button states, Back navigation
  - Exit Confirmation: (skipped - requires dialog mocking)
  - Accessibility: keyboard-only navigation, focus management
- Add npm scripts: test:e2e, test:e2e:ui, test:e2e:headed
- Update .gitignore with e2e-results/, playwright-report/, test-results/
2025-12-14 05:01:19 -06:00
Pedram Amini
5448613253 MAESTRO: add Auto Run + Session List integration tests (Task 5.3)
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.
2025-12-14 04:52:31 -06:00
Pedram Amini
c68bba58f6 MAESTRO: add Auto Run + RightPanel integration tests (Task 5.2)
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.
2025-12-14 04:45:32 -06:00
Pedram Amini
fdd0dcb18e MAESTRO: add Auto Run + Batch Processing integration tests (Task 5.1)
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
2025-12-14 04:37:40 -06:00
Pedram Amini
0caa0a4a27 MAESTRO: add autorun-folder-validation.test.ts (Task 4.3)
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)
2025-12-14 04:32:33 -06:00
Pedram Amini
b0ad58e318 MAESTRO: expand autorun-watcher.test.ts coverage (Task 4.2)
Added 48 new tests to autorun-watcher.test.ts covering:
- IPC Message Emission on File Change (9 tests)
- Window-Specific Event Routing (8 tests)
- Watcher Error Handling (18 tests)
- Edge Cases and Boundary Conditions (13 tests)

Total test count: 26 -> 74 tests
2025-12-14 04:28:17 -06:00
Pedram Amini
0ddc050894 MAESTRO: add Auto Run IPC handler unit tests (Task 4.1)
Create autorun-ipc.test.ts with 88 tests covering:
- autorun:listDocs - file list with tree structure, filtering, sorting
- autorun:readDoc - markdown reading, path validation, error handling
- autorun:writeDoc - write operations, subdirectory creation, security
- autorun:listImages - image listing by document prefix, extension filtering
- autorun:saveImage - timestamp naming, base64 decoding, extension validation
- autorun:deleteImage - file deletion, path validation, security checks
- autorun:deleteFolder - recursive deletion, safety checks

Tests also cover:
- Path traversal attack prevention
- validatePathWithinFolder helper function
- scanDirectory recursive scanning
- Full document lifecycle integration
- Image attachment workflow integration
- Concurrent operations handling
- Special filenames (spaces, unicode, special chars)
- Large data handling (big files, many files)
- Error recovery scenarios
2025-12-14 04:23:27 -06:00
Pedram Amini
b94d1bf454 MAESTRO: add AutoRun.test.tsx coverage expansion (Task 3.4)
Adds ~70 new tests across 7 describe blocks covering previously
untested AutoRun component paths:

- Document Tree Prop Rendering (6 tests)
- hideTopControls Prop Behavior (10 tests)
- Template Autocomplete Integration (9 tests)
- Mermaid Diagram Rendering in Preview (14 tests)
- Content Versioning and External Changes (5 tests)
- Task Count Display (8 tests)
- Expand Button Behavior (4 tests)

AutoRun.test.tsx now has 166 total tests (163 passing, 3 skipped).
2025-12-14 04:17:57 -06:00
Pedram Amini
0beff00e9f MAESTRO: add AutoRunLightbox component unit tests (Task 3.3)
Add comprehensive test coverage for the AutoRunLightbox component with 79 tests:

- Basic Rendering (10 tests): lightbox display, image src, buttons, external URLs
- Navigation Buttons Rendering (3 tests): visibility based on image count
- Image Navigation via Buttons (5 tests): next/prev, wrap-around, propagation
- Keyboard Navigation (6 tests): Arrow keys, external URL handling
- Escape Key - Close (3 tests): close on Escape, default prevention
- Delete Key (6 tests): Delete/Backspace keys, external URL protection
- Delete Button Click (5 tests): delete callback, navigation after delete
- Copy to Clipboard (7 tests): copy, "Copied!" indicator, timeout, error handling
- Backdrop Click (2 tests): close on backdrop, prevent close on image click
- Close Button (2 tests): close callback, propagation
- Bottom Info Display (8 tests): filename, position, hints
- Focus Management (1 test): auto-focus for keyboard events
- Image/Button/Overlay Styling (8 tests): CSS classes verification
- Edge Cases (8 tests): empty list, long filename, special chars, data URLs
- Memoization (1 test): React.memo verification
- Accessibility (3 tests): alt text, button titles, tabIndex
- Icon Sizes (2 tests): navigation and action icon dimensions
- Delete After Navigation (2 tests): navigation state after delete
2025-12-14 04:11:09 -06:00
Pedram Amini
e4f598574d MAESTRO: add AutoRunSearchBar component unit tests (Task 3.2)
Add comprehensive test coverage for the AutoRunSearchBar component with
81 tests covering:

- Basic Rendering: search input, icons, close button, theme styling
- Search Query Input Handling: onChange callback, special characters, unicode
- Auto-Focus: useEffect focus behavior via ref
- Match Count Display: empty/whitespace queries, "No matches" state, positioning
- Navigation Buttons: visibility, click handlers, disabled/enabled states
- Keyboard Navigation: Enter (next), Shift+Enter (prev), default prevention
- Escape Key: close callback, propagation, query independence
- Close Button: click handler, styling, visibility
- Component Layout: flex layout, padding, rounded corners
- Input/Button Styling: CSS classes, hover states, transitions
- Edge Cases: long queries, large counts, rapid events, newlines
- Handler Callback Stability: useCallback behavior, prop updates
- Accessibility: input type, button titles with shortcuts
- Theme Variations: light/dark theme colors
2025-12-14 04:04:45 -06:00
Pedram Amini
4dda478c29 MAESTRO: add AutoRunExpandedModal component unit tests (Task 3.1)
Add comprehensive test coverage for AutoRunExpandedModal with 65 tests covering:
- Basic rendering (title, AutoRun component, Edit/Preview/Run buttons)
- Mode controls (Edit/Preview switching via AutoRun ref)
- Batch run state (Run/Stop/Stopping buttons, disabled states)
- Locked state during batch run (disabled Edit button, preview mode)
- Dirty state detection and Save/Revert buttons
- Close functionality (close button, Collapse button, backdrop click)
- Layer stack integration (Escape key handling)
- Focus management (auto-focus on mount)
- Keyboard shortcuts display
- Theme colors application
- Modal structure verification
- Image upload button states
- Dirty state polling (100ms interval)
- Accessibility attributes
- Edge cases (undefined props)
2025-12-14 03:59:14 -06:00
Pedram Amini
64d64799ce MAESTRO: add useAutoRunUndo hook unit tests (Task 2.3)
Created comprehensive test coverage for the useAutoRunUndo hook with 40 tests:

- pushUndoState (7 tests): push when content differs, skip when equals
  last snapshot, null selectedFile handling, textarea cursor position usage,
  redo stack clearing, explicit content/cursor, lastUndoSnapshotRef update
- handleUndo and handleRedo (8 tests): undo/redo cycling, empty stack
  handling, multiple sequential undos/redos, null selectedFile handling
- maxStackSize limit enforcement (2 tests): 50-entry limit, oldest entry
  discarding
- resetUndoHistory (3 tests): lastUndoSnapshotRef update, fresh snapshots
  after reset, preserve existing history stacks
- Cursor position restoration (4 tests): restore on undo, restore on redo,
  missing textarea ref handling, undefined selectionStart handling
- scheduleUndoSnapshot (5 tests): 1000ms debounce delay, cancel pending on
  new schedule, cursor position from scheduled snapshot, cleanup on unmount,
  cleanup on document change
- Per-document undo history isolation (3 tests): separate undo stacks,
  separate redo stacks, preserve history across document switches
- Edge cases (5 tests): empty content, very long content, special characters,
  rapid push/undo operations, lastUndoSnapshotRef update on undo/redo
- Handler memoization (2 tests): stable references, update on dependency change
- lastUndoSnapshotRef exposure (2 tests): external access, external modification

This completes Phase 2 of the Auto Run testing improvement plan.
2025-12-14 03:55:22 -06:00
Pedram Amini
ceaf9be4ee MAESTRO: add useAutoRunImageHandling hook unit tests (Task 2.2)
Add comprehensive test coverage for the useAutoRunImageHandling hook
with 53 tests covering:
- Image loading via useEffect (6 tests)
- Clipboard paste handling (8 tests)
- Manual file upload (7 tests)
- Image removal and markdown cleanup (7 tests)
- imageCache behavior (4 tests)
- Lightbox operations (9 tests)
- State management (3 tests)
- Handler memoization (2 tests)
- Edge cases (3 tests)
2025-12-14 03:49:10 -06:00
Pedram Amini
a81e0c06e5 MAESTRO: add useAutoRunHandlers hook unit tests (Task 2.1)
Created comprehensive test coverage for useAutoRunHandlers.ts with 52 tests:
- handleAutoRunContentChange (5 tests): state updates only, no file writes
- handleAutoRunModeChange (4 tests): edit/preview mode switching
- handleAutoRunStateChange (2 tests): atomic scroll/cursor position updates
- handleAutoRunSelectDocument (5 tests): document loading with version tracking
- handleAutoRunRefresh (8 tests): document list reload and notifications
- handleAutoRunCreateDocument (8 tests): file creation and selection
- getDocumentTaskCount (8 tests): unchecked task regex parsing
- handleAutoRunFolderSelected (6 tests): folder setup with auto-select
- handleStartBatchRun (3 tests): batch run initiation
- handleAutoRunOpenSetup (1 test): setup modal handling
- Handler memoization (2 tests): stable references and updates

All tests pass including 9130 total project tests.
2025-12-14 03:44:16 -06:00
Pedram Amini
def2707ddf MAESTRO: add save timing and path correctness tests for Auto Run (Task 1.3)
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.
2025-12-14 03:40:05 -06:00
Pedram Amini
a3eac12763 MAESTRO: add content sync race condition tests for Auto Run (Task 1.2)
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
2025-12-14 03:35:50 -06:00
Pedram Amini
dab400c5c7 MAESTRO: add session isolation tests for Auto Run (Task 1.1)
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.
2025-12-14 03:31:05 -06:00
Pedram Amini
ee2a61a87b refactor: extract system prompts to centralized markdown files
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
2025-12-14 03:26:48 -06:00
Pedram Amini
00b0278ecb feat: add custom theme with live preview and import/export
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
2025-12-14 03:01:00 -06:00
Pedram Amini
5203a4b45c Merge pull request #26 from pedramamini/refactor-ii
refactor ii
2025-12-14 02:34:02 -06:00
Pedram Amini
5bbf7488e8 # CHANGES
- Added getBadgeForTime helper function for cleaner badge lookups 🎯
- Replaced inline badge finding logic with new helper method 🧹
- Improved code readability in auto-run statistics calculation 
- Simplified conductor badge level determination process 🚀
- Enhanced maintainability of badge assignment functionality 🛠️
- Streamlined cumulative time to badge mapping logic 🔄
- Reduced code duplication in badge lookup operations 💎
- Made badge selection more modular and testable 🧪
- Optimized performance of badge threshold checking 
- Cleaned up App.tsx with better separation of concerns 🏗️
2025-12-14 02:33:19 -06:00
Pedram Amini
065dd1c618 comment 2025-12-14 02:25:21 -06:00
Pedram Amini
7404db6953 ## CHANGES
- 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 
2025-12-14 02:02:36 -06:00
Pedram Amini
8475af6eee ## CHANGES
- 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 
2025-12-14 01:56:47 -06:00
Pedram Amini
395063c2cc Add note on project changes and PR synchronization
Added a note about project changes and PR sync issues.
2025-12-14 01:56:20 -06:00
Pedram Amini
b2fe65018b MAESTRO: Extract useInputProcessing hook from App.tsx
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
2025-12-14 01:55:36 -06:00
Pedram Amini
d8074a9538 ## CHANGES
- Added detailed logging for web command handling flow 🔍
- Implemented git info refresh in main panel header 🔄
- Added keyboard shortcuts Cmd+S and Cmd+R to composer ⌨️
- Enhanced WebSocket send logging with message preview 📡
- Improved mobile app command sending debug output 📱
- Added MainPanelHandle interface for parent component access 🔌
- Fixed git status refresh to update branch info 🌿
- Added command length tracking in debug logs 📏
- Improved WebSocket connection state error handling 
- Enhanced mobile-to-server command flow visibility 👁️
2025-12-14 01:38:28 -06:00
Pedram Amini
3f8417e933 version bump 2025-12-14 01:15:07 -06:00
Pedram Amini
06e3fea1ba Merge pull request #25 from pedramamini/refactor
Major refactor
2025-12-14 01:11:42 -06:00
Pedram Amini
9d18f25237 # CHANGES
- Added auth token validation before leaderboard submission 🔐
- Prevents submission attempts when no authentication exists 🚫
- Includes auth token in leaderboard submission payload 🎫
- Adds warning log for missing auth token scenarios ⚠️
- Maintains silent failure handling for submission errors 🤫
- Improves security by checking authentication status first 🛡️
- Ensures only authenticated users can submit scores 👤
- Preserves existing error handling and retry logic 🔄
- Enhances data integrity for leaderboard submissions 
- Protects against unauthorized leaderboard access attempts 🚨
2025-12-14 01:08:53 -06:00
Pedram Amini
2b5472707f ## CHANGES
- 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 🔄
2025-12-14 00:57:00 -06:00
Pedram Amini
7e166e86cb # CHANGES
- 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 🔒
2025-12-14 00:43:47 -06:00
Pedram Amini
e8d27615fd # CHANGES
- 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 🖼️
2025-12-14 00:40:13 -06:00
Pedram Amini
88e95237a2 ## CHANGES
- Fixed content saving to wrong session when switching quickly 🔧
- Added tracking refs to ensure content saves to correct file 📁
- Improved blur-save logic to use tracked folder/file references 💾
- Enhanced auto-save to capture target paths at schedule time ⏱️
- Prevented content mix-ups between different session folders 🚫
- Updated dependency arrays to avoid unnecessary re-scheduling 🔄
- Added critical comments explaining the session-switching fix 📝
- Maintained content integrity across rapid session changes 
- Improved reliability of 5-second auto-save functionality 
- Enhanced overall stability of multi-session document editing 🛡️
2025-12-14 00:02:50 -06:00
Pedram Amini
78da485b5b ## CHANGES
- 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 🏗️
2025-12-13 23:39:58 -06:00
Pedram Amini
71aa53c904 fix: Update wizard tests for agentName requirement
The agent-selection step now requires both selectedAgent and agentName
to proceed. Updated tests to set both values.
2025-12-13 23:10:52 -06:00
Pedram Amini
10f30abbc6 OAuth enabled but no valid token found. Starting authentication...
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 🛡️
2025-12-13 23:06:54 -06:00
Pedram Amini
56ffd81b87 fix: Update RightPanel test assertions for task progress format
Changed format from "X / Y total tasks completed" to "X of Y tasks completed"
to match updated component text.
2025-12-13 22:18:32 -06:00
Pedram Amini
a952bd8d9f # CHANGES
- Added client/auth token support for leaderboard email verification 🔐
- Implemented automatic polling after email confirmation submission 🔄
- Added manual auth token entry UI for confirmed emails 🔑
- Fixed auto-save content leak between sessions with same filenames 🐛
- Prevented session content mixing during rapid tab switching 💾
- Added Cmd+Shift+E shortcut to toggle Auto Run expanded view ⌨️
- Improved button layout in file explorer (dotfiles toggle moved) 👁️
- Enhanced search placeholder text to differentiate filter vs search 🔍
- Fixed keyboard shortcut conflicts (Cmd+E, Cmd+F) in AutoRun 🎹
- Updated leaderboard UI with better confirmation flow messaging ✉️
2025-12-13 22:15:12 -06:00
Pedram Amini
e539379168 # CHANGES
- 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 🎯
2025-12-13 21:00:37 -06:00
Pedram Amini
a9e215c346 MAESTRO: Extract mobile-specific effects from mobile App.tsx (Phase 3 refactor)
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)
2025-12-13 16:20:22 -06:00
Pedram Amini
1e47ce49e1 MAESTRO: Extract useMobileSessionManagement hook from mobile App.tsx (Phase 3 refactor)
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)
2025-12-13 16:16:07 -06:00
Pedram Amini
4ad23e32b1 MAESTRO: Extract useMobileKeyboardHandler hook from mobile App.tsx (Phase 3 refactor)
- 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
2025-12-13 16:07:14 -06:00
Pedram Amini
5adb39551f MAESTRO: Extract useSortedSessions hook from App.tsx (Phase 2.9 refactor)
- 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)
2025-12-13 16:03:38 -06:00
Pedram Amini
ae8ee92de8 MAESTRO: Extract useThemeStyles hook from App.tsx (Phase 2.8 refactor)
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
2025-12-13 16:00:47 -06:00
Pedram Amini
240a81812d MAESTRO: Extract useCliActivityMonitoring hook from App.tsx (Phase 2.8 refactor)
- 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
2025-12-13 15:58:08 -06:00
Pedram Amini
a33f34d2e0 MAESTRO: Extract useWebBroadcasting hook from App.tsx (Phase 2.8 refactor)
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.
2025-12-13 15:55:25 -06:00