Commit Graph

26 Commits

Author SHA1 Message Date
Pedram Amini
17b929d430 feat: Add template variables for custom AI commands
- Add template variable system with substitution for session, project,
  date/time, and git context (e.g., {{SESSION_NAME}}, {{GIT_BRANCH}})
- Display collapsible template variables documentation in AI Commands panel
- Update default /commit command to include {{CLAUDE_SESSION_ID}} for traceability
- Add tag icon indicator for sessions with custom (user-defined) names
- Improve Git Log Viewer date formatting (time for today, full date for older)
- Improve Git Log search UX with better focus handling
- Change Agent Sessions Browser default search mode to 'all'
- Update README with custom AI commands documentation
- Add template variable file reference to CLAUDE.md

Session: 35b88ae2-fc1a-44de-a1a1-4b0f0f5a14f9
2025-11-27 01:30:31 -06:00
Pedram Amini
5235b67bf4 feat: Add message queue for AI mode
Messages sent while the AI is busy are now queued and automatically
processed when the current task completes. Features include:

- Queue display in terminal output with "QUEUED" separator
- Ability to remove individual queued messages via UI
- Blocks slash commands and session clearing while queue has items
- Sequential processing of queued messages on agent exit

Updated README.md and CLAUDE.md to document the new feature.
2025-11-26 05:50:36 -06:00
Pedram Amini
b253c4a7ed gss 2025-11-26 02:21:20 -06:00
Pedram Amini
c30c053e0f feat: add usage stats tracking, UI polish, and LLM settings feature flag
- Add real-time token usage and cost tracking from Claude Code responses
  - New UsageStats type with tokens, cost, and context window
  - Context window tooltip shows detailed token breakdown
  - Cost displayed in main panel header and session list

- Improve input area UX with $ prefix for terminal mode

- Add Cmd+L shortcut to insert markdown checkbox in Scratchpad

- Add terminalOnly flag for slash commands (/jump is terminal-only)

- Disable LLM Settings panel behind feature flag (documented in BACKBURNER.md)

- Fix AgentSessionsBrowser to use layer stack for Escape handling

- Update README with cost tracking feature and keyboard shortcut
- Update CLAUDE.md with process:usage event and usageStats session field
2025-11-26 01:42:30 -06:00
Pedram Amini
2a7093c533 feat: improve terminal output scrolling with page navigation
- Add Option/Alt+Up/Down for page up/down scrolling (viewport height)
- Switch to instant scrolling via Virtuoso for better responsiveness
- Update docs with new keyboard shortcuts
2025-11-25 17:18:20 -06:00
Pedram Amini
eb76646262 feat: add Claude Code session browser and improve shell command handling
- Add AgentSessionsBrowser component to browse and resume Claude Code sessions
- New IPC handlers for claude:listSessions, readSessionMessages, searchSessions
- Read sessions from ~/.claude/projects/ with lazy loading and search
- Add Cmd+Shift+L shortcut to open agent sessions browser
- Improve shell path resolution using 'which' command with fallbacks
- Source ~/.zshrc and ~/.bashrc before running terminal commands
- Add /jump slash command to navigate to CWD in file tree
- Update documentation with new features and API
2025-11-25 16:31:10 -06:00
Pedram Amini
842ca15a65 fix: use ref pattern for layer stack callbacks to prevent re-registration
- Store onClose callbacks in refs to avoid unnecessary layer
  re-registration when parent components re-render
- Applied pattern to GitDiffViewer and SettingsModal
- Updated CLAUDE.md documentation with ref pattern best practice
- Added void to async closeTopLayer call to satisfy linting
2025-11-25 14:21:01 -06:00
Pedram Amini
7478f3a261 docs: add comprehensive Layer Stack System documentation to CLAUDE.md
Added detailed documentation for the new layer stack system in the 'Key Design
Patterns' section of CLAUDE.md, including:

- Problem statement and architecture overview
- Complete modal priority hierarchy table
- Step-by-step guide for adding new modals with code examples
- Layer type definitions (ModalLayer, OverlayLayer)
- Internal search layer handling patterns
- Performance optimization patterns
- ARIA accessibility requirements
- Debugging instructions for development mode

This documentation provides future developers with clear guidance on:
1. How to integrate new modals with the layer stack
2. How to choose appropriate priority values
3. How to handle internal search/overlay states
4. How to use the dev tools for debugging
5. Benefits of the centralized system over the old approach

Total addition: ~150 lines of comprehensive, example-rich documentation.
2025-11-25 04:07:47 -06:00
Pedram Amini
530144ebcd feat: enhance keyboard navigation and UI polish
Keyboard Navigation:
- Add focus restoration when LogViewer closes to ensure hotkeys work
- Fix useEffect dependencies for keyboard event handlers
- Enhance left arrow in file explorer to navigate to parent folders
- Add auto-scroll to keep selected file visible in file tree

