Commit Graph

2233 Commits

Author SHA1 Message Date
Pedram Amini
b319f79511 MAESTRO: docs: Fix context-management.md accuracy issues
- Add "Requires Session" column to Tab Menu table with availability conditions
- Add missing tab menu actions: Export as HTML, Publish as GitHub Gist, Move to First/Last Position
- Fix Tab Export section to reference "Export as HTML" instead of "Context: Copy to Clipboard"
- Change "Right-click" to "Hover over" in three sections (hover overlay, not right-click menu)
- Correct Command Palette labels to match actual QuickActionsModal implementation
- Document alternative sharing options (Copy to Clipboard, Publish as GitHub Gist)
2026-01-22 12:29:20 -06:00
Pedram Amini
e37f98047f MAESTRO: Fix Settings tab documentation in configuration.md
- Changed "Appearance: Font size, UI density" to "Themes" (there is no
  Appearance tab - themes have their own tab, fonts are in General)
- Changed "SSH Remotes" to "SSH Hosts" to match actual tab name
- Updated General tab description to include all settings (font family,
  terminal width, log buffer, shell config, stats, document graph, etc.)

Verified accurate: storage paths, cross-device sync, sleep prevention,
notifications, and pre-release channel sections.
2026-01-22 12:29:20 -06:00
Pedram Amini
df29ed9157 MAESTRO: Fix CLI documentation accuracy issues
- Added short flags -g (list agents) and -a (list playbooks) that were
  missing from documentation but exist in implementation
- Documented the clean playbooks command with --dry-run option (was
  completely undocumented)
- Clarified that list agents --json outputs a JSON array, not JSONL
  (different from other list commands)
- Updated JSON event examples to include missing fields: collapsed in
  group events, document in document_complete events
- Added loop_complete event type in JSON output examples
- Added success, usageStats, and totalCost fields to JSON examples
2026-01-22 12:29:20 -06:00
Pedram Amini
f040270fb7 MAESTRO: Fix incorrect auto-save documentation in autorun-playbooks.md
- Changed "Auto-Save" section to "Saving Documents" since documents do NOT
  auto-save after inactivity - manual save via Cmd+S or Save button is required
- Corrected claim that documents "auto-save immediately when switching" -
  switching actually discards unsaved changes
- Added note warning users to save before switching documents
- Added keyboard shortcut Cmd+Shift+E / Ctrl+Shift+E for toggling Expanded Editor
  (was only documenting the click method)

All other content verified as accurate against source code:
- Cmd+Shift+1 opens Auto Run tab (shortcuts.ts:21)
- Reset on Completion format: {TASK}-{timestamp}-loop-{N}.md (autorun.ts:864)
- Session isolation, environment variables, wizard features all accurate
2026-01-22 12:29:19 -06:00
Pedram Amini
20df2afa2f MAESTRO: docs: Fix incorrect Keyboard Mastery information in achievements.md
- Updated level names to match source code (keyboardMastery.ts):
  - Novice → Beginner, Apprentice → Student, Journeyman → Performer,
    Expert → Virtuoso, Master → Keyboard Maestro
- Fixed percentage thresholds: 0-24%, 25-49%, 50-74%, 75-99%, 100%
  (was incorrectly documented as 0-19%, 20-39%, etc.)
- Corrected location of keyboard mastery display: it's shown in the
  Keyboard Shortcuts panel (opened with ? or Cmd/Ctrl+/), not a
  non-existent "status bar"
2026-01-22 12:29:19 -06:00
Pedram Amini
7c2b15c888 MAESTRO: Add security and performance tests for Symphony integration
Add comprehensive Input Sanitization tests:
- XSS payload neutralization in repo names
- SQL injection pattern safety in issue titles
- Command injection prevention in branch names
- Contribution ID manipulation prevention

Add URL Validation tests:
- data: URLs rejection
- URLs with authentication credentials handling
- localhost/internal IP URLs rejection (SSRF prevention)

