Plan 01: ContextSwitcher dropdown, ConnectionStatusBadge, SidebarHeader
integration, keyboard shortcut (Cmd+Shift+K), and availableContexts state.
Plan 02: WorkspaceSection settings for SSH profile CRUD with auto-refresh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Initialize context system on app mount before notification listeners
- Render ContextSwitchOverlay as first child in ErrorBoundary
- Add context:onChanged listener to sync renderer state on external context switches
- Snapshot validation already implemented in contextSlice (validateSnapshot function)
- Create ContextSwitchOverlay component with full-screen loading state
- Create useContextSwitch hook exposing switchContext/isContextSwitching/activeContextId
- Add ContextSlice to AppState type intersection
- Compose createContextSlice into store creation
- Install idb-keyval for IndexedDB persistence
- Create contextStorage service with TTL-based snapshot save/load
- Create contextSlice with switchContext and initializeContextSystem actions
- Implement snapshot validation to filter invalid tabs/selections
- Exclude transient state (loading, errors, Maps/Sets) from snapshots
- Add SSH connection profile management methods to ConfigManager
- addSshProfile(): Store connection profiles for quick reconnection
- removeSshProfile(): Remove profiles by ID
- updateSshProfile(): Update existing profiles
- getSshProfiles(): Retrieve all profiles
- setLastActiveContextId(): Persist last active context for app restart
- profiles array and lastActiveContextId field in ssh config section
- Context API already existed from plan 02-02 with all required IPC handlers and preload bridge
- Created 02-02-SUMMARY.md with implementation details
- Updated STATE.md: Plan 2 of 3 complete, 50% progress
- Added decisions: onContextSwitched callback, SSH context ID format
- Updated metrics: 3 plans completed, 5 min average
- No deviations from plan
- projects.ts: Accept registry, resolve projectScanner via getActive()
- sessions.ts: Accept registry, destructure all services from getActive()
- search.ts: Accept registry, resolve projectScanner via getActive()
- subagents.ts: Accept registry, resolve all services from getActive()
- ssh.ts: Accept registry, create/destroy ServiceContext on connect/disconnect
- SSH_CONNECT: Create new ServiceContext with SSH provider, register, start, switch
- SSH_DISCONNECT: Switch to local, destroy SSH context
- Import onContextSwitched from index.ts to rewire file watcher events
- All handlers now call registry.getActive() at invocation time
- No module-level service variables remain - fully dynamic routing
- Replace global service variables with ServiceContextRegistry
- Create local context at startup with LocalFileSystemProvider
- Register local context in registry and start it
- Wire file watcher events via wireFileWatcherEvents helper
- Export onContextSwitched callback for SSH handler
- Remove handleModeSwitch callback (replaced by registry pattern)
- Update initializeIpcHandlers to accept registry instead of individual services
- Remove reinitializeServiceHandlers entirely from handlers.ts
- ServiceContextRegistry pattern eliminates need for service recreation on mode switch
FileWatcher.dispose():
- Calls stop() to close watchers
- Clears all timers: retry, debounce, catch-up, polling
- Clears all tracking maps: lastProcessedLineCount, lastProcessedSize, activeSessionFiles, polledFileSizes, processingInProgress, pendingReprocess
- Calls removeAllListeners() LAST to prevent events during cleanup
- Sets disposed flag to prevent reuse
DataCache.dispose():
- Clears cache Map
- Disables caching
- Sets disposed flag to prevent reuse
- Auto-cleanup interval managed by caller (ServiceContext)
Both services prevent restart after disposal for proper lifecycle management.
- ServiceContext: service bundle for single workspace context
- Encapsulates all session-data services (ProjectScanner, SessionParser, SubagentResolver, ChunkBuilder, DataCache, FileWatcher)
- Manages service lifecycle (start, stop, dispose)
- Proper dependency chain wiring
- ServiceContextRegistry: coordinator for all contexts
- Manages Map of contexts with active tracking
- Enforces local context permanence (cannot be destroyed)
- Context switching (stops old watcher, starts new watcher)
- Safe disposal of SSH contexts
- Updated barrel exports in infrastructure/index.ts
- Introduced new planning files including PROJECT.md, REQUIREMENTS.md, ROADMAP.md, and STATE.md to outline the vision and requirements for SSH multi-context workspaces.
- Added ARCHITECTURE.md and CONCERNS.md to detail the codebase structure and address technical debt, known bugs, and security considerations.
- Created CONVENTIONS.md to establish coding standards and practices for the project.
- Updated .gitignore to exclude demo files and added configuration for planning tools.
This commit lays the groundwork for enhancing SSH functionality and user experience in managing multiple workspaces.
- Remove dynamic fs/promises, os, and path imports from SubagentDetailBuilder
- Add fsProvider and projectsDir parameters to buildSubagentDetail function
- Replace fs.access() with fsProvider.exists() for file existence check
- Replace os.homedir() path construction with projectsDir parameter
- Update ChunkBuilder.buildSubagentDetail() to accept and pass new parameters
- Update IPC subagents handler to obtain provider and projectsDir from ProjectScanner
- Update initializeSubagentHandlers to accept ProjectScanner parameter
- Update handlers.ts to pass ProjectScanner to subagent handler initialization
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add getFileSystemProvider() getter to ProjectScanner
- Update SessionParser.parseSessionFile() to pass provider to parseJsonlFile()
- Update SessionParser.parseSubagentFile() to pass provider to parseJsonlFile()
- Update SubagentResolver.parseSubagentFile() to pass provider to parseJsonlFile()
- Update SessionParser test mock to include getFileSystemProvider method
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Added functionality to save and retrieve the last SSH connection configuration, allowing for auto-fill on subsequent launches.
- Introduced new IPC channels for saving and getting the last SSH connection details.
- Updated the connection state management to persist the last connection information upon successful connection.
- Enhanced the ConnectionSection component to load the last connection details on mount and pre-fill the form fields.
- Refactored relevant types and state management to accommodate the new SSH last connection features.
- Removed the 'toolName' and 'matchField' properties from the default trigger configuration.
- Updated the default match field options to include a new option for matching against the entire JSON-serialized input.
- Added SSH config host alias support, allowing users to fetch and resolve host entries from the SSH config file.
- Introduced SshConfigParser to handle parsing of ~/.ssh/config and retrieving host aliases.
- Updated ConnectionSection to include a combobox for selecting SSH config hosts with auto-fill capabilities.
- Enhanced SshConnectionManager to utilize the new SshConfigParser for resolving host configurations.
- Added IPC channels for fetching SSH config hosts and resolving host aliases.
- Updated relevant types and state management to accommodate new SSH config features.
- Updated CI workflow to trigger on specific paths for pushes and pull requests, ensuring relevant changes are monitored.
- Integrated retry logic in the release workflow for macOS packaging to enhance reliability during the build process.
- Added an override for @electron/notarize to version 2.5.0 in both package.json and pnpm-lock.yaml to ensure compatibility and resolve potential issues with notarization.
- Added notarization team ID configuration for macOS builds.
- Corrected expected output in pathDecoder tests to reflect accurate project name extraction.
- Reintroduced the afterSign script for notarization in the electron-builder configuration.
- Cleaned up the configuration by removing the duplicate afterSign entry from the mac section.
- Updated the README to use a higher resolution icon for better visibility.
- Improved the UpdateDialog component by adding a backdrop button for dismissing the dialog and enhancing accessibility with ARIA attributes.
- Integrated electron-updater for automatic updates, including IPC handlers for checking, downloading, and installing updates.
- Updated electron-builder configuration to include entitlements and notarization scripts for macOS.
- Enhanced README with installation instructions and updated features.
- Added new components for update notifications and dialogs in the renderer.
- Improved CI workflow permissions for better release management.
- Simplified the CI workflow by consolidating the validate job to run only on Ubuntu.
- Introduced a new test job that runs on both Ubuntu and Windows, including steps for dependency installation and testing.
- Updated the release workflow to directly publish macOS and Windows packages without intermediate artifact uploads.
- Improved the test cleanup process to include a delay and enhanced error handling for file removal on Windows.
- Replaced pnpm dlx electron-builder with direct electron-builder command in build scripts for improved clarity and consistency.
- Specified electron-builder version in package.json and pnpm-lock.yaml to ensure consistent builds across environments.
- Added new dependencies and updated existing ones in pnpm-lock.yaml for better compatibility and functionality.
- Renamed macOS packaging job to 'package-mac' and updated certificate secret reference.
- Added new 'package-win' job for Windows builds, including steps for checkout, dependency installation, app building, and artifact uploading.
- Added notarization configuration for macOS builds to support app distribution.
- Updated CI workflow to run on Ubuntu instead of macOS for improved compatibility.
- Modified test cleanup process to include retry logic for file removal.
- Refactored path handling in tests to use path.join for better cross-platform compatibility.
- Introduced CI workflow for automated testing and validation on push and pull request events.
- Added Release workflow for packaging and distributing the application on version tag pushes.
- Enhanced loading skeletons in ChatHistory and ProjectsGrid components for improved visual feedback.
- Updated splash screen with new animations and styles for better user experience.
- Refined CSS variables for skeleton loading states to ensure consistency across themes.