* 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>
Git initialization now explicitly specifies --initial-branch=main to match
GitHub's default branch standard (since October 2020). This prevents the
branch name mismatch that caused features to disappear from the UI when
pushing to GitHub.
Fixes#734🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use lstatSync with try/catch for robust broken symlink detection
- Remove redundant existsSync check before mkdirSync with recursive: true
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes#742
This commit resolves two critical issues that prevented the Electron app from starting:
1. **Broken symlinks in server bundle**
- After npm install, local @automaker/* packages were symlinked in node_modules
- These symlinks broke after electron-builder packaging since relative paths no longer existed
- Solution: Added Step 6b in prepare-server.mjs to replace symlinks with real directory copies
- Added lstatSync and resolve imports to support symlink detection and replacement
2. **electronUserDataWriteFileSync fails on first launch**
- The userData directory doesn't exist on first app launch
- Writing .api-key file would fail with ENOENT error
- Solution: Added directory existence check and creation with { recursive: true } before writing
Files modified:
- apps/ui/scripts/prepare-server.mjs: Added symlink replacement logic after npm install
- libs/platform/src/system-paths.ts: Added parent directory creation in electronUserDataWriteFileSync
Verification: After these fixes, npm run build:electron produces a working app that starts without ERR_MODULE_NOT_FOUND errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated the ProjectSwitcher component to conditionally apply top padding based on the operating system and Electron environment. This change utilizes the newly created MACOS_ELECTRON_TOP_PADDING_CLASS for improved maintainability and consistency across the UI.
Extract the hardcoded 'pt-[38px]' magic number into a shared constant
MACOS_ELECTRON_TOP_PADDING_CLASS for better maintainability. This
addresses the PR #732 review feedback from Gemini Code Assist.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updated the sidebar header and navigation components to increase top padding for macOS Electron users from 10px to 38px, ensuring better layout and avoiding overlap with the traffic light controls. This change enhances the user experience on macOS platforms.
Dev server test was failing on non-localhost hostnames (e.g., 'fedora')
because it expected 'localhost' in the URL. Now sets HOSTNAME env var
in test setup and restores it in teardown for consistent test behavior
across all environments.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The Copilot icon had a hardcoded white fill that made it invisible on
light theme backgrounds. Changed to use currentColor so it adapts to
theme and respects CSS text color classes.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The fetchOpencodeModels function was calling '/api/opencode/models' which
returns 404. Changed to '/api/setup/opencode/models' which correctly
returns the dynamic models.
This fixes an issue where enabled OpenCode dynamic models (e.g., local
Ollama models) were not appearing in the Model Defaults dropdown selectors
despite being visible and enabled in the OpenCode Settings page.
Update the EventHistoryView component to use toast notifications instead of alert dialogs for displaying event replay results, enhancing user experience and providing clearer feedback on success and failure states.
Add project name display at the top of the navigation for the classic
(discord) sidebar style, which previously didn't show the project name
anywhere. Shows the project icon (custom or Lucide) and name with a
separator below.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix setProjectCustomIcon using wrong property name (customIcon -> customIconPath)
- Add currentProject state update to setProjectIcon and setProjectCustomIcon
- Fix data URL regex to handle all formats (e.g., charset=utf-8 in GIFs)
- Increase project icon size limit from 2MB to 5MB for animated GIFs
- Add toast notifications for upload validation errors
- Add image error fallback to folder icon in project switcher
- Make HttpApiClient get/put methods public for store access
- Fix TypeScript errors in app-store.ts (trashedAt type, font properties)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Updated the revision prompt generation to utilize a customizable template, allowing for dynamic insertion of plan version, previous plan content, user feedback, and task format examples.
- Added validation to ensure the presence of a tasks block in the revised specification, with clear instructions on the required format to prevent execution issues.
- Introduced logging for scenarios where no tasks are found in the revised plan, warning about potential fallback to single-agent execution.
Move pure utility functions from app-store.ts and type files into
dedicated utils modules for better separation of concerns:
- theme-utils.ts: Theme and font storage utilities
- shortcut-utils.ts: Keyboard shortcut parsing/formatting
- usage-utils.ts: Usage limit checking
All utilities are re-exported from store/utils/index.ts and
app-store.ts maintains backward compatibility for existing imports.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address Gemini review feedback - reduce code duplication by having
FeatureImage extend ImageAttachment instead of duplicating properties.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create store/types/ directory with 8 modular type files:
- usage-types.ts: ClaudeUsage, CodexUsage, isClaudeUsageAtLimit
- ui-types.ts: ViewMode, ThemeMode, KeyboardShortcuts, etc.
- settings-types.ts: ApiKeys
- chat-types.ts: ChatMessage, ChatSession, FeatureImage
- terminal-types.ts: TerminalState, TerminalTab, etc.
- project-types.ts: Feature, FileTreeNode, ProjectAnalysis
- state-types.ts: AppState, AppActions interfaces
- index.ts: Re-exports all types
- Update electron.ts to import from store/types/usage-types
(breaks circular dependency between electron.ts and app-store.ts)
- Update app-store.ts to import and re-export types for backward
compatibility - existing imports from @/store/app-store continue
to work
This is PR 1 of the app-store refactoring plan.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
titleBarStyle: 'hiddenInset' is a macOS-only option. Use conditional
spread to only apply it when process.platform === 'darwin', ensuring
Windows and Linux get consistent default styling.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Guard against NaN ports from non-numeric env variables in constants.ts
- Validate IPC sender before returning API key to prevent leaking to
untrusted senders (webviews, additional windows)
- Filter dialog properties to maintain file-only intent and prevent
renderer from requesting directories via OPEN_FILE
- Fix Windows VS Code URL paths by ensuring leading slash after 'file'
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address review feedback:
- Simplify tsx CLI path lookup by extracting path variables and
reducing nested try-catch blocks
- Remove redundant try-catch around electronAppExists check in
production server path validation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Vite bundles all electron modules into a single main.js file,
so __dirname remains apps/ui/dist-electron regardless of source
file location. Updated path comments to clarify this behavior.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extract the monolithic main.ts (~1000 lines) into focused modules:
- electron/constants.ts - Window sizing, port defaults, filenames
- electron/state.ts - Shared state container
- electron/utils/ - Port availability and icon utilities
- electron/security/ - API key management
- electron/windows/ - Window bounds and main window creation
- electron/server/ - Backend and static server management
- electron/ipc/ - IPC handlers with shared channel constants
Benefits:
- Improved testability with isolated modules
- Better discoverability and maintainability
- Single source of truth for IPC channels (used by both main and preload)
- Clear separation of concerns
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address CodeRabbit review comment - API keys stored in CLI credentials
file should also be detected as valid authentication.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updated the error handling in the Claude Code CLI authentication check to log the specific error encountered. This enhancement provides better visibility into issues during the authentication process, ensuring users are informed of any problems that arise.
The startup warning "No Claude authentication configured" was shown
even when users have Claude Code CLI installed and authenticated
with a subscription. The Claude Agent SDK can reuse CLI authentication,
so this was a false positive.
Now checks for Claude Code CLI authentication indicators before
showing the warning:
- Recent CLI activity (stats cache)
- CLI setup indicators (settings + project sessions)
- OAuth credentials file
Also updated the warning message to list all authentication options.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix window.Electron to window.isElectron in http-api-client.ts
- Use void operator instead of async/await for onClick handlers in git-diff-panel.tsx
- Fix critical bug: correct parameter order in useStartAutoMode (maxConcurrency was passed as branchName)
- Add error handling for getApiKeys() result in use-cli-status.ts
- Add authClaude guard in claude-cli-status.tsx for consistency with deauthClaude
- Add optional chaining on api object in cursor-cli-status.tsx
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extended SetupAPI interface with 20+ missing methods for Cursor, Codex,
OpenCode, Gemini, and Copilot CLI integrations
- Fixed WorktreeInfo type to include isCurrent and hasWorktree fields
- Added null checks for optional API properties across all hooks
- Fixed Feature type conflicts between @automaker/types and local definitions
- Added missing CLI status hooks for all providers
- Fixed type mismatches in mutation callbacks and event handlers
- Removed dead code referencing non-existent GlobalSettings properties
- Updated mock implementations in electron.ts for all new API methods
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>