UI Improvements:
- Add visual log history timeline in LogViewer showing log distribution
- Improve escape key handling with stopPropagation
- Add data attributes for file tree items to support scrollIntoView

Maintenance:
- Clean up outdated CLAUDE.md sections (Development Phases, Recent Features)
2025-11-25 01:15:28 -06:00
Pedram Amini
0baaa4528d fix: change Focus Left Sidebar shortcut to Cmd+Shift+A
Changed default shortcut from Shift+A to Cmd+Shift+A to better match
the existing shortcut patterns and avoid conflicts with regular typing.
2025-11-24 14:50:37 -06:00
Pedram Amini
e18067e1d7 docs: update keyboard shortcuts documentation in CLAUDE.md
- Document new Focus Left Sidebar shortcut (Shift+A)
- Add comprehensive guide for adding keyboard shortcuts
- Document Alt/Option key support
- Document arrow key naming convention (ArrowLeft, etc.)
- Document Escape key behavior in shortcut customization UI
2025-11-24 14:02:17 -06:00
Pedram Amini
974a5a268d feat: add color-coded status indicators and standardize UI vernacular
- Add session status indicators with color-coding (green/yellow/red/orange)
  to provide clear visual feedback on agent connection states
- Remove superfluous startup messages from AI and Command Terminals for
  cleaner interface on session creation
- Add Cmd+Shift+M shortcut to quickly move sessions to groups
- Standardize terminology across codebase (AI Terminal, Command Terminal,
  Left Bar, Right Bar, Main Window, System Log Viewer)
- Update CLAUDE.md and README.md with comprehensive UI overview and
  standardized vernacular for better communication and documentation
2025-11-24 13:04:09 -06:00
Pedram Amini
927aa8e847 feat: add four new themes and improve theme organization (PED-MORE-THEMES)
Added new themes:
- Dark mode: Catppuccin Mocha, Gruvbox Dark
- Light mode: Catppuccin Latte, Ayu Light (medium-darker, less bright)

Changes:
- Reorganized themes.ts with dark themes first, then light themes for better tab ordering
- Updated ThemeId type to include new theme identifiers
- Updated CLAUDE.md to reflect theme location and list all available themes
- Added missing accentText field to theme structure documentation

The light mode themes (Catppuccin Latte and Ayu Light) provide softer, less bright alternatives to the existing bright light themes like GitHub and Solarized.

Theme picker now displays themes in a logical left-to-right, top-to-bottom order in the 2-column grid layout.
2025-11-24 05:29:02 -06:00
Pedram Amini
50da694ccf feat: add GitHub-style git status widget to header (PED-TRACK-GIT)
Added a new GitStatusWidget component that displays real-time file change tracking:
- Shows counts of additions (green +), deletions (red -), and modifications (orange)
- Positioned in header between LIVE button and Context Window progress bar
- Hover tooltip displays list of all changed files with status indicators
- Click opens modal overlay showing full git diff
- Auto-refreshes every 5 seconds to detect new changes
- Only appears when session is in a Git repository
- Escape key or backdrop click closes diff preview

Implementation details:
- Created GitStatusWidget.tsx component with git status polling
- Updated git service to parse porcelain format output and support full diffs
- Integrated widget into MainPanel.tsx with keyboard controls
- Added comprehensive documentation in CLAUDE.md

Fixes wishlist item PED-TRACK-GIT
2025-11-24 05:23:15 -06:00
Pedram Amini
2337a57c2a feat: add per-mode input send behavior settings (PED-SEND-CONFIG)
Implement separate Enter-to-send configurations for AI and Terminal modes:
- AI mode defaults to Command+Enter to send (Enter creates new line)
- Terminal mode defaults to Enter to send (Shift+Enter creates new line)
- Each mode configurable independently in Settings → General → Input Send Behavior
- Settings persist globally across all sessions and app restarts

Changes:
- Split enterToSend into enterToSendAI and enterToSendTerminal in useSettings hook
- Updated App.tsx, MainPanel, and InputArea to use mode-specific settings
- Added UI controls in SettingsModal General tab with clear toggle buttons
- Implemented migration logic for old enterToSend setting
- Updated CLAUDE.md documentation with new settings and feature description

This allows users to optimize input behavior for different interaction patterns,
e.g., using Command+Enter for thoughtful AI prompts while using Enter for
quick terminal commands.
2025-11-24 05:10:09 -06:00
Pedram Amini
2d0d8b09de docs: document global error catching feature in CLAUDE.md 2025-11-24 05:02:36 -06:00
Pedram Amini
68765a0632 feat: add focus input shortcut (PED-INPUT-SHORTCUT)
Implemented Cmd+. keyboard shortcut to jump to the input field from anywhere
in the main interface (excluding modals). This improves keyboard navigation by
providing a quick way to return focus to the input area.

Changes:
- Added 'focusInput' shortcut to DEFAULT_SHORTCUTS with Cmd+. keys
- Implemented keyboard handler in App.tsx to focus input and switch to main panel
- Shortcut is fully configurable in Settings → Shortcuts
- Updated CLAUDE.md to document the new shortcut in keyboard navigation patterns
- Added to Recent Features section in CLAUDE.md

