- SVG-based line chart showing average response duration over time
- X-axis adapts to time range (day: HH:mm, week: EEE, month: MMM d, etc.)
- Y-axis auto-scales with formatted duration labels (Xs, Xm, Xh)
- Smoothing/moving average toggle with adaptive window size (3-7 periods)
- Gradient area fill under the line for visual depth
- Tooltip shows date, avg duration, query count (+ raw value when smoothing)
- Theme-aware colors for line, grid, labels, and data points
- 35 tests verifying rendering, interaction, theming, and edge cases
- Create donut/pie chart showing Interactive vs Auto Run breakdown
- Custom SVG arc path generation for smooth donut rendering
- Toggle between count-based and duration-based views
- Center label displays total queries or formatted duration
- Interactive legend with hover highlighting and percentages
- Theme-aware colors (accent for Interactive, slate for Auto)
- Tooltip shows percentage and exact values on segment hover
- 39 comprehensive tests covering all features
Add horizontal bar chart component that compares time spent per agent type:
- Toggle between count-based and duration-based views
- Bars sorted by value descending
- Distinct colors per agent using predefined palette
- Percentage labels on bars
- Theme-aware axis and label colors
- Tooltip on hover showing exact count and duration
- Legend showing up to 6 agents with overflow indicator
Includes comprehensive test suite with 26 tests covering:
- Rendering, metric mode toggle, bar sorting
- Percentage labels, agent colors, legend display
- Tooltip functionality, theme support
- Value formatting for durations and large counts
- GitHub-style contribution grid showing AI usage activity by day
- X-axis weeks, Y-axis days (Sun-Sat), with month labels for longer ranges
- Toggle between query count and duration metrics
- 5-level color intensity scale using theme accent color gradient
- Hover tooltip showing full date, query count, and duration
- Responsive handling for different time ranges (day/week/month/year/all)
- Comprehensive test suite with 19 passing tests
- Create useStats hook with data fetching, loading, error states
- Add 1-second debounce on real-time stats updates
- Include useComputedStats helper for derived calculations
- Add stats API mock to test setup for testing
- Comprehensive test coverage (23 tests)
- Create UsageDashboard component directory with modal and index
- Implement UsageDashboardModal with time range selection (day/week/month/year/all)
- Add view mode tabs (Overview, Agents, Activity, Auto Run)
- Display summary stats cards (total queries, time, avg duration, top agent, interactive %)
- Add agent time comparison bar chart visualization
- Add source distribution donut chart (interactive vs auto)
- Add activity timeline bar chart with hover tooltips
- Register modal with layer stack for proper Escape handling
- Wire modal through AppModals component and App.tsx
- Add 26 comprehensive unit tests for rendering, interactions, and data states
- Add USAGE_DASHBOARD priority (540) to modalPriorities.ts
- Add usageDashboard shortcut (Alt+Cmd+U) to shortcuts.ts
- Add usageDashboardOpen state to ModalContext.tsx
- Add keyboard handler for usageDashboard in useMainKeyboardHandler.ts
- Update isSystemUtilShortcut to include 'u' for modal bypass
- Add Usage Dashboard action to QuickActionsModal.tsx
- Wire setUsageDashboardOpen through App.tsx and AppModals.tsx
Added recharts v3.6.0 for charting components and date-fns v4.1.0 for
date formatting and manipulation. These are required for the upcoming
Usage Dashboard modal with Recharts visualizations.
Added 26 tests to verify time-range filtering works correctly for all
StatsTimeRange values: 'day', 'week', 'month', 'year', and 'all'.
Tests cover:
- getQueryEvents: Verifies correct timestamp calculation for each range
- getAutoRunSessions: Validates time filtering for Auto Run sessions
- getAggregatedStats: Confirms all aggregation queries use correct ranges
- exportToCsv: Ensures CSV export respects time range filtering
- SQL structure: Verifies WHERE start_time >= ? clause is present
- Boundary behavior: Events exactly at boundary are included
- Combined filters: Time ranges work with other filters (agent, source, etc.)
- Consistency: Multiple calls with same range produce consistent results
All 121 tests pass (95 existing + 26 new).
Verifies the foreign key constraint from auto_run_tasks.auto_run_session_id
to auto_run_sessions.id is properly defined in the schema and enforced:
- Schema definition tests: REFERENCES clause, NOT NULL constraint, FK index
- Referential integrity: task insertion with parent session ID, retrieval
- Data consistency: consistent IDs across tasks, independent sessions
- Query filtering: WHERE clause on FK column, ORDER BY task_index
Total: 95 tests passing (83 existing + 12 new)
- Added 22 new tests in "Auto Run sessions and tasks recorded correctly" suite
- Tests verify complete Auto Run lifecycle: start -> record tasks -> end
- Tests verify session recording with all required fields
- Tests verify individual task recording with timing and success/failure status
- Tests verify proper snake_case to camelCase field mapping
- Tests verify time range filtering for Auto Run sessions
- Tests cover edge cases: multiple documents, loop mode, partial completion,
user-stopped sessions, failed tasks, zero duration, different agent types
- All 83 tests pass
- Add 13 tests in "Query events recorded for interactive sessions" suite
- Tests verify user-initiated query events are recorded with all fields
- Tests verify optional fields (projectPath, tabId) stored as NULL when omitted
- Tests verify multiple queries per session get unique IDs
- Tests verify different agent types (claude-code, opencode, codex) recorded
- Tests verify retrieval with source, sessionId, projectPath filters
- Tests verify snake_case to camelCase mapping for QueryEvent interface
- Tests verify aggregation includes interactive sessions in bySource.user
- Tests verify timing accuracy for startTime and duration values
Expanded stats-db.test.ts from 27 tests to 50 tests with:
- Database path computation verification using electron app.getPath('userData')
- Directory creation verification when userData directory doesn't exist
- All 3 table creation verification (query_events, auto_run_sessions, auto_run_tasks)
- All 7 index creation verification
- Singleton pattern tests (getStatsDB, initializeStatsDB, closeStatsDB)
- Auto Run session and task recording tests with success boolean conversion
- Aggregation and filtering tests for time ranges and combined filters
- CSV export tests
- Add stats tracking calls to useBatchProcessor.ts:
- Call startAutoRun when batch begins with session info and task count
- Call recordAutoTask for each completed task with timing data
- Call endAutoRun when batch completes with total duration
- Add stats API type definition to global.d.ts for TypeScript support
- All stats calls wrapped in try/catch to avoid failing batch on stats errors
- Add querySource, tabId, projectPath fields to ProcessConfig and ManagedProcess
- Emit query-complete event when batch mode processes exit with timing data
- Add query-complete listener in main process to record stats to database
- Broadcast stats:updated event for real-time dashboard refresh
- Source type ('user' vs 'auto') passed via spawn config from callers
- Create src/main/ipc/handlers/stats.ts with all stats IPC handlers
- Add window.maestro.stats API to preload.ts with full type definitions
- Register stats handlers in main index.ts
- Initialize stats database on app startup
- Close stats database on app shutdown
- Export registerStatsHandlers from handlers index
Stats API methods:
- recordQuery: Record interactive query events
- startAutoRun/endAutoRun: Track Auto Run sessions
- recordAutoTask: Track individual Auto Run tasks
- getStats: Query events with filtering
- getAutoRunSessions/getAutoRunTasks: Query Auto Run data
- getAggregation: Get dashboard statistics
- exportCsv: Export stats to CSV
- onStatsUpdate: Subscribe to real-time updates
- Install better-sqlite3@^12.5.0 for SQLite database support
- Add @types/better-sqlite3@^7.6.13 for TypeScript definitions
- Configure electron-rebuild to build both node-pty and better-sqlite3
- Add better-sqlite3 to asarUnpack for proper Electron packaging
- Foundation for upcoming global stats tracking system
- Added `fs.directorySize` IPC API returning size, files, folders stats 📦
- File Explorer now shows bottom status bar with counts and size 📊
- File tree refresh fetches tree and directory stats in parallel ⚡
- Session state now stores `fileTreeStats` for richer explorer context 🧾
- AutoRun task progress highlights completed/total counts with accent styling 🎯
- History detail markdown now uses consistent terminal prose styling 📝
- History panel scroll handling throttled to 4ms for smoother scrolling 🧈
- Terminal output scroll throttling upgraded for ultra-smooth scrollbar feel 🏎️
- Scrollbar highlight logic now batched via RAF and passive listeners 🧵
- System prompt clarifies read-only/plan mode: include artifacts plus summary 🧠
- Agent configs (paths, env vars, custom args) use productionDataPath to share between dev/prod
- Sessions and settings use the appropriate data directory based on mode:
- npm run dev: uses maestro-dev directory (isolated from production)
- npm run dev:prod-data: uses production directory (shares everything)
- NewInstanceModal now properly loads customPath/Args/EnvVars from stored agent configs
- Chromium service worker storage uses separate dev directory to avoid lock conflicts
Fixes#114 - Linux x64 native module compilation was failing because:
1. Python 3.11 setup was missing (node-gyp needs distutils, removed in 3.12+)
2. build-essential package was not installed
3. No post-package verification to catch failures
Changes:
- Add build-essential to Linux x64 dependencies
- Add Python 3.11 setup for Linux x64 (matching ARM64/macOS)
- Add post-install architecture verification for Linux x64
- Add post-package verification for Linux x64 unpacked resources
Both Linux architectures now have symmetric build verification steps.
- Added Playbook Exchange browsing screenshot to docs for instant clarity 🖼️
- Added Playbook Details view screenshot to guide imports and metadata 🔍
- Removed outdated refactor task docs to keep repo leaner 📉
- Upgraded `useScrollPosition` default throttle to 4ms for buttery scroll ⚡
- Updated hook documentation to reflect new ~240fps scroll throttling 📘
- Added a documentation-focused test covering the new default throttle value 🧪
- Added Cmd/Ctrl+Shift+[ ] document cycling inside playbook detail view ⌨️
- Wrapped document navigation to loop seamlessly from end to start 🔁
- Refreshed detail header/footer backgrounds to use main theme surface 🎨
- Gave markdown preview its own themed background for cleaner reading 📖
- Improved “Read more…” styling with subtle active-state highlight 🖱️
- Updated search bar and input backgrounds for stronger contrast 🔍
- Standardized text inputs: removed transparent styling, added activity background 🧩
- Switched modal layout to fixed 80vh height for stable scrolling 📐
Found expired OAuth token, attempting refresh...
Token refresh successful
## CHANGES
- AboutModal now accepts `handsOnTimeMs` instead of full sessions array 🚀
- Tests updated to verify displayed accumulated hands-on time totals ⏱️
- Removed Session test fixtures, keeping AboutModal tests leaner 🧹
- Edge-case coverage now targets zero hands-on time input behavior 🧪
- Dropped undefined per-session active-time handling from test suite 🗑️
- Rebranded Playbook Marketplace into Playbook Exchange across docs and UI 🔄
- Added dedicated IPC handlers to fetch and import Exchange playbooks ⚙️
- Wired Playbook Exchange launch action through App modals and Auto Run 🧩
- Introduced Playbook Exchange quick action for one-keystroke access ⌨️
- Added Exchange button directly inside Batch Runner for faster discovery 🧰
- Upgraded Exchange detail view with clickable document list and “Read more” 📚
- Improved markdown preview styling with themed prose and link handling 🖋️
- Added folder picker to import playbooks into chosen relative/absolute paths 📂
- Introduced in-modal help popover with submission link to community repo 🆘
- Add openMarketplace shortcut definition in shortcuts.ts
- Register shortcut handler in useMainKeyboardHandler.ts (only active when Auto Run folder is set)
- Add setMarketplaceModalOpen to keyboard handler context in App.tsx
- Added marketplace button (LayoutGrid icon) to AutoRun.tsx top controls
- Added marketplace button to AutoRunExpandedModal.tsx header
- Added onOpenMarketplace prop to AutoRun and AutoRunExpandedModal components
- Updated RightPanel.tsx to pass onOpenMarketplace through autoRunSharedProps
- Added marketplaceModalOpen state to ModalContext
- Wired up MarketplaceModal in App.tsx with handlers for opening and import completion
- Import completion handler refreshes Auto Run document list and shows success toast
Implement the detail view shown when a user selects a playbook tile:
- Add detail view state management (selectedPlaybook, showDetailView, etc.)
- Create PlaybookDetailView component with:
- Header with back button and playbook title/category
- Left metadata sidebar (description, author link, tags, documents, settings)
- Document dropdown selector (matching AutoRunDocumentSelector pattern)
- Markdown preview area with GitHub-flavored markdown support
- Import footer with editable folder name and import button
- Implement document fetching via fetchReadme and fetchDocument
- Add handleImport callback for playbook import functionality
- Update escape key handling (returns to list view first, then closes modal)
All 57 Marketplace-related tests pass.
- Create MarketplaceModal.tsx with full modal structure using createPortal
- Implement category tabs with Cmd+Shift+[/] keyboard navigation
- Add search bar filtering by title, description, and tags
- Create responsive 3-column playbook tiles grid
- Implement arrow key navigation for tile selection with Enter to select
- Add PlaybookTile sub-component with category badge, title, description
- Include loading spinner, error state with retry, and empty states
- Add footer with keyboard shortcut hints
- Register with layer stack for proper escape handling (MARKETPLACE: 708)
- All 12,146 tests pass
Implements the React hook for managing marketplace state:
- Initial manifest loading on mount with cache info
- Category extraction from playbooks (sorted, with 'All' option)
- Search filtering by title, description, and tags (case-insensitive)
- Refresh function to bypass cache
- Import playbook function with loading state
- Document fetching (README and individual documents)
Also adds:
- Marketplace mock to test setup for global test support
- Comprehensive test suite with 37 tests covering all functionality
- Created comprehensive test suite with 20 tests covering:
- Cache creation after first fetch
- Cache TTL validation (6-hour expiration)
- Force refresh bypassing cache
- Document and README fetching from GitHub
- Import with correct folder structure
- Null prompt fallback to empty string
- Error handling for network errors and 404s
Implements the foundation for the Playbook Marketplace feature:
Types (src/shared/marketplace-types.ts):
- MarketplaceManifest, MarketplacePlaybook, MarketplaceDocument types
- MarketplaceCache for local caching with TTL
- Custom error types: MarketplaceFetchError, MarketplaceCacheError, MarketplaceImportError
- Re-exported from src/shared/types.ts
IPC Handlers (src/main/ipc/handlers/marketplace.ts):
- marketplace:getManifest - Fetch with 6-hour cache TTL
- marketplace:refreshManifest - Force refresh bypassing cache
- marketplace:getDocument - Fetch individual document content
- marketplace:getReadme - Fetch playbook README
- marketplace:importPlaybook - Import playbook to local Auto Run folder
Preload Bridge:
- Added marketplace API to src/main/preload.ts
- Added TypeScript types to src/renderer/global.d.ts
Bug Fix:
- Fixed batch processor to use default Auto Run prompt when playbook.prompt
is empty/null (marketplace playbooks use prompt: null to indicate default)
- Agent configs now always persist in production userData path 🔒
- Dev/demo sessions no longer overwrite machine-level agent configuration 🧩
- Quick Actions “Edit Agent” now displays its keyboard shortcut hint ⌨️
- Alt-based shortcuts now correctly recognize punctuation keys across layouts 🗝️
- OpenSpec commands docs updated with the new pull-request icon 🗂️
- Troubleshooting docs refreshed with a clearer support icon choice 🛟