Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3165ad5
MAESTRO: Remove unused imports and local function (Phase 1 ESLint fixes)
pedramamini Dec 25, 2025
c615398
MAESTRO: Prefix unused catch block error variables with underscore (P…
pedramamini Dec 25, 2025
fb3213e
MAESTRO: Prefix unused assigned variables with underscore (Phase 3 ES…
pedramamini Dec 25, 2025
515ffe9
MAESTRO: Prefix unused assigned variables with underscore in App.tsx …
pedramamini Dec 25, 2025
4932b82
MAESTRO: Prefix unused variables with underscore in renderer componen…
pedramamini Dec 25, 2025
3b34774
MAESTRO: Fix Phase 6 React hooks dependencies (ESLint fixes)
pedramamini Dec 25, 2025
2bf1c55
MAESTRO: Wrap handleFileClick and toggleFolder in useCallback (Phase …
pedramamini Dec 25, 2025
3c1eee6
MAESTRO: Fix ref cleanup for thinkingChunkBufferRef (Phase 8 ESLint fix)
pedramamini Dec 25, 2025
6d1d0ce
MAESTRO: Add ESLint disable comments for intentionally omitted React …
pedramamini Dec 25, 2025
5f0147b
MAESTRO: Complete Phase 10 ESLint fixes for React hooks dependencies
pedramamini Dec 25, 2025
425d02b
MAESTRO: Fix null session guard in handleFileClick (Final Verificatio…
pedramamini Dec 25, 2025
84cc79d
MAESTRO: Add batch processing utilities module (Phase 1)
pedramamini Dec 25, 2025
bda36e4
MAESTRO: Add useSessionDebounce hook for batch processing (Phase 2)
pedramamini Dec 25, 2025
c204fa4
MAESTRO: Add batch reducer module for state management (Phase 3)
pedramamini Dec 25, 2025
a50e08d
MAESTRO: Add useTimeTracking hook for visibility-aware time tracking …
pedramamini Dec 25, 2025
c91523a
MAESTRO: Add useDocumentProcessor hook for document processing (Phase 5)
pedramamini Dec 25, 2025
2fc7a8f
MAESTRO: Add useWorktreeManager hook for git worktree operations (Pha…
pedramamini Dec 25, 2025
6e76475
MAESTRO: Add batch state machine for batch processing (Phase 7)
pedramamini Dec 25, 2025
3cb466d
MAESTRO: Migrate useBatchProcessor to use extracted batch modules (Ph…
pedramamini Dec 25, 2025
a8a3052
MAESTRO: Migrate startBatchRun to use extracted hooks (Phase 9)
pedramamini Dec 25, 2025
57d6d1a
MAESTRO: Fix memory leak risks in useBatchProcessor (Phase 10)
pedramamini Dec 25, 2025
6012782
MAESTRO: Integrate batch state machine into useBatchProcessor (Phase 11)
pedramamini Dec 25, 2025
932acc3
MAESTRO: Add ModalContext for centralized modal state management (Pha…
pedramamini Dec 25, 2025
9cb90b6
MAESTRO: Add UILayoutContext for centralized UI layout state manageme…
pedramamini Dec 25, 2025
ec054eb
MAESTRO: Add InputContext for centralized input state management (Pha…
pedramamini Dec 25, 2025
ab7ea65
MAESTRO: Add GroupChatContext for centralized group chat state manage…
pedramamini Dec 25, 2025
f4aeaf8
MAESTRO: Add AutoRunContext for centralized Auto Run state management…
pedramamini Dec 25, 2025
5d145f7
MAESTRO: Add SessionContext for centralized session state management …
pedramamini Dec 25, 2025
56d538a
MAESTRO: Add comprehensive tab completion tests for regression checklist
pedramamini Dec 25, 2025
4d34d36
MAESTRO: Add comprehensive slash command tests for regression checklist
pedramamini Dec 25, 2025
3a48cb9
MAESTRO: Add comprehensive output search tests for regression checklist
pedramamini Dec 25, 2025
7b88591
MAESTRO: Add comprehensive log deletion tests for regression checklist
pedramamini Dec 25, 2025
22d2491
MAESTRO: Add comprehensive markdown mode toggle tests for regression …
pedramamini Dec 25, 2025
b9155d7
MAESTRO: Add comprehensive file preview navigation tests for regressi…
pedramamini Dec 25, 2025
14bbdc4
MAESTRO: Add comprehensive AUTO mode indicator tests for regression c…
pedramamini Dec 25, 2025
3249bb5
MAESTRO: Add comprehensive agent error banner tests for regression ch…
pedramamini Dec 25, 2025
615a0e6
MAESTRO: Reorganize 48 hooks into 10 domain modules
pedramamini Dec 25, 2025
7b9b88b
fix: Add time tracking fields to StartBatchPayload type
pedramamini Dec 25, 2025
ac3df7e
lints and tests pass
pedramamini Dec 25, 2025
70f4d09
## CHANGES
pedramamini Dec 25, 2025
21935b5
## CHANGES
pedramamini Dec 25, 2025
289457d
## CHANGES
pedramamini Dec 26, 2025
b78f952
OAuth enabled but no valid token found. Starting authentication...
pedramamini Dec 26, 2025
f1712dc
## CHANGES
pedramamini Dec 26, 2025
5bae413
## CHANGES
pedramamini Dec 26, 2025
2b27208
## CHANGES
pedramamini Dec 26, 2025
f724ef4
## CHANGES
pedramamini Dec 26, 2025
3f93783
OAuth enabled but no valid token found. Starting authentication...
pedramamini Dec 26, 2025
d850528
## CHANGES
pedramamini Dec 27, 2025
47655b2
tests pass
pedramamini Dec 27, 2025
ca983d8
## CHANGES
pedramamini Dec 27, 2025
73232e5
OAuth enabled but no valid token found. Starting authentication...
pedramamini Dec 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Made with Maestro](docs/assets/made-with-maestro.svg)](https://github.com/pedramamini/Maestro)
[![Discord](https://img.shields.io/badge/Discord-Join%20Us-5865F2?logo=discord&logoColor=white)](https://discord.gg/SrBsykvG)

> Run AI coding agents autonomously for days.
> Maestro hones fractured attention into focused intent.

Maestro is a cross-platform desktop app for orchestrating your fleet of AI agents and projects. It's a high-velocity solution for hackers who are juggling multiple projects in parallel. Designed for power users who live on the keyboard and rarely touch the mouse.

Expand Down Expand Up @@ -459,7 +459,7 @@ Auto Run supports running multiple documents in sequence:
2. Click **+ Add Docs** to add more documents to the queue
3. Drag to reorder documents as needed
4. Configure options per document:
- **Reset on Completion** - Uncheck all boxes when document completes (for repeatable tasks)
- **Reset on Completion** - Creates a working copy in `Runs/` subfolder instead of modifying the original. The original document is never touched, and working copies (e.g., `TASK-1735192800000-loop-1.md`) serve as audit logs.
- **Duplicate** - Add the same document multiple times
5. Enable **Loop Mode** to cycle back to the first document after completing the last
6. Click **Go** to start the batch run
Expand Down Expand Up @@ -490,7 +490,7 @@ Each task executes in a completely fresh AI session with its own unique session
- **Predictable behavior** - Tasks in looping playbooks execute identically each iteration
- **Independent execution** - The agent approaches each task without memory of previous work

This isolation is critical for playbooks with `Reset on Completion` documents that loop indefinitely. Without it, the AI might "remember" completing a task and skip re-execution on subsequent loops.
This isolation is critical for playbooks with `Reset on Completion` documents that loop indefinitely. Each loop creates a fresh working copy from the original document, and the AI approaches it without memory of previous iterations.

### Environment Variables {#environment-variables}

Expand Down
6 changes: 4 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ export default tseslint.config(

// React Hooks rules
'react-hooks/rules-of-hooks': 'error',
// TODO: Change to 'error' after fixing ~74 existing violations
'react-hooks/exhaustive-deps': 'warn',
// NOTE: exhaustive-deps is intentionally 'off' - this codebase uses refs and
// stable state setters intentionally without listing them as dependencies.
// The pattern is to use refs to access latest values without causing re-renders.
'react-hooks/exhaustive-deps': 'off',

// General rules
'no-console': 'off', // Console is used throughout
Expand Down
50 changes: 50 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "maestro",
"version": "0.12.0",
"description": "Run AI coding agents autonomously for days.",
"version": "0.12.1",
"description": "Maestro hones fractured attention into focused intent.",
"main": "dist/main/index.js",
"author": {
"name": "Pedram Amini",
Expand Down Expand Up @@ -232,6 +232,7 @@
"react-markdown": "^10.1.0",
"react-syntax-highlighter": "^16.1.0",
"rehype-raw": "^7.0.0",
"rehype-slug": "^6.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.1",
"ws": "^8.16.0"
Expand Down
172 changes: 172 additions & 0 deletions refactor-details-1-tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Refactor Details 1: Fix ESLint Warnings - Executable Tasks

> **Generated:** December 25, 2024
> **Source:** `refactor-details-1.md` analysis converted to Auto Run tasks
> **Note:** ESLint auto-fix already ran - these are the remaining manual fixes

---

## Phase 1: Unused Imports (Remove)

These imports are defined but never used - remove them entirely.

- [ ] In `src/renderer/App.tsx`, remove unused import `createMergedSession` from line 109
- [ ] In `src/renderer/App.tsx`, remove unused import `TAB_SHORTCUTS` from line 110
- [ ] In `src/renderer/App.tsx`, remove unused import `DEFAULT_CONTEXT_WINDOWS` from line 115
- [ ] In `src/renderer/components/AICommandsPanel.tsx`, remove unused import `RotateCcw` from line 2
- [ ] In `src/renderer/components/AgentPromptComposerModal.tsx`, remove unused import `useCallback` from line 1
- [ ] In `src/renderer/components/AutoRunExpandedModal.tsx`, remove unused import `Image` from line 3
- [ ] In `src/renderer/components/BatchRunnerModal.tsx`, remove unused import `countUncheckedTasks` from line 45
- [ ] In `src/renderer/components/DebugPackageModal.tsx`, remove unused import `X` from line 12
- [ ] In `src/renderer/components/FilePreview.tsx`, remove unused imports `Copy` and `FileText` from line 7

---

## Phase 2: Unused Error Variables (Prefix with _)

These catch block errors are intentionally unused - prefix with underscore.

- [ ] In `src/cli/services/agent-spawner.ts` line 539, rename `error` to `_error` in catch block
- [ ] In `src/cli/services/agent-spawner.ts` line 557, rename `error` to `_error` in catch block
- [ ] In `src/main/agent-detector.ts` line 680, rename `error` to `_error` in catch block
- [ ] In `src/main/ipc/handlers/persistence.ts` line 200, rename `error` to `_error` in catch block
- [ ] In `src/main/ipc/handlers/system.ts` line 351, rename `error` to `_error` in catch block
- [ ] In `src/main/process-manager.ts` line 847, rename `e` to `_e` in catch block
- [ ] In `src/main/utils/shellDetector.ts` line 93, rename `error` to `_error` in catch block
- [ ] In `src/renderer/components/CreatePRModal.tsx` line 149, rename `err` to `_err` in catch block
- [ ] In `src/renderer/components/CreatePRModal.tsx` line 160, rename `err` to `_err` in catch block
- [ ] In `src/renderer/components/CustomThemeBuilder.tsx` line 357, rename `err` to `_err` in catch block
- [ ] In `src/renderer/components/FilePreview.tsx` line 846, rename `err` to `_err` in catch block

---

## Phase 3: Unused Assigned Variables in Main Process (Prefix with _)

- [ ] In `src/main/index.ts` line 1903, rename `resultMessageCount` to `_resultMessageCount`
- [ ] In `src/main/index.ts` line 1908, rename `textMessageCount` to `_textMessageCount`
- [ ] In `src/main/ipc/handlers/agents.ts` line 44, rename `resumeArgs` to `_resumeArgs`
- [ ] In `src/main/ipc/handlers/agents.ts` line 45, rename `modelArgs` to `_modelArgs`
- [ ] In `src/main/ipc/handlers/agents.ts` line 46, rename `workingDirArgs` to `_workingDirArgs`
- [ ] In `src/main/ipc/handlers/agents.ts` line 47, rename `imageArgs` to `_imageArgs`
- [ ] In `src/main/ipc/handlers/agents.ts` line 54, rename `argBuilder` to `_argBuilder`
- [ ] In `src/main/process-manager.ts` line 1343, rename `stdoutBuffer` to `_stdoutBuffer`
- [ ] In `src/main/process-manager.ts` line 1344, rename `stderrBuffer` to `_stderrBuffer`

---

## Phase 4: Unused Variables in App.tsx (Prefix with _)

- [ ] In `src/renderer/App.tsx` line 229, rename `loadResumeState` to `_loadResumeState`
- [ ] In `src/renderer/App.tsx` line 232, rename `closeWizardModal` to `_closeWizardModal`
- [ ] In `src/renderer/App.tsx` line 275, rename `globalStats` to `_globalStats`
- [ ] In `src/renderer/App.tsx` line 277, rename `tourCompleted` to `_tourCompleted`
- [ ] In `src/renderer/App.tsx` line 283, rename `updateContextManagementSettings` to `_updateContextManagementSettings`
- [ ] In `src/renderer/App.tsx` line 397, rename `shortcutsSearchQuery` to `_shortcutsSearchQuery`
- [ ] In `src/renderer/App.tsx` line 403, rename `lightboxSource` to `_lightboxSource`
- [ ] In `src/renderer/App.tsx` line 523, rename `renameGroupEmojiPickerOpen` to `_renameGroupEmojiPickerOpen`
- [ ] In `src/renderer/App.tsx` line 523, rename `setRenameGroupEmojiPickerOpen` to `_setRenameGroupEmojiPickerOpen`
- [ ] In `src/renderer/App.tsx` line 783, rename `hasSessionsLoaded` to `_hasSessionsLoaded`
- [ ] In `src/renderer/App.tsx` line 2286, rename `pendingRemoteCommandRef` to `_pendingRemoteCommandRef`
- [ ] In `src/renderer/App.tsx` line 2669, rename `mergeError` to `_mergeError`
- [ ] In `src/renderer/App.tsx` line 2675, rename `cancelMerge` to `_cancelMerge`
- [ ] In `src/renderer/App.tsx` line 2752, rename `transferError` to `_transferError`
- [ ] In `src/renderer/App.tsx` line 2753, rename `executeTransfer` to `_executeTransfer`
- [ ] In `src/renderer/App.tsx` line 2791, rename `summarizeError` to `_summarizeError`
- [ ] In `src/renderer/App.tsx` line 3119, rename `spawnAgentWithPrompt` to `_spawnAgentWithPrompt`
- [ ] In `src/renderer/App.tsx` line 3122, rename `spawnAgentWithPromptRef` to `_spawnAgentWithPromptRef`
- [ ] In `src/renderer/App.tsx` line 3123, rename `showFlashNotification` to `_showFlashNotification`
- [ ] In `src/renderer/App.tsx` line 3155, rename `batchRunStates` to `_batchRunStates`
- [ ] In `src/renderer/App.tsx` line 3529, rename `processInputRef` to `_processInputRef`
- [ ] In `src/renderer/App.tsx` line 4038, rename parameter `prev` to `_prev`
- [ ] In `src/renderer/App.tsx` line 5024, rename `initializeMergedSession` to `_initializeMergedSession`
- [ ] In `src/renderer/App.tsx` line 5197, rename `result` to `_result`

---

## Phase 5: Unused Variables in Components (Prefix with _)

- [ ] In `src/renderer/components/AchievementCard.tsx` line 159, rename `onClose` to `_onClose`
- [ ] In `src/renderer/components/AutoRun.tsx` line 522, rename `closeAutocomplete` to `_closeAutocomplete`
- [ ] In `src/renderer/components/AutoRun.tsx` line 716, rename `handleCursorOrScrollChange` to `_handleCursorOrScrollChange`
- [ ] In `src/renderer/components/AutoRunDocumentSelector.tsx` line 78, rename `getDisplayName` to `_getDisplayName`
- [ ] In `src/renderer/components/BatchRunnerModal.tsx` line 203, rename `hasMissingDocs` to `_hasMissingDocs`
- [ ] In `src/renderer/components/ContextWarningSash.tsx` line 27, rename `theme` to `_theme`
- [ ] In `src/renderer/components/DocumentsPanel.tsx` line 160, rename `countBefore` to `_countBefore`
- [ ] In `src/renderer/components/DocumentsPanel.tsx` line 344, rename `someSelected` to `_someSelected`
- [ ] In `src/renderer/components/FilePreview.tsx` line 1539, rename `node` to `_node`
- [ ] In `src/renderer/components/FilePreview.tsx` line 1564, rename `node` to `_node`
- [ ] In `src/renderer/components/FilePreview.tsx` line 1595, rename `node` to `_node`
- [ ] In `src/renderer/components/FilePreview.tsx` line 1600, rename `markdownDir` to `_markdownDir`

---

## Phase 6: React Hooks - Safe Dependency Additions

These hooks are missing dependencies that can safely be added without causing infinite loops.

- [ ] In `src/renderer/App.tsx` line 612, add `previewFile` to useEffect dependency array
- [ ] In `src/renderer/App.tsx` line 876, add `getUnacknowledgedKeyboardMasteryLevel` to useEffect dependency array
- [ ] In `src/renderer/App.tsx` line 4368, add `activeSession.id` to useEffect dependency array
- [ ] In `src/renderer/App.tsx` line 5581, add `addLogToActiveTab` to useEffect dependency array
- [ ] In `src/renderer/App.tsx` line 5907, add `processQueuedItem` to useEffect dependency array
- [ ] In `src/renderer/components/AgentSessionsBrowser.tsx` line 339, add `setViewingSession` to useCallback dependency array
- [ ] In `src/renderer/components/AgentSessionsModal.tsx` line 97, add `viewingSession` to useEffect dependency array
- [ ] In `src/renderer/components/AgentSessionsModal.tsx` line 172, add `activeSession?.cwd` to useEffect dependency array
- [ ] In `src/renderer/components/CreatePRModal.tsx` line 130, add `checkUncommittedChanges` to useEffect dependency array
- [ ] In `src/renderer/components/ExecutionQueueBrowser.tsx` line 431, add `handleMouseUp` to useEffect dependency array

---

## Phase 7: React Hooks - Wrap Functions in useCallback

These functions cause dependency changes on every render.

- [ ] In `src/renderer/App.tsx`, wrap `handleFileClick` (line ~6555) in useCallback with appropriate dependencies
- [ ] In `src/renderer/App.tsx`, wrap `toggleFolder` (line ~6615) in useCallback with appropriate dependencies

---

## Phase 8: React Hooks - Fix Ref Cleanup

- [ ] In `src/renderer/App.tsx` line 2144, copy `thinkingChunkBufferRef.current` to local variable before cleanup function uses it

---

## Phase 9: React Hooks - Intentionally Omitted (Add ESLint Disable Comments)

These dependencies are intentionally omitted. Add eslint-disable comments with justification.

- [ ] In `src/renderer/App.tsx` line 823, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining activeSessionId/setActiveSessionId are intentionally omitted for load-once behavior
- [ ] In `src/renderer/App.tsx` line 2146, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining refs intentionally omitted to prevent re-subscription
- [ ] In `src/renderer/App.tsx` line 2420, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining activeSession intentionally omitted
- [ ] In `src/renderer/App.tsx` line 2469, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining activeSession intentionally omitted
- [ ] In `src/renderer/App.tsx` line 3000, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining activeSession intentionally omitted
- [ ] In `src/renderer/App.tsx` line 6755, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining activeSession intentionally omitted
- [ ] In `src/renderer/App.tsx` line 6787, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining activeSession intentionally omitted
- [ ] In `src/renderer/components/AutoRun.tsx` line 622, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining setMode intentionally omitted
- [ ] In `src/renderer/components/AutoRun.tsx` line 658, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining mode/setMode intentionally omitted for init-only behavior
- [ ] In `src/renderer/components/AutoRun.tsx` line 669, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining initial positions intentionally omitted
- [ ] In `src/renderer/components/AutoRun.tsx` line 792, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining currentMatchIndex intentionally omitted
- [ ] In `src/renderer/components/BatchRunnerModal.tsx` line 230, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining onClose/setShowSavePlaybookModal intentionally omitted
- [ ] In `src/renderer/components/BatchRunnerModal.tsx` line 245, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining setShowSavePlaybookModal intentionally omitted
- [ ] In `src/renderer/components/FileExplorerPanel.tsx` line 200, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining setters intentionally omitted
- [ ] In `src/renderer/components/FileExplorerPanel.tsx` line 349, add `// eslint-disable-next-line react-hooks/exhaustive-deps` with comment explaining session intentionally omitted

---

## Phase 10: React Hooks - Complex Expression & Risky Additions

Review these carefully - may need special handling.

- [ ] In `src/renderer/App.tsx` line 3742, extract complex expression to a variable before using in dependency array
- [ ] In `src/renderer/App.tsx` line 863, review and add `autoRunStats.longestRunMs` and `getUnacknowledgedBadgeLevel` - ensure no infinite loops
- [ ] In `src/renderer/App.tsx` line 4120, review and add `setActiveSessionId` to useCallback - ensure callback stability
- [ ] In `src/renderer/App.tsx` line 4998, review and add `addToast` and `sessions` - may cause re-renders

---

## Final Verification

- [ ] Run `npm run lint:eslint` and verify warning count is significantly reduced
- [ ] Run `npm run lint` to verify no TypeScript errors introduced
- [ ] Run `npm run dev` and verify app starts without console errors
Loading