Commit graph

31 commits

Author SHA1 Message Date
Amrit Subramanian ead8191b22 Fix MCP server removal and execAsync shell invocation
- Fix execInLoginShell to properly wrap commands instead of malformed shell option
- Fix serverMap accumulating deleted servers by clearing on each poll
- Add optimistic UI removal for instant feedback when removing servers
- Add refresh after add operation with loading spinner
- Remove recently removed servers tracking (unnecessary with proper serverMap clear)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 00:11:22 -04:00
Amrit Subramanian 4dce901166 Remove unused sessionId parameter from MCP handlers
Since MCP commands now run in independent login shells via execAsync,
the sessionId parameter is no longer needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 23:20:26 -04:00
Amrit Subramanian d687523e4d Use execAsync with login shell for MCP add/remove/get commands
- Replaces PTY-based execution to avoid race conditions with MCP poller
- Uses process.env.SHELL to detect user's preferred shell
- Falls back to /bin/zsh on macOS, /bin/bash on Linux
- Executes in login shell (-l) to ensure PATH is set correctly
- Each command runs in independent shell process (no interference)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 23:19:27 -04:00
Amrit Subramanian 84e43f656c Run MCP add/remove/get commands in poller PTY instead of execAsync
- Fixes issue where execAsync spawns non-login shell without claude in PATH
- All MCP operations now run in the session's MCP poller PTY
- Adds executeInMcpPoller helper to run commands and wait for completion
- Uses prompt detection to know when command finishes
- 10 second timeout for safety

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 19:37:08 -04:00
Amrit Subramanian 2e88696071 Add configurable worktree root directory setting
Users can now configure where worktrees are stored via the settings modal. The setting is persisted and applies to all new sessions created after the change.

Changes:
- Added worktreeDir field to TerminalSettings interface
- Added UI controls in settings modal for selecting worktree directory
- Updated worktree creation logic to use configured directory
- Defaults to ~/worktrees for backward compatibility
2025-10-07 14:55:35 -04:00
Amrit Subramanian 17b7e81bda Use readable project names for worktree directories
- Worktrees now use project basename: ~/worktrees/FleetCode/session1
- Adds collision detection with .fleetcode-project marker file
- If collision detected, appends short hash: FleetCode-a3b2c1
- MCP config moved to ~/worktrees/ProjectName/mcp-config.json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 14:47:00 -04:00
Amrit Subramanian 0f748493af Move worktrees from .fleetcode to ~/worktrees
- Worktrees now live in ~/worktrees/<project-hash>/<session-name>
- MCP config files also moved to ~/worktrees
- Removed ensureFleetcodeExcluded function (no longer needed)
- Uses MD5 hash of project directory to organize worktrees by project

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 14:44:57 -04:00
Amrit Subramanian 6d45f36310 fix checking ready for setup commands 2025-10-07 13:25:26 -04:00
Amrit Subramanian 917edcf5ec Add HTTP support to MCP server parsing and extract terminal ready check
- Update MCP server regex to handle HTTP type servers in addition to SSE and stdio
- Extract terminal readiness detection into reusable isTerminalReady() helper function with configurable start position

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 13:03:38 -04:00
Amrit Subramanian 2d97d3171a wait for terminal ready after running each setup comand 2025-10-07 12:59:22 -04:00
Amrit Subramanian bc30ef22fe Start MCP poller immediately when session starts 2025-10-06 20:46:04 -04:00
Amrit Subramanian 2930290662 resizing works, delete git branch when deleting session 2025-10-06 18:05:14 -04:00
Amrit Subramanian fcd62c27bb Add custom branch name feature
Users can now specify a custom branch name when creating a session. If provided, the custom name is used as both the git branch name and the session display name.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 17:09:48 -04:00
Amrit Subramanian 9405824d7b Add loading spinner to MCP add button during polling
- Send mcp-polling-started event from main process before each poll
- Show spinner on add button when polling starts
- Restore + button when mcp-servers-updated event received
- Spinner shows on initial load and every 60s refresh
2025-10-05 16:13:23 -04:00
Amrit Subramanian 639ec0ab08 Add per-project MCP configuration support
- Extract MCP servers from ~/.claude.json for each project
- Write project MCP config to .fleetcode/mcp-config-<hash>.json
- Pass --mcp-config flag to Claude CLI on session start
- Update MCP poller to run in project directory instead of worktree
- Reduce first poll delay from 2s to 500ms for faster UI updates
- Add unique UUID suffix to git branch names to prevent conflicts
- Store mcpConfigPath in persisted sessions
2025-10-05 16:01:59 -04:00
Amrit Subramanian 54e7a1adb4 Implement per-session MCP server polling with headless PTY
- Add headless PTY poller for each session that runs in session's worktree directory
- Spawn MCP poller when Claude shows > prompt (authenticated context)
- Parse MCP server output with regex, merge servers by name to handle chunked data
- Show/hide MCP section based on active session
- Clean up MCP pollers on session close/delete
- Add unique UUID suffix to branch names to prevent conflicts on recreate
- Remove global MCP polling interval in favor of per-session polling
2025-10-05 13:47:37 -04:00
Amrit Subramanian cd4e0f64c8 Add login shell support, session creation loading state, and refactoring
- Spawn PTY as login shell (-l flag) to properly source shell configs (fixes pyenv issues)
- Add animated loading spinner to session creation button
- Refactor duplicate PTY spawning logic into shared spawnSessionPty() function
- Fix unread indicator bugs (clear timers on session switch/close/delete)
- Configure electron-builder to publish releases instead of drafts
- Remove Windows builds (node-pty compilation issues)
2025-10-04 22:49:33 -04:00
Amrit Subramanian 7d7a545ef8 readme 2025-10-03 16:55:59 -04:00
Amrit Subramanian c45ac9ea98 set up commands before claude 2025-10-03 16:27:22 -04:00
Amrit Subramanian 020d8ba82d configurable themes 2025-10-03 16:18:18 -04:00
Amrit Subramanian f05d2502c5 ignore fleetcode directory 2025-10-03 15:12:46 -04:00
Amrit Subramanian d01e715e68 mcp servers and a bunch of stuff 2025-10-03 01:13:24 -04:00
Amrit Subramanian 1c614c9d28 add mcp server working 2025-10-03 00:25:36 -04:00
Amrit Subramanian 1d873aa82a worktrees 2025-10-02 21:16:50 -04:00
Amrit Subramanian fe287a2f53 persist settings for quicker session creation 2025-10-02 20:47:20 -04:00
Amrit Subramanian 4ce0384b9d claude starts 2025-10-02 20:43:06 -04:00
Amrit Subramanian f61aca9d09 session config 2025-10-02 20:20:05 -04:00
Amrit Subramanian 66e0c96b75 refactor styles 2025-10-02 18:33:22 -04:00
Amrit Subramanian 7fd4968a35 some terminal session fixes 2025-10-02 13:22:03 -04:00
Amrit Subramanian 272f763e71 sidebar 2025-10-02 13:16:38 -04:00
Amrit Subramanian cec2c28ce1 typescript 2025-10-02 13:03:09 -04:00
Renamed from main.js (Browse further)