Add Performance tests:
- Atomic state file writes (no corruption on crash)
- Non-blocking cache reads for large caches
2026-01-22 12:29:19 -06:00
Pedram Amini
3bced9b64d MAESTRO: Add external URL domain validation for Symphony documents
Added security validation to reject external document URLs from non-GitHub
domains. This prevents SSRF attacks and data exfiltration by ensuring
external document URLs only come from trusted GitHub domains:

- github.com, www.github.com
- raw.githubusercontent.com (raw file content)
- user-images.githubusercontent.com (user uploads)
- camo.githubusercontent.com (image proxy)

The validation is applied in both validateContributionParams() and the
symphony:startContribution handler to ensure complete coverage.

Added integration test to verify non-GitHub domain URLs are rejected.
2026-01-22 12:29:19 -06:00
Pedram Amini
8539918f49 MAESTRO: Add embedded path traversal security test for Symphony integration
Added test case to verify that document paths containing embedded traversal
sequences like `foo/../../../etc/passwd` are properly rejected, complementing
the existing path traversal tests for direct `../` and absolute paths.
2026-01-22 12:29:19 -06:00
Pedram Amini
576cded78c MAESTRO: Add PR Status Edge Case tests for Symphony integration
Add 4 new integration tests covering PR status checking edge cases:
- Test checking status of PR that was force-merged
- Test checking status of PR that was reverted
- Test checking status of deleted repository
- Test checking status when GitHub API is down