The shortcut works from any focus area including sidebar, output window,
file tree, and right panel tabs.
2025-11-24 04:57:58 -06:00
Pedram Amini
6c54cf3e0d docs: document process monitor feature in CLAUDE.md 2025-11-24 04:55:03 -06:00
Pedram Amini
cbbe5d34bf feat: add custom shell selection for terminal sessions (PED-CUSTOM-SHELL)
Users can now select their preferred terminal shell (zsh, bash, sh, fish, tcsh) in General Settings.

Key features:
- Automatic detection of available shells on the system using 'which' or 'where' command
- Only available shells are shown as selectable options in settings UI
- Settings persist across application restarts via electron-store
- Selected shell applies to all new terminal sessions
- Default shell remains zsh for compatibility

Changes:
- Added ShellDetector utility for shell detection via PATH
- Updated ProcessManager to accept and use custom shell parameter
- Added defaultShell setting to electron-store with persistence
- Created shell selector UI in General Settings tab with visual feedback
- Updated IPC handlers to support shells:detect
- Updated preload API to expose shells detection
- Updated CLAUDE.md documentation with new feature
- Marked PED-CUSTOM-SHELL as completed in wishlist
2025-11-24 04:50:43 -06:00
Pedram Amini
827c94ad48 docs: document terminal interrupt functionality in CLAUDE.md 2025-11-24 04:43:25 -06:00
Pedram Amini
206b35ee13 feat: add slash commands system and redesign terminal output
Introduces an extensible slash command framework with autocomplete UI and
completely redesigns terminal output for better visual hierarchy and readability.

New Features:
- Slash commands system with autocomplete dropdown
  - Type `/` to open command menu with arrow key navigation
  - Tab/Enter to select, Escape to dismiss
  - Extensible architecture in src/renderer/slashCommands.ts
  - Initial command: /clear to clear output history

Terminal Output Redesign:
- Vertical layout with timestamp at top
- User commands highlighted with $ prefix and accent background
- System messages with sparkle icon indicator
- Improved text wrapping (break-words instead of break-all)
- Better filtering of terminal initialization noise
  - Removes bash/zsh welcome messages
  - Filters control sequences and prompt lines

UI/UX Improvements:
- Command history deduplication for cleaner history menu
- Session filter moved to SessionList component for better organization
- File tree filter Tab key now focuses tree for keyboard navigation
- Slash command autocomplete with mouse hover support

Documentation:
- Added slash commands section to README.md with usage instructions
- Updated keyboard shortcuts to include slash command navigation
- Added slash commands system architecture to CLAUDE.md
- Updated Recent Features section with detailed feature descriptions
2025-11-24 02:16:47 -06:00
Pedram Amini
4d90f8650e feat: implement dual-process architecture with ANSI terminal rendering
Major architectural improvement where each session now runs two processes
simultaneously (AI agent + terminal), enabling seamless mode switching
without process restarts.

Changes:
- Dual-process model: each session spawns both AI agent and terminal processes
- Session type updated: replaced single `pid` with `aiPid` and `terminalPid`
- Process routing: sessionIds now use `-ai` and `-terminal` suffixes
- Input routing: directs input to correct process based on `inputMode`
- ANSI rendering: terminal output now displays ANSI escape codes with theme-aware colors
- Terminal filtering: bash prompts automatically filtered for cleaner output
- Session restoration: detects and fixes corrupted sessions with mismatched inputMode/toolType
- Agent serialization: strips non-serializable `argBuilder` functions before IPC
- Dependencies: added ansi-to-html and dompurify for secure ANSI rendering

Documentation updates:
- Updated README.md and CLAUDE.md to reflect dual-process architecture
- Added new features to Recent Features section
- Updated tech stack with new dependencies
2025-11-24 01:50:23 -06:00
Pedram Amini
96c7462bc1 add system log viewer 2025-11-24 00:10:21 -06:00
Pedram Amini
5f2637e38a docs: add comprehensive error handling patterns documentation
Added detailed error handling patterns section to CLAUDE.md documenting
standardized approaches for:
- IPC handler errors (throw critical, try-catch optional, return objects)
- Service layer errors (never throw, return safe defaults)
- ProcessManager errors (throw spawn failures, emit runtime events)
- React component errors (Error Boundaries, try-catch async ops)
- Custom hook errors (internal try-catch, expose error state)
- Utility function errors (document throw behavior with JSDoc)

Includes code examples, use cases, and summary table for quick reference.
Completes housekeeping task #25.
2025-11-23 23:53:40 -06:00
Pedram Amini
c5ac8dcead docs: update README and CLAUDE.md to document hooks and services architecture 2025-11-23 22:11:54 -06:00
Pedram Amini
ca85ff7c48 UX prototype complete 2025-11-23 19:00:08 -06:00