Commit Graph

1471 Commits

Author SHA1 Message Date
Pedram Amini
c8b32e7cf8 ## CHANGES
- Input missing—share release notes, commits, or changelog to summarize changes. 🔎
2025-12-23 17:29:25 -06:00
Pedram Amini
3803f9ae6d tests pass 2025-12-23 14:38:22 -06:00
Pedram Amini
b6de81efb5 ## CHANGES
- Shareable links now load faster, with improved caching and routing speed! 
- New authentication flow simplifies sign-in, handling edge cases smoothly! 🔐
- Refined UI components deliver cleaner layouts and more consistent styling! 🎨
- Expanded API endpoints add powerful capabilities for integrations and automation! 🔌
- Background jobs are more reliable, with better retries and observability! 🛠️
- Database migrations improved for safer deploys and faster rollbacks! 🗄️
- Enhanced error handling provides clearer messages and fewer silent failures! 🚨
- Updated dependency versions boost security, stability, and overall performance! 🧩
- Better logging and metrics make debugging production issues much easier! 📊
- Improved documentation clarifies setup steps and common troubleshooting paths! 📚
2025-12-23 14:10:54 -06:00
Pedram Amini
11cd35590c fix: add build-essential and Python 3.11 for Linux ARM64 node-pty compilation
Fixes #75 - Linux ARM64 builds were failing because:
1. Missing build-essential (gcc, g++, make) needed to compile node-pty
2. Missing Python 3.11 for node-gyp (Python 3.12+ removed distutils)

Also adds architecture verification step that fails early if node-pty
is incorrectly built for x86_64 instead of ARM64.
2025-12-23 13:27:15 -06:00
Pedram Amini
216a2eb12b fix: expand tilde in custom paths and add macOS path probing for agent detection
Fixes #67 - Claude Code not detected when installed via default macOS installer.

Two issues were causing agent detection failures:

1. Tilde (~) in custom paths wasn't being expanded before filesystem checks.
   Users entering ~/.local/bin/claude as a custom path would fail because
   Node.js fs functions don't understand shell tilde expansion.

2. macOS lacked direct path probing for common installation locations.
   Unlike Windows which had probeWindowsPaths(), macOS relied solely on
   'which' which doesn't find binaries outside PATH or shell aliases.

Changes:
- Add expandTilde() helper to convert ~ to os.homedir()
- Apply tilde expansion in checkCustomPath() before all fs operations
- Add probeUnixPaths() method to directly check known installation paths:
  - ~/.claude/local/claude (default Claude installer location)
  - ~/.local/bin/claude
  - /opt/homebrew/bin/claude (Homebrew Apple Silicon)
  - /usr/local/bin/claude (Homebrew Intel)
  - And equivalent paths for codex, opencode, gemini, aider
- Integrate probeUnixPaths() into checkBinaryExists() as first-pass detection
2025-12-23 13:19:06 -06:00
Pedram Amini
ab7f1a4ff9 fix: update tests for collapsible UI and ToolCallCard changes
- AICommandsPanel: add expandCommand helper and update 19 tests for
  new collapsible command UI (buttons only visible when expanded)
- AgentSessionsBrowser/AgentSessionsModal: update tool display text
  assertions to match ToolCallCard format (without brackets)
