Commit Graph

2676 Commits

Author SHA1 Message Date
Pedram Amini
33355253eb fix stats-db backup tests and harden regex escaping
Test fixes: removed shadowed mockFsReaddirSync variable, moved
vi.resetModules() to beforeEach, added pragma integrity_check mock,
and fixed existsSync mock for daily backup creation test.

Production hardening: escape baseName dots in regex patterns used by
getAvailableBackups() and rotateOldBackups() to prevent unintended
matches when db filename contains regex metacharacters.
2026-02-05 18:02:14 -06:00
Pedram Amini
ec7abca6dd bugfix, missing import 2026-02-05 15:37:19 -06:00
Pedram Amini
e283cd985a Merge pull request #306 from chr1syy/fix-windows-probing
Windows enhancements and fixes
2026-02-05 15:36:05 -06:00
Pedram Amini
1fef296351 Merge pull request #278 from salmanmkc/upgrade-github-actions-node24
Upgrade GitHub Actions for Node 24 compatibility
2026-02-05 15:33:20 -06:00
Pedram Amini
b922f985e2 Merge pull request #279 from ThanhNguyxn/fix/jump-to-bottom-shortcut
fix: Jump to Bottom shortcut (Cmd+Shift+J) now works
2026-02-05 14:52:37 -06:00
Pedram Amini
0aa4260451 Merge pull request #308 from pedramamini/0.15.0-polish
0.15.0 polish
2026-02-05 14:48:57 -06:00
Pedram Amini
1f080785d2 ## CHANGES
- Tab naming now preserves referenced PR, issue, and ticket IDs 🔖
- Added clear examples for PR numbers, issue numbers, and JIRA IDs 📌
2026-02-05 14:46:35 -06:00
Pedram Amini
b908ed5d6e docs: add Conductor Profile section to configuration docs
Explains what the Conductor Profile is, how to configure it, what to
include, and how agents use it. Previously only had brief parenthetical
mentions without dedicated documentation.
2026-02-05 14:42:59 -06:00
Pedram Amini
d29bb36346 Merge pull request #302 from dmaynor/fix/windows-cmd-length-limit-301
Fix Windows wizard failure by sending prompt via stdin for stream-json mode
2026-02-05 14:39:38 -06:00
Pedram Amini
d7e1b45bc1 Fix keyboard shortcuts to show platform-appropriate text (fixes #294)
Display "Ctrl+Enter" on Windows/Linux instead of macOS-specific
"Command+Enter" and "⌘ + Enter" symbols. Uses isMacOS() helper from
shortcutFormatter.ts to detect platform and render appropriate text.
2026-02-05 14:05:46 -06:00
chr1syy
d2206c2548 feat: add Volta Node version manager support
Added support for Volta (https://docs.volta.sh/), a Node version manager
for Windows/macOS/Linux. This resolves issue #295 where OpenCode installed
via Volta was not being detected.

Changes:
- Added ~/.volta/bin to Windows path expansion in getExpandedEnv()
- Added Volta paths to Windows OpenCode detection in probeWindowsPaths()
- Volta's shim directory (~/.volta/bin) is now searched when detecting tools

Users with OpenCode installed via Volta will now see it automatically
detected in the Wizard and available for group chat moderator selection.
2026-02-05 20:00:30 +01:00
chr1syy
3a0affb149 feat: prefer PowerShell and auto-detect shell scripts on Windows
Improvements to Windows shell execution for OpenCode and other shell-based tools:

1. **Binary detection priority**: Changed Windows detection to prefer extensionless
   shell scripts (like opencode) over .cmd wrappers. The .cmd files execute through
   cmd.exe which has command line length limits and less robust script handling.

2. **Auto-detect shell scripts**: Added shebang detection in ChildProcessSpawner to
   automatically enable shell execution for POSIX scripts, preventing ENOENT errors
   when trying to execute shell scripts without explicit shell.

3. **Use PowerShell by default**: Changed Windows agent execution to prefer PowerShell
   over cmd.exe when available via PSHOME environment variable. PowerShell provides:
   - Better handling of POSIX shell scripts (with shebangs)
   - Avoids cmd.exe command line length limitations
   - Better compatibility with modern tooling

   Falls back to cmd.exe if PowerShell unavailable, respects user customizations.

4. **Improved path detection**: Updated Windows path probing to correctly prefer
   .exe > extensionless scripts > .cmd in the selection order.
2026-02-05 19:49:34 +01:00
chr1syy
e65266f8d9 test: add Windows nvm4w path detection test
Verifies that nvm4w Node.js installation paths are properly included in
the expanded PATH environment on Windows, ensuring OpenCode and other
npm-installed tools are detected correctly.
2026-02-05 19:49:24 +01:00
chr1syy
32e4fc33a6 fix: add nvm4w node path detection for Windows
OpenCode installed via npm in nvm4w Node installations was not being
detected because C:\nvm4w\nodejs\ path was not included in the expanded
PATH environment. This fix adds support for nvm4w and fallback paths so
OpenCode can be properly discovered and selected as a group chat moderator.
2026-02-05 19:49:10 +01:00
chr1syy
5616e6107b fix: resolve select dropdown z-index issue in group chat modals
The native HTML select element's dropdown menu was being rendered behind
the modal overlay, making it impossible to interact with the options. This
was caused by a z-index stacking context issue where the modal's overlay
had a higher z-index than the select element.

Fixed by explicitly setting zIndex: 10000 on the select container and
select element, and zIndex: 10001 on the icon, ensuring the dropdown
renders above the modal overlay (z-index: 9999).

Fixes the issue in both NewGroupChatModal and EditGroupChatModal.
2026-02-05 19:48:25 +01:00
chr1syy
c260cc824e MAESTRO: Implement model selection for OpenCode moderator - Task 3.1
- Add customModel field to ModeratorConfig type for storing selected model
- Update NewGroupChatModal to pass agentConfig.model through moderatorConfig
- Update App.tsx handleCreateGroupChat to accept customModel parameter
- Update spawnModeratorSynthesis to pass sessionCustomModel from moderatorConfig
- Update initial moderator spawn to pass sessionCustomModel for both spawns
- Verify modelArgs config produces correct --model flag in arguments

This enables users to select a custom model when creating a group chat,
and ensures the selected model is applied when spawning the OpenCode moderator.
2026-02-05 19:47:09 +01:00
Pedram Amini
7574757849 Improve custom notification logging to reflect actual trigger state
- Update ToastContext to compute willTriggerCustomNotification before logging
- audioNotification.enabled now only true when notification WILL be sent
- Add reason field to explain why notification was skipped (disabled, no-command, opted-out, no-content)
- Bump notification skip log from debug to info level in IPC handler
- Update test to match new audioNotification format with reason field
2026-02-05 02:56:55 -06:00
Pedram Amini
9af6a603c0 Remove outdated LLM feedback synopsis notification trigger
The LLM analysis feedback synopsis feature was previously removed,
but the documentation about it remained in both the UI and docs.
2026-02-05 02:16:17 -06:00
Pedram Amini
7daa5d7cd2 Merge pull request #304 from pedramamini/conductor-profile
Add Conductor Profile
2026-02-05 02:05:43 -06:00
Pedram Amini
3df5dff622 Merge pull request #305 from pedramamini/0.15.0-polish
0.15.0 polish
2026-02-05 02:05:38 -06:00
Pedram Amini
c9b74b62e4 Add Task Recall section to wizard prompts for session history access
Add Task Recall documentation to both wizard prompts (wizard-system.md
and wizard-inline-system.md), enabling AI to access session history for
context about previously completed work. Extended documented fields to
include fullResponse, elapsedTimeMs, and contextUsage for detailed
context retrieval.

Updated wizardPrompts.ts and inlineWizardConversation.ts to pass
historyFilePath through template context. Modified useInlineWizard.ts
to fetch history file path during wizard initialization and store in
state for use across conversation session creation points.
2026-02-05 02:02:13 -06:00
Pedram Amini
58eeeefb8b Add Conductor Profile feature for personalized AI interactions
Introduces an "About Me" field in Settings → General that allows users
to describe their background, preferences, and communication style.
This profile is exposed as {{CONDUCTOR_PROFILE}} template variable and
included in AI chat, group chat, and wizard prompts so agents can
tailor their responses to the user.
2026-02-05 01:47:56 -06:00
Pedram Amini
5cb53ac37b Improve new agent wizard UX with tip box and header rename
- Rename wizard header from "Create a Maestro Agent" to "New Agent Wizard"
- Add info tip box explaining in-tab wizard alternative (/wizard command, wand button)
- Only show tip box when user has existing agents (first-time users won't see it)
- Update note copy: "The new agent wizard captures application inputs until complete"
- Add final sentence: "The in-tab wizard runs alongside your other work"
- Move "Select the provider" text directly above agent tiles
- Center note box vertically with equal spacing
- Update test mocks with sessions.getAll and sshRemote.getConfigs
2026-02-05 01:36:45 -06:00
Pedram Amini
a14b5b770b Fix tab bar scroll to keep active tab fully visible after rename
When a tab is renamed (manually or via auto-generation), its width may
change. Added activeTabName as a dependency to the scroll-into-view
effect so the tab bar auto-scrolls to keep the active tab (including
close button) fully visible after name changes.
2026-02-05 01:04:12 -06:00
Pedram Amini
d01e2a01e3 Add daily backup system with 7-day rotation and auto-restore on corruption
- Daily backups created on app startup (stats.db.daily.YYYY-MM-DD)
- Automatic rotation removes backups older than 7 days
- On corruption, iterate through backups to find valid one to restore
- Add getAvailableBackups() and restoreFromBackup() public methods
- Backups validated with integrity_check before restoration
- Legacy timestamp backups also recognized for restore candidates
2026-02-05 01:04:12 -06:00
David Maynor
2d227ed02c Fix Windows wizard failure by sending prompt via stdin for stream-json mode
When using stream-json output mode on Windows, the prompt was being added
both as a CLI argument AND sent via stdin, causing the command line to
exceed cmd.exe's ~8191 character limit and resulting in immediate exit
code 1.

Now detects when stream-json is in the args and ensures the prompt is
sent only via stdin, avoiding the command line length limit.

Fixes #301

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:56:52 -05:00
Pedram Amini
4080153666 Merge pull request #299 from pedramamini/0.15.0-polish
0.15.0 polish
2026-02-04 18:36:14 -06:00
Pedram Amini
15a4d31c16 ## CHANGES
- Added IPC handler to fetch earliest stats timestamp for smarter ranges 🕰️
- Implemented StatsDB query to compute oldest event across all tables 🧮
- Introduced IPC stubs for stats initialization/reset notifications groundwork 🧱
- Added “New Agent” action to hamburger menu with proper shortcut hint 
- Reordered menu to separate New Agent, Wizard, and Tour actions clearly 🧭
- Upgraded menu links: dedicated Website and Documentation entries with icons 🌐
- Polished external-link UX by showing an explicit external-link indicator 🔗
- Restored “Check for Updates” as a focused menu action at the bottom 📥
2026-02-04 18:35:51 -06:00
Pedram Amini
a5ce8377eb Fix Codex SSH sessions showing stderr prefix in responses
When Codex reads prompts from stdin, it outputs "Reading prompt from
stdin..." followed by the actual response to stderr. This caused the
response to appear in red STDERR blocks in the UI.

Fix: Detect and strip the "Reading prompt from stdin..." prefix for
Codex sessions, then emit the actual response content as regular data
instead of stderr.

Added StderrHandler tests covering:
- SSH informational message filtering
- Codex stdin response extraction
- Buffer accumulation
2026-02-04 18:35:51 -06:00
Pedram Amini
60fc0fc5da Add Windows support notice modal for Windows users on startup
Shows a modal on first launch for Windows users explaining that Windows
support is actively being improved. Features:
- Inline toggle to enable beta updates for latest bug fixes
- Link to report issues on GitHub (with note that vetted PRs welcome)
- Link to join Discord Windows-specific channel for community support
- Create Debug Package button for easy bug reporting
- Checkbox to suppress the modal for future sessions
- Console debug function: window.__showWindowsWarningModal()
2026-02-04 18:35:51 -06:00
Pedram Amini
21f1bbdec3 Fix file preview tab close button visibility when tab is focused
- Add shrink-0 to AI Tab and FileTab containers to prevent flex
  compression, ensuring tabs maintain natural width for all content
  including extension badge and close button
- Use double requestAnimationFrame for scroll-into-view to ensure
  DOM has fully rendered (including conditional close button) before
  measuring tab width for scrolling
- Replace scrollIntoView with manual scrollLeft calculation to ensure
  the ENTIRE tab (including right edge with close button) is visible,
  not just enough to show some portion of the tab
- Update scroll behavior tests to match new implementation
2026-02-04 18:35:51 -06:00
Pedram Amini
1a888973d2 Remove unused error variable in logger catch block
The catch block intentionally ignores all errors to prevent infinite
loops, so the error value is never used. Use bare catch syntax.
2026-02-04 14:33:49 -06:00
Pedram Amini
c3309e05ed Add missing Info and Wand2 icon mocks to wizard integration tests
The AgentSelectionScreen now uses Info and Wand2 icons from lucide-react
(added for the inline wizard tip box). Update the test mock to include
these icons so tests don't fail with missing export errors.
2026-02-04 13:51:19 -06:00
Pedram Amini
9ce51a88f9 Trim leading/trailing whitespace on paste across all input areas
When pasting content, automatically trim leading and trailing whitespace
to reduce manual cleanup. The trimming only intercepts paste when there
is actual whitespace to remove, otherwise native paste behavior is used.

Input areas updated:
- Main AI/terminal input (App.tsx)
- Group chat input (GroupChatInput.tsx)
- Prompt composer modal (PromptComposerModal.tsx)
- Auto Run document editor (useAutoRunImageHandling.ts)
- Wizard document editor (DocumentEditor.tsx)
- Inline wizard document generation (DocumentGenerationView.tsx)
2026-02-04 13:50:54 -06:00
Pedram Amini
32bb3cf354 Add tip box with inline wizard alternatives to agent selection screen
- Move "Select the provider" text directly above agent tiles for better flow
- Add info box explaining keyboard capture and alternatives (/wizard command, wand button)
- Display inline Wand2 icon for visual clarity
- Center note box vertically with equal spacing above/below
- Update test mocks to include Info, Wand2, and AlertTriangle icons
2026-02-04 13:17:30 -06:00
Pedram Amini
a0f104f58f Add tip box with inline wizard alternatives to agent selection screen
- Move "Select the provider" text directly above agent tiles for better flow
- Add info box explaining keyboard capture and alternatives (/wizard command, wand button)
- Display inline Wand2 icon for visual clarity
- Update test mocks to include Info, Wand2, and AlertTriangle icons
2026-02-04 13:15:40 -06:00
Pedram Amini
798541cb4b Rename provider-nuances to provider-notes and add custom configuration docs
Add new Custom Configuration section documenting custom CLI arguments and
environment variables with screenshot. Rename navigation group to "Providers
& CLI" and reorder to list provider-notes first.
2026-02-04 13:14:17 -06:00
Pedram Amini
f599072cdc Fix SSH remote sessions displaying raw JSON instead of parsed responses
Enable stream-json mode for SSH stdin script execution. When SSH wraps
agent commands, the args being checked (SSH args like -o BatchMode=yes)
don't contain 'stream-json', causing JSON output to bypass the parser.

Added sshStdinScript to isStreamJsonMode detection so remote agent
output is properly parsed through the JSON output parser.
2026-02-04 12:21:20 -06:00
Pedram Amini
da5551fea5 Add Sentry breadcrumbs and memory monitoring for crash diagnostics
- Add addBreadcrumb() utility to track user actions before crashes
- Add startMemoryMonitoring() with configurable threshold and interval
- Record breadcrumbs at agent spawn/kill operations
- Auto-start memory monitoring when Sentry initializes (500MB threshold, 1min interval)

This provides context in crash reports to help identify patterns
leading to renderer crashes (MAESTRO-5A/4Y).

Relates to MAESTRO-5A, MAESTRO-4Y
2026-02-04 11:41:15 -06:00
Pedram Amini
a761b84e77 Ensure dialog:selectFolder IPC handler always sends reply
Add try-catch wrapper and isDestroyed() check to prevent "reply was
never sent" errors when the window closes during dialog operations.

Fixes MAESTRO-58
2026-02-04 11:41:06 -06:00
Pedram Amini
3109189305 Fix EPIPE error when console stdout is disconnected
Wrap console output in try-catch to gracefully handle EPIPE errors
that occur when a parent process consuming output dies unexpectedly.

Fixes MAESTRO-5C
2026-02-04 11:40:58 -06:00
Raza Rauf
811e592076 Merge pull request #297 from pedramamini/0.15.0-polish
Round of Polishing
2026-02-04 10:06:22 -06:00
Pedram Amini
af4a6c4c93 ## CHANGES
- Symphony modal now receives sessions list for richer contribution context 🧩
- Active contributions show clickable session name with new Terminal icon 🖥️
- Added “navigate to session” flow directly from contribution cards 🧭
- Selecting a session updates active session and auto-closes modal 
- Session lookup wires contributions to matching session IDs seamlessly 🔗
2026-02-04 07:51:29 -06:00
Pedram Amini
16cf35390c let users know about how maestro works 2026-02-04 00:59:45 -06:00
Pedram Amini
f38f6b66e6 ## CHANGES
- Renamed empty-state action from “Select Folder” to “Change Folder” for clarity 🧭
- Refreshed empty-state helper text to match the new folder-change flow 📝
- Cleaned up `EditGroupChatModal` icon imports by dropping the unused `X` 🎛️
2026-02-04 00:15:13 -06:00
Pedram Amini
17fed4f232 ## CHANGES
- Added Code Style section to CLAUDE.md specifying tabs-for-indentation requirement 📏
- Added Root Cause Verification section under Debugging with historical bug patterns 🔍
- Added UI Bug Debugging Checklist to CLAUDE-PATTERNS.md (section 11) 🎨
- Documents CSS-first debugging, portal escapes, and fixed positioning pitfalls 🐛
2026-02-03 23:29:48 -06:00
Pedram Amini
a7e504e205 ## CHANGES
- Symphony IPC now validates active contributions against stored sessions 🧩
- Orphaned contributions auto-filtered when sessions disappear, keeping UI clean 🧹
- `symphony:getState` returns only session-backed active items for accuracy 🎯
- `symphony:getActive` now excludes contributions tied to missing sessions 🚫
- Added reusable `filterOrphanedContributions` helper with detailed logging 🪵
- Wired `sessionsStore` dependency through main + handler registration flow 🔌
- Integration tests now mock sessions store for realistic state scenarios 🧪
- Expanded handler tests to cover missing-session filtering behavior 🛡️
2026-02-03 23:21:06 -06:00
Pedram Amini
bcf6c4e60d ## CHANGES
- Added brand-new cross-platform guide covering Windows, Linux, macOS, SSH gotchas 🌍
- Documented SSH remote constraints: no chokidar watch, stdin prompts, path norms 🛰️
- Standardized path best-practices: `path.join`, `path.posix`, delimiters, tilde expansion 🧭
- Clarified shell execution differences: default shells, which/where lookup, permissions 🐚
- Codified agent portability quirks: session IDs, storage locations, resume flags 📦
- Introduced keyboard/input pitfalls: macOS Alt keycodes, Windows command-length limits ⌨️
- Added Git cross-platform warnings: stat differences and case-sensitivity traps 🧩
- Upgraded collaboration rules: assumptions, confusion stops, pushback, scope discipline 🤝
- Added Sentry/error-handling guidance: bubble unexpected errors, report with context 🔎
- Refreshed docs structure references to match current `src/` layout and modules 🗺️
2026-02-03 19:31:52 -06:00
Pedram Amini
d5ad08ec9f ## CHANGES
- Default OpenCode vision model now uses `ollama/qwen3-vl:latest` tagging 🏷️
- SSH integration detects remote auth failures across Claude, Codex, OpenCode 🔐
- Added remote config-error detection for missing models/providers in output 🧩
- Added remote path/environment error detection to avoid false SSH failures 🗺️
- SSH tests now skip assertions when remote paths don’t exist (expected) ⏭️
- New SSH integration test validates end-to-end image OCR via agents 🖼️
- Image SSH test auto-copies fixture to remote `/tmp` for file-based agents 📤
- IPC SSH execution switched to stdin-fed `/bin/bash` for cleaner runs 🐚
- SSH command builder now exports env + cwd via stdin script reliably 📜
- AutoRun shows Save/Revert whenever dirty (even in preview mode) 💾
- Context consumption warnings now default to disabled in settings ⚙️
2026-02-03 16:43:13 -06:00
Raza Rauf
e6ced8a77b Merge pull request #289 from pedramamini/code-refactor
feat: add conservative context growth estimation during multi-tool turns
2026-02-03 16:40:56 -06:00