* feat(terminal): Add core infrastructure for custom terminal configurations
- Add TerminalConfig types to settings schema (global & project-specific)
- Create RC generator with hex-to-xterm-256 color mapping
- Create RC file manager for .automaker/terminal/ directory
- Add terminal theme color data (40 themes) to platform package
- Integrate terminal config injection into TerminalService
- Support bash, zsh, and sh with proper env var injection (BASH_ENV, ZDOTDIR, ENV)
- Add onThemeChange hook for theme synchronization
Part of custom terminal configurations feature implementation.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat(terminal): Wire terminal service with settings service
- Pass SettingsService to TerminalService constructor
- Initialize terminal service with settings service dependency
- Enable terminal config injection to work with actual settings
This completes Steps 1-4 of the terminal configuration plan:
- RC Generator (color mapping, prompt formats)
- RC File Manager (file I/O, atomic writes)
- Settings Schema (GlobalSettings + ProjectSettings)
- Terminal Service Integration (env var injection)
Next steps: Settings UI and theme change hooks.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat(terminal): Add Settings UI and theme change synchronization
Complete Steps 5 & 6 of terminal configuration implementation:
Settings UI Components:
- Add PromptPreview component with live theme-aware rendering
- Add TerminalConfigSection with comprehensive controls:
* Enable/disable toggle with confirmation dialog
* Custom prompt toggle
* Prompt format selector (4 formats)
* Git branch/status toggles
* Custom aliases textarea
* Custom env vars key-value editor with validation
* Info box explaining behavior
- Integrate into existing TerminalSection
Theme Change Hook:
- Add theme detection in update-global settings route
- Regenerate RC files for all projects when theme changes
- Skip projects with terminal config disabled
- Error handling with per-project logging
- Inject terminal service with settings service dependency
This completes the full terminal configuration feature:
✓ RC Generator (color mapping, prompts)
✓ RC File Manager (file I/O, versioning)
✓ Settings Schema (types, defaults)
✓ Terminal Service Integration (env vars, PTY spawn)
✓ Settings UI (comprehensive controls, preview)
✓ Theme Synchronization (automatic RC regeneration)
New terminals will use custom prompts matching app theme.
Existing terminals unaffected. User RC files preserved.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(terminal): Add error handling and explicit field mapping for terminal config
- Add try-catch block to handleToggleEnabled
- Explicitly set all required terminalConfig fields
- Add console logging for debugging
- Show error toast if update fails
- Include rcFileVersion: 1 in config object
This should fix the issue where the toggle doesn't enable after
clicking OK in the confirmation dialog.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(terminal): Use React Query mutation hook for settings updates
The issue was that `updateGlobalSettings` doesn't exist in the app store.
The correct pattern is to use the `useUpdateGlobalSettings` hook from
use-settings-mutations.ts, which is a React Query mutation.
Changes:
- Import useUpdateGlobalSettings from mutations hook
- Use mutation.mutate() instead of direct function call
- Add proper onSuccess/onError callbacks
- Remove async/await pattern (React Query handles this)
This fixes the toggle not enabling after clicking OK in the confirmation dialog.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(terminal): Use React Query hook for globalSettings instead of store
The root cause: Component was reading globalSettings from the app store,
which doesn't update reactively when the mutation completes.
Solution: Use useGlobalSettings() React Query hook which:
- Automatically refetches when the mutation invalidates the cache
- Triggers re-render with updated data
- Makes the toggle reflect the new state
Now the flow is:
1. User clicks toggle → confirmation dialog
2. Click OK → mutation.mutate() called
3. Mutation succeeds → invalidates queryKeys.settings.global()
4. Query refetches → component re-renders with new globalSettings
5. Toggle shows enabled state ✓
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* debug(terminal): Add detailed logging for terminal config application
Add logging to track:
- When terminal config check happens
- CWD being used
- Global and project enabled states
- Effective enabled state
This will help diagnose why RC files aren't being generated
when opening terminals in Automaker.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix terminal rc updates and bash rcfile loading
* feat(terminal): add banner on shell start
* feat(terminal): colorize banner per theme
* chore(terminal): bump rc version for banner colors
* feat(terminal): match banner colors to launcher
* feat(terminal): add prompt customization controls
* feat: integrate oh-my-posh prompt themes
* fix: resolve oh-my-posh theme path
* fix: correct oh-my-posh config invocation
* docs: add terminal theme screenshot
* fix: address review feedback and stabilize e2e test
* ui: split terminal config into separate card
* fix: enable cross-platform Warp terminal detection
- Remove macOS-only platform restriction for Warp
- Add Linux CLI alias 'warp-terminal' (primary on Linux)
- Add CLI launch handler using --cwd flag
- Fixes issue where Warp was not detected on Linux systems
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
- Added deterministic API key and environment variables in e2e-tests.yml to ensure consistent test behavior.
- Refactored CodexProvider tests to improve type safety and mock handling, ensuring reliable test execution.
- Updated provider-factory tests to mock installation detection for CodexProvider, enhancing test isolation.
- Adjusted Playwright configuration to conditionally use external backend, improving flexibility in test environments.
- Enhanced kill-test-servers script to handle external server scenarios, ensuring proper cleanup of test processes.
These changes improve the reliability and maintainability of the testing framework, leading to a more stable development experience.
- Added immediate invocation of abort handler if the abort signal is already triggered, ensuring proper cleanup.
- Updated test to use setImmediate for aborting, allowing the generator to start processing before the abort is called, enhancing reliability.
- Enhanced the configureThrottling function to prevent changes to maxConcurrency while operations are in flight.
- Added comprehensive unit tests for secure-fs throttling and retry logic, ensuring correct behavior and configuration.
- Removed outdated secure-fs test file and replaced it with a new, updated version to improve test coverage.
- Add PRE_RELEASE_PATTERN to identify beta, rc, alpha, nightly, canary, dev, pre versions
- Modify findNodeFromVersionManager to try stable versions first
- Pre-release versions are used as fallback if no stable version found
- Add tests for pre-release detection and version prioritization
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isExecutable() helper to verify files have execute permission
- On Unix: uses fs.constants.X_OK to check execute permission
- On Windows: only checks file existence (X_OK not meaningful)
- Replace fs.existsSync with isExecutable for all node path checks
- Add JSDoc comment documenting version sorting limitations
- Add test to verify found node binary is executable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extract VERSION_DIR_PATTERN regex to named constant
- Pass logger to findNodeViaShell for consistent debug logging
- Fix buildEnhancedPath to not add trailing delimiter for empty currentPath
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix PATH collision detection using proper path segment matching
instead of substring includes() which could cause false positives
- Reorder fnm Windows paths to prioritize canonical installation path
over shell shims (fnm_multishells)
- Make Windows path test platform-aware since path.dirname handles
backslash paths differently on non-Windows systems
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When the Electron app is launched from desktop environments (macOS Finder,
Windows Explorer, Linux desktop launchers), the PATH environment variable
is often limited and doesn't include Node.js installation paths.
This adds a new `findNodeExecutable()` utility to @automaker/platform that:
- Searches common installation paths (Homebrew, system, Program Files)
- Supports version managers: NVM, fnm, nvm-windows, Scoop, Chocolatey
- Falls back to shell resolution (which/where) when available
- Enhances PATH for child processes via `buildEnhancedPath()`
- Works cross-platform: macOS, Windows, and Linux
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes:
- Move subprocess-manager tests to @automaker/platform package
- Tests need to be co-located with source for proper mocking
- Add vitest configuration to platform package
- 17/17 platform tests pass
- Update server vitest.config.ts to alias @automaker/* packages
- Resolve to source files for proper mocking in tests
- Enables vi.mock() and vi.spyOn() to work correctly
- Fix security.test.ts imports
- Update dynamic imports from @/lib/security.js to @automaker/platform
- Module was moved to shared package
- Rewrite prompt-builder.test.ts
- Use fs/promises mock instead of trying to spy on internal calls
- 10/10 tests pass
Test Results:
✅ Server: 536/536 tests pass
✅ Platform: 17/17 tests pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>