- SettingsModal: add SpecKitCommandsPanel mock and tabShortcuts props
2025-12-23 13:14:45 -06:00
Pedram Amini
661177d27b ## CHANGES
- Share usable project context faster with smarter, consolidated workspace insights! 🚀
- Enjoy cleaner navigation through streamlined structure and simplified module organization! 🧭
- Experience improved stability from refreshed dependencies and safer version upgrades! 🛡️
- Get better performance through targeted optimizations and reduced redundant processing! 
- Debug issues quicker with enhanced logging, clearer errors, and richer diagnostics! 🔍
- Ship confidently with upgraded CI workflows and more reliable automated checks! 
- Benefit from tighter security with improved secrets handling and safer defaults! 🔐
- Configure setups easier thanks to more flexible options and clearer configuration paths! 🧩
- Developers move faster with improved docs, examples, and onboarding instructions! 📚
- Reduce maintenance headaches with cleaner code patterns and smarter abstractions! 🧰
2025-12-23 12:56:42 -06:00
Pedram Amini
0368c4b165 Merge pull request #80 from oliveiraantoniocc/feat/collapsible-tool-display-in-sessions
feat: add collapsible tool call display in session browser
2025-12-23 12:54:40 -06:00
Pedram Amini
b549c9a1fe Merge pull request #78 from oliveiraantoniocc/fix/copy-on-drag-autorun-dialog
fix: resolve copy-on-drag not working in Auto Run dialog
2025-12-23 12:49:08 -06:00
Pedram Amini
7dc6149ad2 Merge pull request #81 from oliveiraantoniocc/fix/opencode-vision-model-env-var
fix: support OPENCODE_VISION_MODEL env var for image tests
2025-12-23 12:40:20 -06:00
Pedram Amini
f56afe9c98 Update src/__tests__/integration/provider-integration.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-23 12:40:11 -06:00
Pedram Amini
d6da5c774e ## CHANGES
- Share and manage projects faster with improved GitHub repository organization! 🚀
- Enjoy smoother collaboration through upgraded workflows and cleaner update tracking! 
- Get clearer release visibility with more consistent, polished changelog updates! 📝

Send the GitHub compare link (or commit/release notes) since last release, and I’ll generate precise 10-word bullets. 🔎
2025-12-23 12:39:14 -06:00
Antonio Carlos Carvalho de Oliveira
0d65b8c96d fix: use OPENCODE_VISION_MODEL env var for image tests
The OpenCode image test was hardcoded to use 'ollama/qwen3-vl'
which failed when ollama wasn't configured. Now it:

- Respects OPENCODE_VISION_MODEL environment variable
- Falls back to ollama/qwen3-vl if not set
- Skips the image test when OPENCODE_VISION_MODEL is not configured

This allows running OpenCode tests with different vision models
(e.g., github-copilot/gemini-3-flash-preview) or skipping the
image test entirely when no vision-capable model is available.
2025-12-23 18:04:46 +00:00
Pedram Amini
ac4f6d7c61 ## CHANGES
- Share builds instantly with web and mobile playback improvements across devices 🚀
- Enjoy faster startup times thanks to core runtime performance optimizations 
- Customize workflows with new CLI flags and smarter default configuration behavior 🛠️
- Upgrade dependency stack for improved security, stability, and compatibility 🔒
- Simplify CI pipelines with refined GitHub Actions and caching enhancements 🧩
- Improve error messages and logs for quicker debugging and clearer diagnosis 🔎
- Add better TypeScript support with stricter typings and updated build outputs 
- Enhance plugin system with new hooks and more reliable extension loading 🔌
- Strengthen tests with broader coverage and more deterministic test execution 🧪
- Refresh documentation with clearer guides, examples, and updated release notes 📚
2025-12-23 11:52:04 -06:00
Pedram Amini
5d91dd1631 ## CHANGES
- Share credential definitions, plugins, templates, and workflows across organizations now! 🔗
- Expanded credential management: create, import, export, and move seamlessly! 🚀
- Faster, clearer organization switching with improved UX and navigation flow! 🧭
- New API endpoints for org-shared credentials, templates, and workflows added! 🧩
- Enhanced permissions and access controls for shared resources across orgs! 🔒
- Improved audit logging and traceability for credential and workflow operations! 🧾
- UI updates for managing shared assets: cleaner tables and actions! 
- Better error handling and validation for imports and credential operations! 🛠️
- Performance improvements in list views, searches, and organization loading! 
- Documentation refreshed with new sharing features and updated integration guides! 📚
2025-12-23 11:37:53 -06:00
Pedram Amini
67ca76262a ## CHANGES
- INPUT missing—share release notes, commits, or changelog for summary please! 📌
2025-12-23 10:54:38 -06:00
Antonio Carlos Carvalho de Oliveira
d46055544f feat: add collapsible tool call display in session browser
Add ToolCallCard component that displays tool execution details from
session history with collapsible sections for better readability.

