Quick Access
src/renderer/constants/shortcuts.ts:43-44
Git Status Widget
The Git Status Widget appears in the main panel header when you’re in a git repository:Visual Indicators
- Current branch with icon
- Ahead/behind remote (e.g., ↑3 ↓1)
- Uncommitted changes count
- Click to view diff
src/renderer/components/GitStatusWidget.tsx
Diff Viewer
Visualize staged changes with syntax-highlighted diffs:Open Diff Viewer
Press
Cmd+Shift+D or click the Git Status Widget.Modal: src/renderer/components/GitDiffViewer.tsxBrowse Changed Files
Each file appears as a tab at the top. Click tabs to switch between files.Navigation:
Cmd+[ / Cmd+] to cycle through file tabs.View Changes
Changes are displayed with:
- Green background: Added lines
- Red background: Removed lines
- Line numbers: Both old and new
- Syntax highlighting: Based on file type
Diff Viewer Features
Unified Diff Format
Unified Diff Format
Uses the standard unified diff format with hunk headers:Shows which lines changed and context around them.Parser:
src/renderer/utils/gitDiffParser.tsSyntax Highlighting
Syntax Highlighting
Code in diffs is syntax-highlighted based on file extension.Supports all major languages: TypeScript, JavaScript, Python, Rust, Go, etc.Library:
react-diff-view with custom theme integrationFile Statistics
File Statistics
Each file tab shows:
- +X: Lines added (green)
- -Y: Lines removed (red)
- File type badge
git diff --numstatSplit View (Planned)
Split View (Planned)
Future: Toggle between unified and split (side-by-side) diff views.
Git Log Viewer
Browse commit history with rich details:Commit List
Displays commits with:- Commit hash (short form)
- Author and date
- Commit message (first line)
- Changed files count
- Branch indicators
Commit Detail
Click any commit to view:- Full message (including body)
- Changed files with diff stats
- Parent commits
- Commit metadata (author, committer, date)
git:log in src/main/index.ts
Git Service API
All git operations use thegitService abstraction:
src/renderer/services/git.ts
File Status Indicators
Files in the File Explorer show git status:| Icon | Status | Color |
|---|---|---|
| M | Modified | Orange |
| A | Added | Green |
| D | Deleted | Red |
| ? | Untracked | Gray |
| C | Conflicted | Red |
src/renderer/contexts/GitStatusContext.tsx
Git Worktree Support
Maestro has advanced worktree integration for parallel development workflows.What Are Worktrees?
Git worktrees let you check out multiple branches simultaneously in separate directories:Maestro’s Worktree Features
- Auto Run with Worktrees
- Worktree Agents
- PR Creation
Run Auto Run documents in isolated worktrees:
- Configure worktree settings in Batch Runner
- Maestro creates/reuses worktree automatically
- Auto Run executes in worktree (isolated from main workspace)
- Optionally create PR when complete
- Main workspace stays clean
- Continue working while Auto Run executes
- Automatic branch management
- PR creation from worktree branch
src/renderer/components/BatchRunnerModal.tsxWorktree IPC API
src/main/preload.ts (git namespace)
GitHub Integration
Maestro integrates with GitHub CLI for:PR Creation
gh pr create command.
Requirements
Remote URL Parsing
Maestro parses git remote URLs to detect repository info:src/shared/gitUtils.ts
Git Context in AI Prompts
AI agents automatically receive git context:Available Context
- Current branch
- Uncommitted changes (file list)
- Recent commits
- Repository root
Performance Optimizations
Cached Git Status
Cached Git Status
Git status is cached and refreshed:
- On file tree refresh
- On manual git operations
- When switching agents
- On a 30-second interval (if active)
src/renderer/contexts/GitStatusContext.tsxIncremental Diffs
Incremental Diffs
Only staged files are included in diffs by default.Use
git diff --cached instead of git diff HEAD for speed.Lazy Log Loading
Lazy Log Loading
Commit log is loaded in batches (50 commits at a time) to handle large repositories.
Keyboard Shortcuts
src/renderer/constants/shortcuts.ts:43-44, 112-121
Next Steps
File Explorer
Browse files with git status indicators
Agent Management
Worktree agents and parallel workflows
Output Filtering
Search AI responses and terminal output
Keyboard Shortcuts
Complete keyboard reference