All tests verify the symphony:checkPRStatuses handler correctly handles
GitHub API responses for merged PRs, API errors (404, 503), and properly
updates state with merge status information.
2026-01-22 12:29:19 -06:00
Pedram Amini
f80bb5b641 MAESTRO: Add Document Handling Edge Cases tests for Symphony integration
Added 8 tests covering edge cases for document handling in Symphony workflows:
- Special characters in filenames (!, @, #, $, %, &, +, =, apostrophes, unicode/emoji)
- Spaces in file paths (including leading/trailing spaces)
- External documents returning 404 (graceful skip)
- External documents with redirects (fetch follows redirects)
- Repo documents deleted after issue creation (graceful skip)
- Empty documents (0 bytes, valid)
- Very large documents (>10MB, handled)
- Large external document downloads (5MB attachments)
2026-01-22 12:29:19 -06:00
Pedram Amini
509a9ebc20 MAESTRO: Add Symphony state edge case tests
Added 5 integration tests for state edge cases:
- Maximum contributions (100+) handling and pagination
- Stats overflow handling for large token counts
- Streak calculation across year boundary (Dec 31 -> Jan 1)
- Streak calculation with timezone edge cases
- Concurrent state updates without file corruption
2026-01-22 12:29:19 -06:00
Pedram Amini
761229c59f MAESTRO: Add git hooks edge case tests for Symphony integration
Added two new test cases covering git hooks that can modify commits:

1. 'should handle git hooks that modify commits':
   - Pre-push hook rejection with custom message
   - Hook that successfully modifies commits (e.g., auto-signing)
   - Verifies both failure and success scenarios

2. 'should handle pre-receive hook that rejects based on commit content':
   - Simulates GitGuardian-style secret scanning rejection
   - Verifies proper error handling for content-based rejections

Tests cover common scenarios where server-side hooks reject pushes due to:
- Commit message format requirements
- Secret detection
- Content policy violations
2026-01-22 12:29:18 -06:00
Pedram Amini
00f07b6092 MAESTRO: Add git push conflict edge case tests for Symphony integration
Add two tests covering scenarios where git push fails due to remote branch conflicts:

1. Test "should handle push when remote branch exists with different content"
   - Tests non-fast-forward rejection when local branch is behind remote
   - Simulates the common scenario where someone else pushed to the same branch

2. Test "should handle push failure due to remote branch force-push (fetch-first)"
   - Tests the scenario when remote history has been rewritten
   - Ensures proper error handling when remote contains work not present locally

Both tests verify that createDraftPR fails gracefully with appropriate error messages
when push operations encounter branch divergence.
2026-01-22 12:29:18 -06:00
Pedram Amini
b168a9f1cc MAESTRO: Add MAX_BODY_SIZE edge case tests for Symphony issue body parsing
Add two integration tests to verify correct handling of issue bodies at
and above the MAX_BODY_SIZE limit (1MB):

1. Test issue body at exactly MAX_BODY_SIZE - Verifies document paths at
   the start are parsed correctly when body is exactly 1,048,576 bytes

2. Test issue body slightly over MAX_BODY_SIZE - Verifies document paths
   at start are found while paths past the truncation point are dropped,
   and parsing completes without error or hanging
2026-01-22 12:29:18 -06:00
Pedram Amini
fb841aee3b MAESTRO: Add Symphony integration tests with minimal mocking
Create comprehensive integration tests for Symphony IPC handlers that:
- Mock only external services (GitHub API via fetch, git/gh CLI via execFileNoThrow)
- Use real file system operations with temporary directories for test isolation
- Test full contribution workflow: start → update status → complete
- Verify state persistence across handler registrations
- Test cache behavior and expiration (registry and issues cache)
- Cover edge cases: unicode repo names, encoded paths, concurrent contributions
- Validate network error handling (timeouts, rate limits, 404s)
- Test git operation failures (clone to existing dir, branch exists, PR exists)
- Verify security: path traversal prevention, URL validation (HTTPS only, GitHub only)
- Include performance tests for pathological regex input

Each test runs in an isolated temp directory to prevent cross-test contamination.
All 22 integration tests pass alongside the existing 188 unit tests.
2026-01-22 12:29:18 -06:00
Pedram Amini
b407d3b822 MAESTRO: Add comprehensive useSymphony hook tests
- Add 48 tests covering the useSymphony hook functionality
- Add window.maestro.symphony mock to test setup
- Test initial state, registry fetching, filtering, repository selection
- Test real-time updates subscription with debouncing
- Test contribution lifecycle (start, cancel, finalize)
2026-01-22 12:29:18 -06:00
Pedram Amini
05149bf3db MAESTRO: Add Symphony constants and types test coverage
Add comprehensive test coverage for shared Symphony modules:

symphony-constants.test.ts (32 tests):
- URL constants validation (registry URL, GitHub API)
- Cache TTL constants (registry 2hr, issues 5min)
- Branch template placeholder verification
- Category definitions with label/emoji properties
- Default contributor stats initialization
- Document path patterns with ReDoS prevention tests

symphony-types.test.ts (46 tests):
- SymphonyError class (message, type, cause, inheritance)
- Type validation for SymphonyCategory (9 values)
- Type validation for ContributionStatus (8 values)
- Type validation for IssueStatus (3 values)
- Type validation for SymphonyErrorType (7 values)

All 78 tests pass.
2026-01-22 12:29:13 -06:00
Pedram Amini
725075b7af MAESTRO: Add comprehensive Symphony Runner service tests
- Create test file with proper mocks for fs/promises, execFileNoThrow, logger, and fetch
- Add 62 tests covering all Symphony Runner service functions:
  - cloneRepo: shallow clone with --depth=1
  - createBranch: checkout -b with correct working directory
  - configureGitUser: user.name and user.email configuration
  - createEmptyCommit: --allow-empty flag with custom message
  - pushBranch: push with -u origin
  - createDraftPR: gh pr create --draft with issue reference
  - downloadFile: fetch and write buffer for external documents
  - setupAutoRunDocs: directory creation, external/internal docs handling
  - startContribution: full workflow integration with cleanup on failure
  - finalizeContribution: commit, push, mark PR ready, update body
  - cancelContribution: close PR with --delete-branch, cleanup options
- All 62 tests passing
2026-01-22 12:29:13 -06:00
Pedram Amini
d12d6372e5 MAESTRO: Add Fetch Document Content and Git Helper tests for Symphony IPC handlers
- Add 8 tests for symphony:fetchDocumentContent handler
  - URL validation tests for github.com, raw.githubusercontent.com, objects.githubusercontent.com
  - Tests for rejecting non-GitHub domains, HTTP protocol, and invalid URLs
  - Tests for fetch behavior including document content retrieval and error handling

- Add 3 tests for checkGhAuthentication via symphony:startContribution
  - Test successful auth status
  - Test not logged in scenario
  - Test gh CLI not installed scenario

- Add 4 tests for getDefaultBranch via symphony:createDraftPR
  - Test symbolic-ref branch detection
  - Test fallback to main branch
  - Test fallback to master branch
  - Test default to main when detection fails
2026-01-22 12:29:13 -06:00
Pedram Amini
a23bc6986f MAESTRO: Add Create Draft PR tests for Symphony IPC handlers
Implemented 10 comprehensive test cases for the symphony:createDraftPR handler:
- Metadata reading from disk and error handling when metadata not found
- Existing PR handling (returns existing PR info if already created)
- gh CLI authentication check
- Commit counting on branch vs base branch
- No-commit scenarios (returns success without PR when no commits exist)
- PR creation workflow (push branch, create draft PR)
- Metadata updates (prCreated, draftPrNumber, draftPrUrl)
- Event broadcasting (symphony:prCreated)
- Return value verification

Tests are organized into 7 describe blocks covering all aspects of the
deferred PR creation workflow.
2026-01-22 12:29:13 -06:00
Pedram Amini
4425434685 MAESTRO: Add Start Contribution tests for Symphony IPC handlers
Added comprehensive test coverage for symphony:startContribution handler:

Input validation tests:
- Repo slug format validation (owner/repo)
- Empty and invalid owner name rejection
- Positive integer issue number validation
- Negative and non-integer issue number rejection
- Document path traversal validation
- Absolute path rejection
- External URL path validation bypass

gh CLI authentication tests:
- Authentication check on startup
- Early failure when not authenticated
- Failure when gh CLI not installed

Branch creation tests:
- Branch creation and checkout
- Branch creation failure handling

Document handling tests:
- Docs cache directory creation for external docs
- External document downloading (GitHub attachments)
- Download failure graceful handling
- Repo-internal document existence verification
- Non-existent document graceful handling
- Path traversal pattern rejection

Output tests:
- Metadata.json writing with contribution info
- symphony:contributionStarted event broadcasting
- Return values (branchName, autoRunPath)
- Error return on failure

All 163 tests pass in the symphony test file.
2026-01-22 12:29:13 -06:00
Pedram Amini
39055b3930 MAESTRO: Add Clone Repo tests for Symphony IPC handlers
Added comprehensive test coverage for symphony:cloneRepo handler including:
- URL validation (GitHub URL validation before cloning)
- Non-GitHub URL rejection (gitlab.com, etc.)
- HTTP protocol rejection (requires HTTPS)
- Invalid URL format rejection
- URLs without owner/repo path rejection
- Parent directory creation verification
- Shallow clone (depth=1) verification
- Success case handling
- Clone failure error message handling
- Network error handling
2026-01-22 12:29:13 -06:00
Pedram Amini
06f39b16b2 MAESTRO: Add Check PR Statuses tests for Symphony IPC handlers
Added comprehensive tests for the symphony:checkPRStatuses handler:

- History entry checking: tests for filtering entries without wasMerged flag,
  GitHub API calls, merge detection, timestamp setting, and stat updates
- Active contribution checking: tests for ready_for_review status filtering,
  moving merged contributions to history
- Error handling: graceful handling of GitHub API errors
- Broadcast behavior: symphony:updated event broadcasting
- Summary return values: checked, merged, closed counts

All 129 tests pass.
2026-01-22 12:29:13 -06:00
Pedram Amini
bd03178e84 MAESTRO: Add Complete and Cancel tests for Symphony IPC handlers
Add comprehensive test coverage for symphony:complete and symphony:cancel IPC handlers:

symphony:complete tests:
- Contribution lookup validation (not found, ID mismatch)
- Draft PR validation (missing PR number or URL)
- PR operations via gh CLI (marking as ready, handling failures)
- PR comment posting with contribution stats
- Using provided stats over stored values
- State transitions (moving from active to history)
- Contributor stats updates (totals, documents, tasks, tokens, time, cost)
- Repository tracking (adding new repos, deduplication)
- Streak calculations (same day, consecutive day, gap reset, longestStreak)
- Return value verification (prUrl, prNumber on success)
- Broadcast verification

symphony:cancel tests:
- Contribution removal from active list
- Local directory cleanup behavior (cleanup=true/false)
- Graceful handling of cleanup errors
- Return value verification (cancelled:false when not found)
- Broadcast verification after cancellation

Total: 20 new tests (118 tests in symphony.test.ts)
2026-01-22 12:29:12 -06:00
Pedram Amini
3861740739 MAESTRO: Add Update Status tests for Symphony IPC handlers
Adds comprehensive test coverage for the symphony:updateStatus IPC handler:

- Status field updates (changing to paused, completing)
- Partial progress updates (preserving unchanged fields)
- Partial token usage updates (preserving unchanged fields)
- timeSpent updates
- draftPrNumber and draftPrUrl updates
- Error field updates
- Proper handling when contribution not found (returns updated:false)
- Broadcast verification after successful updates
2026-01-22 12:29:12 -06:00
Pedram Amini
308467fa14 MAESTRO: Add Register Active tests for Symphony IPC handlers
Add comprehensive test coverage for the symphony:registerActive IPC handler:
- Test new active contribution entry creation with all fields
- Test duplicate contribution detection and skipping
- Test initialization of progress and token usage to zero
- Test broadcast update after successful registration
2026-01-22 12:29:12 -06:00
Pedram Amini
e22b0a4f5f MAESTRO: Add Contribution Start tests for Symphony IPC handlers
Added comprehensive test coverage for the symphony:start handler:

- Input validation (repo slug format, URL validation, issue number, path traversal)
- gh CLI authentication checks (installed, authenticated states)
- Duplicate contribution prevention
- Repository operations (clone to sanitized path, branch creation)
- Cleanup on failures (clone failure, branch creation failure, PR creation failure)
- Draft PR creation (success case with proper parameters)
- State management (save contribution, broadcast updates, return values)
2026-01-22 12:29:12 -06:00
Pedram Amini
ab33e87e00 MAESTRO: Add State Operations tests for Symphony IPC handlers
Implemented 11 new tests covering:
- symphony:getState (3 tests): default state, persisted state, error handling
- symphony:getActive (2 tests): empty array, returning active contributions
- symphony:getCompleted (3 tests): empty array, date sorting, limit parameter
- symphony:getStats (3 tests): default stats, real-time active stats, aggregation

All 63 Symphony tests pass. Total test suite: 15,069 passing tests.
2026-01-22 12:29:12 -06:00
Pedram Amini
77ba0b24a3 MAESTRO: Add comprehensive test coverage for Symphony IPC handlers
Implements Phase 01 of Symphony test coverage with 52 passing tests:

- Test file setup with proper mocks for electron, fs/promises, execFileNoThrow, and global fetch
- Validation helper tests: sanitizeRepoName, validateGitHubUrl, validateRepoSlug, validateContributionParams
- Document path parsing tests: extracting markdown links, bullet/numbered lists, backtick paths, deduplication
- Helper function tests: isCacheValid, generateContributionId, generateBranchName
- IPC handler registration verification for all 17 Symphony handlers
- Cache operations tests for registry, issues, and clearCache with TTL handling
2026-01-22 12:29:12 -06:00
Pedram Amini
f30a67f4f3 - Issues now auto-detect linked open PRs and show in-progress status 🔎
- Issue cards display clickable PR links, authors, and draft badges 🔗
- Added persistent “active contribution” registration when sessions start 🧾
- Active contributions store PR number/URL once first commit creates PR 🧩
- “Complete contribution” now blocked until a draft PR exists 🛑
- New PR status checker marks merged/closed work and updates history 🔄
- Active tab adds “Check PR Status” refresh with status feedback 🧭
- Stats now include live in-progress contribution tokens, time, cost totals 📈
- Contributor stats auto-poll every five seconds for real-time updates ⏱️
- Auto-run documents sorted using natural numeric ordering for sanity 🧮
2026-01-22 12:29:12 -06:00
Pedram Amini
4e562947cf - Launched **Maestro Symphony** to browse curated OSS issues and contribute fast 🎶
- Switched to **deferred draft PR creation**, triggered on first real commit 🧷
- Added PR auto-finalization: **mark ready + summarize contribution stats** 📣
- Posting rich PR comments with tokens, cost, time, docs, tasks breakdown 🧾
- External issue documents now download to **cache**, keeping repos clean 🗄️
- Contribution metadata persisted to `metadata.json` for reliable tracking 🧬
- New IPC + preload APIs for clone, start, createDraftPR, complete workflows 🔌
- App now listens for `symphony:prCreated` to backfill session PR metadata 📡
- Upgraded Symphony session creation to auto-start **Auto Run batch processing** 🚀
- Agent creation dialog revamped: batch-only agents, expandable config, folder picker 🧰
2026-01-22 12:29:07 -06:00
Pedram Amini
a7f5ebf824 - Added main-process GitHub document fetching to bypass pesky CORS limits 🚀
- Exposed `fetchDocumentContent` through preload + typed Maestro API bridge 🔌
- Symphony issue docs now auto-preview first attachment when selected 
- Replaced document tabs with a cleaner dropdown document selector 🧭
- Added Cmd/Ctrl+Shift+[ / ] shortcuts to cycle preview documents ⌨️
- Markdown previews now use centralized prose styling + custom components 📝
- External links in markdown open safely via system browser integration 🌐
- Improved Symphony UI theming: consistent backgrounds, borders, and scroll layout 🎨
- Updated Marketplace left sidebar width to match Symphony layout guidance 📐
- Registry refreshed: Maestro now “AI agents” focused and recategorized 🏷️
2026-01-22 12:29:02 -06:00
Pedram Amini
5da6247fae - Auto Run docs now support repo paths *and* GitHub attachment links 📎
- Introduced `DocumentReference` objects with name, path, and external flag 🧩
- Smarter issue parsing extracts markdown `.md` links into downloadable docs 🔍
- Dedupes documents by filename, preferring external attachments when present 🧠
- Added 1MB issue-body parsing cap to prevent performance blowups 🚧
- Path traversal checks now apply only to repo-relative document references 🛡️
- Auto Run Docs setup can download external files directly via `fetch` 🌐
- Switched runner file ops to Node `fs`, replacing shell `cp/rm` usage 🧰
- Runner now configures git user.name/email to ensure commits always work 🪪
- Failure paths now clean up local repos automatically to reduce clutter 🧹
- History virtualization now measures elements directly for more accurate sizing 📏
- Marketplace and Symphony modals widened for a roomier workflow view 🖥️
2026-01-22 12:28:57 -06:00
Pedram Amini
7bd1c51c05 fix(symphony): Address security and error handling issues from PR review
- Add path traversal prevention: sanitize repo names, validate document paths
- Add GitHub URL validation (HTTPS only, github.com only)
- Add repository slug format validation
- Add gh CLI authentication check before PR operations
- Add default branch detection instead of hardcoded 'main'
- Add remote branch cleanup on PR creation failure
- Fix ReDoS vulnerability in document path regex patterns
- Improve error logging throughout handlers
2026-01-22 12:28:35 -06:00
Pedram Amini
0423a26e66 MAESTRO: Complete Symphony Phase 6 - Registry & GitHub Integration
Add Symphony registry documentation and contribution runner service:
- docs/SYMPHONY_REGISTRY.md: Registry documentation explaining how maintainers register repos
- docs/SYMPHONY_ISSUES.md: Guide for creating Symphony issues with Auto Run documents
- src/main/services/symphony-runner.ts: Service orchestrating contributions with draft PR claiming
- symphony-registry.json: Sample registry with Maestro as the first registered project

The runner service handles the full contribution flow: clone, branch, push, draft PR creation, Auto Run setup, finalization, and cancellation.
2026-01-22 12:28:35 -06:00
Pedram Amini
c75f6f1551 MAESTRO: Complete Symphony Phase 5 - App Integration & Entry Points
Implements all Symphony modal entry points and app integration:

- Add keyboard shortcut ⌘⇧Y to open Symphony modal (shortcuts.ts)
- Add handler in useMainKeyboardHandler.ts using ModalContext pattern
- Integrate SymphonyModal into App.tsx with contribution started handler
- Add Symphony to Cmd+K command palette (QuickActionsModal.tsx)
- Add Symphony to hamburger menu (SessionList.tsx)
- Add symphonyMetadata to Session type for contribution tracking
- Add IPC handlers: symphony:cloneRepo and symphony:startContribution
- Add preload bindings and TypeScript types for Symphony session API
- Wire up contribution event listener to update session state with PR info

The optional Symphony session group feature was skipped - sessions work
without a dedicated group and can be organized manually if needed.
2026-01-22 12:28:35 -06:00
Pedram Amini
6b7f605aff MAESTRO: Add Symphony UI components for Phase 4 implementation
- Create SymphonyModal.tsx with Projects, Active, History, Stats tabs
- Create AgentCreationDialog.tsx for AI provider selection
- Add SYMPHONY and SYMPHONY_AGENT_CREATION modal priorities
2026-01-22 12:26:43 -06:00
Pedram Amini
89a72ffa3f MAESTRO: Add Symphony React hooks for Phase 3 implementation
- useSymphony: Primary hook for registry, issues, and contribution management
- useContribution: Single contribution state and action management
- useContributorStats: Stats and achievements tracking with formatted display
- index.ts: Central exports for all Symphony hooks

Hooks follow established patterns from useMarketplace and Usage Dashboard,
including debounced real-time updates, proper undefined handling for IPC
responses, and type-safe integration with the symphony IPC handlers.
2026-01-22 12:26:24 -06:00
Pedram Amini
0e8c6cd2df MAESTRO: Add Symphony IPC handlers for token donation feature
Implements Phase 2 of Symphony feature with:
- New symphony.ts handler file with registry fetching, issue management,
  contribution lifecycle (start/update/complete/cancel), and caching
- Handler registration in index.ts
- Preload API exposure for renderer access
- TypeScript declarations in global.d.ts

Handlers include:
- symphony:getRegistry - Fetch/cache Symphony registry
- symphony:getIssues - Fetch GitHub issues with runmaestro.ai label
- symphony:getState/getActive/getCompleted/getStats - State queries
- symphony:start/updateStatus/complete/cancel - Contribution lifecycle
- symphony:clearCache - Cache management
- symphony:updated - Real-time event broadcasting
2026-01-22 12:26:24 -06:00
Kayvan Sylvan
2667cbdd77 Developer Experience Improvements (multi-worktree simultaneous development) (#209)
* docs: add git hash display and configurable dev server port

## CHANGES

- Add `VITE_PORT` env variable to configure dev server port
- Display git commit hash in About modal next to version
- Add `__GIT_HASH__` build-time constant to both Vite configs
- Document running multiple Maestro instances with git worktrees
- Update CONTRIBUTING.md with parallel development instructions

* feat: add configurable ports for dev servers

- Allow VITE_PORT to configure main dev server port
- Update main window to load from configurable port
- Enable VITE_WEB_PORT for web interface dev server
- Add note in CONTRIBUTING.md about port configuration
- Log port usage in development mode

* docs: update CONTRIBUTING.md section and fix React DevTools script initialization

## CHANGES

- Rename "Linting" section to "Linting & Pre-commit Hooks" in table of contents
- Move script variable declaration outside conditional block
- Fix React DevTools script initialization order in index.html

* chore: update `.vscode/settings.json` with new markdownlint config

* fix: disable biome linting. Project uses ESLint

* chore: Update baseline-browser-mapping (>2 months old, warning message on "npm run build:web")

* chore: add .vscode/ to gitignore

* chore: fix gitignore to ignore .cscode/* files properly

* fix

* chore: stop tracking .vscode/ files, respect gitignore

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-01-22 12:14:48 -06:00
Kayvan Sylvan
5778a5b34b feat: add local playbook support for marketplace import and display (#216)
- Add merged manifest lookup for local playbook imports
- Read local manifest and merge with official during import
- Display "Local" badge for custom playbooks in marketplace UI
- Add source badge in playbook detail view sidebar
- Support filesystem paths (absolute and tilde) for local playbooks
- Add comprehensive tests for local playbook import scenarios
- Add tests for merged manifest lookup and source tagging
- Fix mock file reads to handle local manifest ENOENT cases
2026-01-22 10:32:03 -06:00
Pedram Amini
30868daa0d - Added per-session daily stats aggregation for richer usage analytics 📊
- Agent Usage chart now tracks Maestro sessions, not providers 🎯
- Map session IDs to friendly names in charts and legends 🏷️
- Limit Agent Usage chart to top 10 sessions by queries 🔟
- Toggle Agent Usage chart between query counts and time metrics ⏱️
- Auto Run queries now record stats with accurate `source: auto` 🤖
- Interactive queries detect Auto Run state to tag stats correctly 🧠
- Smarter cumulative token normalization avoids inflated first-event context % 🛡️
- About modal shows dev commit hash alongside app version 🔍
- Group chat history summaries now strip markdown for cleaner reading 🧹
2026-01-22 10:24:25 -06:00
Raza Rauf
8a6faf7836 Merge pull request #224 from pedramamini/code-refactor
refactor: modularize preload.ts into domain-specific modules with tests
2026-01-22 10:02:09 -06:00
Raza Rauf
57940c28f2 fix: address PR review feedback for preload refactoring
- Replace any[] with proper types in settings.ts (StoredSession, Group).
- Replace console.log with logger service in process.ts.
- Add consistent debug logging across remote IPC handlers.
2026-01-22 20:57:21 +05:00
Raza Rauf
1c2a8101ee refactor: modularize preload.ts into domain-specific modules with tests 2026-01-22 20:33:55 +05:00
Raza Rauf
7749fa5251 Merge pull request #222 from pedramamini/code-refactor
refactor: extract leaderboard and notification handlers from main/index.ts
2026-01-21 12:48:39 -06:00
Raza Rauf
888b53c718 fix: harden TTS and leaderboard handlers against security vulnerabilities
Security fixes:
- Add TTS command whitelist validation to prevent command injection
- Change spawn() to use shell: false for TTS execution
- Add 30-second fetch timeout to all leaderboard API calls
- Add TTS queue size limit (max 10) to prevent memory exhaustion

Test coverage:
- 25+ security tests for TTS command validation
- Timeout tests for all 6 leaderboard handlers
- Queue size limit tests
2026-01-21 23:37:16 +05:00
Raza Rauf
26a2af2182 fix: address PR review feedback for notification handlers
- Remove all console.log/console.error statements in favor of logger
- Fix potential race condition in TTS queue by setting isTtsProcessing
  flag before checking queue length
- Add comprehensive JSDoc comment explaining TTS_MIN_DELAY_MS (15s) rationale
- Fix type guard for stdin error handling with proper type checks
2026-01-21 23:15:25 +05:00
Raza Rauf
8ef8bba615 refactor: extract leaderboard and notification handlers from main/index.ts 2026-01-21 23:04:30 +05:00
Raza Rauf
a7b0f9af20 Merge pull request #220 from pedramamini/code-refactor
refactor: extract filesystem, attachments, and web handlers from main/index.ts
2026-01-21 20:05:35 +05:00