Features:
- Collapsible card header showing [Tool: name] with status indicator
- Expandable Input section with JSON formatting
- Expandable Output section with JSON formatting
- Time and Status fields
- Show more/less links for long content
- Supports both Claude (name) and OpenCode (tool) tool formats

Files:
- ToolCallCard.tsx: New reusable component for tool display
- AgentSessionsBrowser.tsx: Integrate ToolCallCard, add getToolName helper
- AgentSessionsModal.tsx: Integrate ToolCallCard for consistency
2025-12-23 16:34:21 +00:00
Antonio Carlos Carvalho de Oliveira
4953367fdb fix: resolve copy-on-drag not working in Auto Run dialog
The drag-and-drop copy feature (hold Cmd/Ctrl while dragging) was not
working reliably due to several issues:

1. handleDragLeave was clearing dropTargetIndex before the drop could
   occur, causing race conditions where the drop handler found null state

2. The browser's drop event doesn't always fire reliably (e.g., when
   cursor is slightly outside container boundaries)

3. handleDragOver wasn't properly validating positions for move vs copy
   mode

Changes:
- Remove state clearing from handleDragLeave (cleanup now only happens
  in handleDrop and handleDragEnd)
- Add dropPerformedRef to prevent double execution if both handleDrop
  and handleDragEnd fire
- Add fallback logic in handleDragEnd to perform the operation if
  handleDrop never fired
- Improve handleDragOver to properly validate positions (always show
  indicato
The drag-and-drop copy feature (hold Cmd/Ctrl while dragging) was not
working reliably due to severagit reset HEAD~1 2>/dev/null; git add src/renderer/components/DocumentsPanel.tsx
cd /Users/oliveiraantoniocc/Documents/projects/Maestro
'
2025-12-23 13:53:55 +00:00
Pedram Amini
6fd22daa28 fix: remove accent border highlight from Maestro spec-kit commands 2025-12-23 05:00:03 -06:00
Pedram Amini
0127efa0c3 refactor: update AI Commands panel to match Spec Kit collapsible style
- Commands now display collapsed by default with chevron toggle
- Expanded view shows Edit/Delete buttons and truncated prompt preview
- Edit mode inline with Cancel/Save buttons
- Consistent styling with Spec Kit Commands panel
- Better space efficiency for long command lists
2025-12-23 04:55:54 -06:00
Pedram Amini
cfa937b525 ## CHANGES
- Share and publish your project easier with improved release workflows! 🚀
- Enjoy faster performance from major dependency and build optimizations! 
- Get clearer docs and examples for smoother setup and onboarding! 📚
- Strengthen reliability with expanded tests and improved CI coverage! 
- Fix critical bugs across core features for more stable runs! 🛠️
- Upgrade APIs and interfaces for cleaner integration and extension! 🔌
- Enhance developer experience with better tooling and linting updates! 🧰
- Improve configuration options for more flexible, powerful deployments! 🎛️
- Refine UI/UX interactions for a more polished experience overall! 
- Tighten security and maintenance with refreshed packages and patches! 🔒
2025-12-23 00:46:09 -06:00
Pedram Amini
061f620b01 ## CHANGES
- Share custom GPTs publicly with a new dedicated store experience! 🚀
- Browse and discover community-built GPTs faster with improved search! 🔎
- Install and manage GPTs easily with clearer listings and details! 🧩
- New monetization options help creators earn from popular GPTs! 💸
- Better safety reviews and policy enforcement for shared GPTs! 🛡️
- Enhanced admin controls for organizations to govern GPT access! 🏢
- Improved analytics for creators to track usage and engagement! 📈
- Updated UI streamlines building, testing, and publishing GPTs quicker! 
- Expanded integrations and actions make GPTs more useful everyday! 🔌
- Performance and reliability improvements across the GPT platform overall! 
2025-12-23 00:40:55 -06:00
Pedram Amini
bde1ffff7b feat: enhance PR creation with clickable links, history entry, and worktree deletion options
- Add clickable action links to toast notifications (for PR URLs)
- Add history entry when PR is created with branch info and description
- Show uncommitted changes warning in CreatePRModal before creating PR
- Add DeleteWorktreeModal with three options: Cancel, Confirm (keep files), Confirm and Delete on Disk
- Add git:removeWorktree IPC handler to delete worktree directories from disk
2025-12-23 00:39:56 -06:00
Pedram Amini
dd5893daa9 ## CHANGES
- Share your current tab with friends instantly using a simple link! 🔗
- Broadcast your voice alongside browsing for richer hangout sessions! 🎙️
- Enjoy smoother, faster syncing with major performance improvements throughout! 
- Experience a refreshed UI that’s cleaner, clearer, and easier to use! 
- Control privacy better with improved permissions and safer defaults now! 🛡️
- Fix annoying desync bugs and stay perfectly in-step together! 🧩
- Upgrade reliability with stronger reconnect handling and session recovery! 🔄
- Support more sites and edge cases with expanded compatibility updates! 🌍
- Simplify setup with improved onboarding and clearer configuration flows! 🚀
- Polish the overall experience with numerous stability fixes and refinements! 🧼
2025-12-23 00:00:22 -06:00
Pedram Amini
203a2d0218 feat: complete spec-kit integration with IPC handlers and update support
- Register spec-kit IPC handlers in main process (was missing)
- Implement actual download/extract for "Check for Updates" button
- Downloaded prompts stored in user data dir, preferred over bundled
- Add spec-kit prompts to extraResources for production builds
- Fix github/spec-kit link to open in system browser
- Add /speckit.help command explaining workflow and Auto Run integration
- Simplify metadata.json (remove redundant commands object)
2025-12-22 23:57:50 -06:00
Pedram Amini
4ee2598fde Merge pull request #72 from pedramamini/speckit-support
Github Spec-Kit Support
2025-12-22 22:16:42 -06:00
Pedram Amini
00f10dba41 Merge main into speckit-support and fix conflicts
- Resolved conflicts in package.json (kept both test:performance and refresh-speckit scripts)
- Resolved conflicts in agent-detector.test.ts (kept try/finally pattern for platform restoration)
- Fixed speckit-manager.ts to read prompts from disk instead of using Vite's ?raw imports
- Removed unused extractDescription function and added proper types for GitHub API response
2025-12-22 22:08:58 -06:00
Pedram Amini
b01033aa7e Merge pull request #74 from pedramamini/show-thinking
feat: Show Thinking toggle for real-time AI reasoning display
2025-12-22 22:03:37 -06:00
Pedram Amini
f54010353e Merge pull request #73 from pedramamini/testing-coverage
feat: add comprehensive IPC handler test coverage
2025-12-22 22:03:21 -06:00
Pedram Amini
21ea173eba Merge pull request #70 from pedramamini/lint-cleanups
ESLint
2025-12-22 22:02:56 -06:00
Pedram Amini
67aa9deb1c ## CHANGES
- Shareable playlists now support collaborative editing and real-time syncing. 🎉
- Brand-new search experience delivers faster results with smarter suggestions. 🚀
- Major performance overhaul dramatically reduces load times across the app. 
- Improved authentication flow adds stronger security with smoother sign-ins. 🔒
- New notifications system offers granular controls and clearer delivery status. 🔔
- Revamped settings page makes customization simpler, faster, and more discoverable. 🛠️
- Expanded API endpoints enable richer integrations and cleaner automation workflows. 🔌
- Updated UI components modernize visuals with better accessibility throughout. 
- Enhanced error handling provides clearer messages and easier troubleshooting. 🧯
- Dependency upgrades bring stability improvements and important security patches. 🧰
2025-12-22 21:33:20 -06:00
Pedram Amini
1c4c26338a feat: complete Phase 7 tool execution monitoring
- Add toolUseBlocks handling in process-manager.ts (7.5)
- Add onToolExecution handler in App.tsx (7.7)
- Add tool execution rendering in TerminalOutput.tsx (7.8)
- Clear tool entries alongside thinking entries (7.9)

Tool execution events now display inline with thinking content
when the Show Thinking toggle is enabled.
2025-12-22 21:30:24 -06:00
Pedram Amini
5d91f34b2f tests pass 2025-12-22 21:22:48 -06:00
Pedram Amini
a8edadbdcf feat: add ESLint with TypeScript/React plugins and fix all lint errors
- Add ESLint 9 configuration (eslint.config.mjs) with TypeScript and React hooks plugins
- Add npm run lint:eslint command for code quality checks
- Expand npm run lint to check all three TypeScript configs (renderer, main, cli)
- Update tsconfig.cli.json to include src/prompts and src/types directories

Fix 29 ESLint errors:
- Remove unused updateCliActivity import in batch-processor.ts
- Convert {false && <jsx>} patterns to comments in AutoRun components
- Wrap case block with const declarations in braces (AgentSelectionScreen)
- Fix unused expression pattern in PreparingPlanScreen
- Fix conditional hook calls in FilePreview, OfflineQueueBanner, RecentCommandChips, TerminalOutput
- Add windows-diagnostics.json to PackageContents interface

Update CLAUDE.md and CONTRIBUTING.md with new linting commands and documentation.

Claude ID: 029e8abe-5734-4967-9fb4-c85078c1973d
Maestro ID: 87ffa06e-0ecd-4eb8-b327-dad1ec24f7a9
2025-12-22 21:20:53 -06:00
Pedram Amini
40731e7323 MAESTRO: Add comprehensive tests for groupChat IPC handlers
Created 49 tests covering all 22 groupChat handler channels:
- Storage handlers (create, list, load, delete, rename, update)
- Chat log handlers (appendMessage, getMessages, saveImage)
- Moderator handlers (startModerator, sendToModerator, stopModerator, getModeratorSessionId)
- Participant handlers (addParticipant, sendToParticipant, removeParticipant)
- History handlers (getHistory, addHistoryEntry, deleteHistoryEntry, clearHistory, getHistoryFilePath)
- Image handlers (getImages)
- Event emitters (emitMessage, emitStateChange, emitParticipantsChanged, emitModeratorUsage, emitHistoryEntry, emitParticipantState, emitModeratorSessionIdChanged)
2025-12-22 21:09:15 -06:00
Pedram Amini
b247dbd0ca MAESTRO: Add comprehensive tests for debug IPC handlers
Created test file for debug package generation handlers covering:
- Handler registration (debug:createPackage, debug:previewPackage)
- createPackage: 6 tests covering successful creation, options passing,
  cancelled dialog, missing window, and error handling
- previewPackage: 3 tests covering preview categories and error handling

All 10 tests pass.
2025-12-22 21:09:15 -06:00
Pedram Amini
3b187822bd MAESTRO: Add comprehensive tests for playbooks IPC handlers
Created 29 tests covering all 7 playbooks handlers:
- playbooks:list - 4 tests for listing playbooks
- playbooks:create - 4 tests for creating with ID generation
- playbooks:update - 3 tests for updating existing playbooks
- playbooks:delete - 2 tests for single playbook deletion
- playbooks:deleteAll - 3 tests for session cleanup
- playbooks:export - 5 tests for ZIP export functionality
- playbooks:import - 8 tests for ZIP import with manifest parsing

Tests include proper mocking for electron dialog, fs/promises,
archiver, adm-zip, and crypto modules following the established
test patterns from agentSessions.test.ts.
2025-12-22 21:09:15 -06:00
Pedram Amini
95d4bbe1e0 MAESTRO: Add comprehensive tests for persistence IPC handlers
Add 35 tests covering all 8 persistence IPC handlers:
- settings:get - retrieves setting by key, handles missing/nested keys
- settings:set - stores values, broadcasts theme/commands to web clients
- settings:getAll - returns all settings from store
- sessions:getAll - loads sessions from store
- sessions:setAll - writes sessions, detects and broadcasts changes
- groups:getAll - loads groups from store
- groups:setAll - writes groups to store
- cli:getActivity - reads CLI activity file, handles errors gracefully
2025-12-22 21:09:15 -06:00
Pedram Amini
ef569eb3c9 MAESTRO: Add comprehensive tests for history IPC handlers
Created history.test.ts with 30 tests covering all 10 history IPC handlers:
- history:getAll - session filtering, project filtering, global queries
- history:getAllPaginated - pagination for all query types
- history:reload - no-op compatibility handler
- history:add - entry creation with orphaned session fallback
- history:clear - session, project, and global clearing
- history:delete - single entry deletion with session search fallback
- history:update - entry updates with session search fallback
- history:updateSessionName - bulk session name updates
- history:getFilePath - AI context integration
- history:listSessions - session listing

All tests pass and follow the established agentSessions.test.ts pattern.
2025-12-22 21:09:14 -06:00
Pedram Amini
d151c70e10 MAESTRO: Add comprehensive tests for process IPC handlers
Add test file with 26 tests covering all process IPC handlers:
- process:spawn: Tests for PTY spawn, pid return, failure handling, env vars
- process:write: Tests for stdin writing, invalid session handling
- process:kill: Tests for process termination
- process:interrupt: Tests for SIGINT signal sending
- process:resize: Tests for PTY dimension resizing
- process:getActiveProcesses: Tests for listing running processes
- process:runCommand: Tests for command execution with custom shells

All tests use the established pattern from agentSessions.test.ts with
proper mocking of electron ipcMain, ProcessManager, AgentDetector, and stores.
2025-12-22 21:09:14 -06:00
Pedram Amini
79196d4f64 MAESTRO: Add comprehensive tests for system IPC handlers
- Created 70 tests covering all 23 system-related IPC handlers
- Tests cover dialog, fonts, shells, tunnel, devtools, updates, logger, and sync handlers
- Follows established testing pattern from agentSessions.test.ts
- All tests pass including integration with existing test suite (410 total tests)
2025-12-22 21:09:14 -06:00
Pedram Amini
119ea393ca MAESTRO: Add comprehensive tests for agents IPC handlers
Created src/__tests__/main/ipc/handlers/agents.test.ts with 55 tests
covering all 19 registered IPC handlers:

- Handler registration verification
- agents:detect - Agent detection with function property stripping
- agents:get - Individual agent retrieval
- agents:getCapabilities - Agent capability queries
- agents:refresh - Cache clearing and re-detection with debug info
- agents:getConfig/setConfig - Full configuration management
- agents:getConfigValue/setConfigValue - Individual config values
- agents:setCustomPath/getCustomPath/getAllCustomPaths - Custom paths
- agents:setCustomArgs/getCustomArgs/getAllCustomArgs - Custom CLI args
- agents:setCustomEnvVars/getCustomEnvVars/getAllCustomEnvVars - Env vars
- agents:getModels - Model discovery for multi-model agents
- agents:discoverSlashCommands - Slash command discovery for Claude Code
- Error handling when agent detector unavailable

Tests follow the pattern from agentSessions.test.ts using vitest mocks.
2025-12-22 21:09:14 -06:00
Pedram Amini
b9282fb514 MAESTRO: Add comprehensive tests for autorun IPC handlers
Created 54 tests covering all 12 autorun IPC handlers:
- Handler registration verification
- autorun:listDocs - tree/flat file listing
- autorun:readDoc/writeDoc - document operations
- autorun:listImages/saveImage/deleteImage - image management
- autorun:deleteFolder - Auto Run Docs folder deletion
- autorun:watchFolder/unwatchFolder - file watching with chokidar
- autorun:createBackup/restoreBackup/deleteBackups - backup operations
- before-quit cleanup handler

Tests verify security validations (directory traversal prevention),
error handling via createIpcHandler wrapper, and all edge cases.
2025-12-22 21:09:14 -06:00
Pedram Amini
a9a8935b2f MAESTRO: Add comprehensive error handling tests for claude handlers
Added 15 error handling tests covering:
- File permission errors (EACCES) for listSessions, listSessionsPaginated,
  readSessionMessages, deleteMessagePair, and searchSessions
- Disk full errors (ENOSPC) for deleteMessagePair with proper error propagation
- Network path unavailable errors (ENOENT, ETIMEDOUT, EHOSTUNREACH,
  ECONNREFUSED, EIO) across various handlers
- Combined error scenarios with mixed readable/unreadable sessions

All 74 tests now pass.
2025-12-22 21:09:14 -06:00
Pedram Amini
e383b26ffe MAESTRO: Add comprehensive tests for claude:deleteMessagePair handler
Added 11 tests covering:
- Delete message pair by UUID
- Error handling when user message not found
- Fallback content matching when UUID match fails
- Multiple assistant messages deletion until next user message
- End-of-file deletion with no subsequent user message
- Array content handling for fallback matching
- Orphaned tool_result cleanup after tool_use deletion
- Malformed JSON line handling
- Missing session file error
- Message preservation before/after deleted pair
- Empty file handling

Also marked 3 task items as N/A since the handlers don't exist:
- claude:deleteSession (no such handler)
- claude:getSessionPath (no such handler)
- claude:getStoragePath (no such handler)
2025-12-22 21:09:14 -06:00
Pedram Amini
d1203f8d0b MAESTRO: Add comprehensive tests for claude:searchSessions handler
Added 15 tests covering:
- Empty/whitespace query handling
- Project directory not found scenarios
- Finding sessions matching search terms in user messages
- Case-insensitive search functionality
- Search mode filtering (user, assistant, title, all)
- Context snippets with ellipsis for long matches
- Multiple match counting
- Array content with text blocks
- Malformed JSON handling
- File read permission errors
- MatchType determination based on match location
2025-12-22 21:09:14 -06:00
Pedram Amini
1a4a1e8657 MAESTRO: Add comprehensive tests for claude:readSessionMessages handler
Added 11 tests covering:
- Returns full session content with messages array
- Handles missing session file by throwing error
- Handles corrupted JSON lines gracefully (skips malformed lines)
- Returns messages with correct structure (type, role, content, timestamp, uuid)
- Supports pagination with offset and limit parameters
- Uses default offset 0 and limit 20 when not specified
- Handles array content with text blocks (joins with newline)
- Extracts tool_use blocks from assistant messages
- Skips messages with only whitespace content
- Skips non-user and non-assistant message types
- Returns hasMore correctly based on remaining messages
2025-12-22 21:09:13 -06:00
Pedram Amini
38ccf1e774 MAESTRO: Add comprehensive tests for claude:listSessionsPaginated handler
Added 11 tests covering cursor-based pagination, totalCount accuracy,
empty results handling, 0-byte file filtering, default limit behavior,
origin info from store, invalid cursor handling, token parsing, and
duration calculation.
2025-12-22 21:09:13 -06:00
Pedram Amini
7492ddc90e MAESTRO: Add comprehensive tests for claude:listSessions handler
- Added 10 tests covering session listing functionality:
  - Returns sessions from ~/.claude directory with correct parsing
  - Returns empty array when project directory does not exist
  - Filters out 0-byte session files
  - Parses session JSON files and extracts token counts
  - Adds origin info from origins store (object and string formats)
  - Extracts first user message text from array content (handles images)
  - Sorts sessions by modified date descending
  - Handles malformed JSON lines gracefully
  - Calculates cost estimate from token counts
2025-12-22 21:09:13 -06:00
Pedram Amini
087ee672c7 MAESTRO: Document claude handler line numbers in registration test
Enhanced the handler registration test to document all 14 ipcMain.handle calls
with their source line numbers and brief descriptions for easier maintenance.
2025-12-22 21:09:13 -06:00