- Fix max-width truncation inconsistency: file tabs now use max-w-[120px] to match AI tabs
- Add theme-aware hover background: dark mode (rgba(255,255,255,0.08)), light mode (rgba(0,0,0,0.06))
- Enhance getExtensionColor() with theme-aware colors for both light and dark modes:
- TypeScript/JavaScript, Markdown, JSON, CSS, HTML with contrast-appropriate colors
- Add support for Python (teal), Rust (red), Go (cyan), Shell (gray)
- Unknown extensions fall back to theme border/textDim colors
- Add 10 unit tests verifying extension badge colors across themes
Verify that the file tab system correctly allows the same file to be
open in multiple sessions simultaneously. Each session maintains its
own independent file tab state (scroll position, search query, edit
mode) even when viewing the same file path.
Tests added:
- allows the same file path to be open in different sessions simultaneously
- each session maintains independent state for the same file
- sessions can have different number of tabs for the same files
Added 15 comprehensive tests to verify file preview tabs are properly
persisted with all their state including:
- Full file tab state (path, content, scrollTop, searchQuery)
- Scroll positions up to 150,000 pixels
- Search queries in file tabs
- Edit mode and unsaved content
- activeFileTabId preservation
- Multiple file tabs per session
- File tabs across multiple sessions
- Unified tab order with mixed AI and file tabs
- Edge cases: empty arrays, undefined tabs, SSH remote metadata
Verify that file preview loading state works for SSH remote files:
- Loading spinner displays when file tab has isLoading: true
- FilePreview renders correctly when isLoading: false
- Loading state works for local files (brief loading states)
- Loading state not shown when AI tab is active
Tests confirm the implementation shows "Loading {filename}" with
"Fetching from remote server..." subtitle while SSH files load.
The file tab system now handles closing via the tab's X button,
making the close button in the FilePreview header redundant.
- Removed X icon import (no longer needed)
- Removed showCloseButton prop from FilePreviewProps interface
- Removed close button JSX from FilePreview header
- Removed showCloseButton={false} prop from MainPanel.tsx
- Updated FilePreview tests (removed close button tests)
Note: onClose prop remains for Escape key handling and unsaved
changes modal confirmation.
The previewFile state was a legacy mechanism for the file preview overlay.
Now that files open in tabs (session.filePreviewTabs), this state is dead
code. This commit removes it and all its references:
- Removed previewFile/setPreviewFile from UILayoutContext
- Updated App.tsx to use activeSession.activeFileTabId/activeFileTab
- Removed legacy file preview rendering block from MainPanel.tsx
- Updated useAppHandlers.ts to remove legacy overlay code path
- Updated props hooks (useMainPanelProps, useRightPanelProps)
- Updated FileExplorerPanel to use activeFileTabId for selection
- Updated keyboard handler to check activeFileTabId instead
- Updated/removed tests for legacy previewFile behavior
The file selection highlighting in FileExplorerPanel now correctly shows
files that are open in file preview tabs, not just the legacy previewFile
overlay. This ensures the file tree highlights the currently active file
when using the new tab-based file preview system.
Migrated the onDocumentOpen callback in DocumentGraphView from the
legacy setPreviewFile overlay system to use handleOpenFileTab for
tab-based file preview. The implementation now:
1. Fetches content and stat in parallel for efficiency
2. Opens file in a tab (or selects existing tab if already open)
3. Provides lastModified timestamp for file info display
4. Properly handles SSH remote execution
All 615 DocumentGraph tests and 370 tab-related tests pass.
Update handleNavigateBack, handleNavigateForward, and handleNavigateToIndex
handlers to use handleOpenFileTab instead of the legacy setPreviewFile overlay.
Each handler now:
- Updates the filePreviewHistoryIndex for state tracking
- Calls handleOpenFileTab which selects an existing tab or creates a new one
- Has proper dependency array including handleOpenFileTab
Modified handleMainPanelFileClick to use the new file tab system
instead of the legacy preview overlay:
- Now calls handleOpenFileTab instead of setPreviewFile
- Fetches file content and stat in parallel for efficiency
- Provides lastModified timestamp for file tabs
- Removes legacy filePreviewHistory updates (tabs handle navigation)
Flow: TerminalOutput → MarkdownRenderer → MainPanel → handleOpenFileTab
Updated handleFileClick in useAppHandlers.ts to use the new tab-based
file preview system. When onOpenFileTab callback is provided, file clicks
now open tabs instead of using the legacy setPreviewFile overlay.
Changes:
- Added FileTabInfo interface and onOpenFileTab optional callback to
UseAppHandlersDeps
- Modified handleFileClick to fetch file stat for lastModified timestamp
- handleFileClick now calls onOpenFileTab when provided, falling back to
legacy setPreviewFile behavior otherwise
- Moved handleOpenFileTab definition in App.tsx to before useAppHandlers
call and wired it as the onOpenFileTab callback
Added 17 new tests for keyboard shortcuts working with unified tab order:
- Cmd+W: Tests file tab closing when active, AI tab closing when no
file tab active, and last AI tab protection
- Cmd+Shift+[/]: Tests navigation through unified tab order including
file tabs, with showUnreadOnly filter support
- Cmd+1-9: Tests jumping to specific positions in unified tab order,
including file tabs, and showUnreadOnly filter blocking
- Cmd+0: Tests jumping to last tab in unified order
- Cmd+Shift+T: Tests reopening from unified closed tab history
- Tests tab shortcuts are disabled in group chat and terminal mode
All 36 tests in useMainKeyboardHandler.test.ts pass (was 19).
Updated TabSwitcherModal to display both AI and file preview tabs:
- Added fileTabs, activeFileTabId, and onFileTabSelect props
- File tabs show in "Open Tabs" mode with AI tabs, sorted alphabetically
- Each file tab displays: filename, extension badge with type-specific
coloring, file path, "File" indicator, active/unsaved indicators
- Search works across file names, extensions, and paths
- Updated AppModals and App.tsx to pass file tabs and handlers
- Added 9 new tests (total 85 tests pass)
- Create navigateToNextUnifiedTab() and navigateToPrevUnifiedTab() functions
that cycle through unifiedTabOrder (both AI and file tabs)
- Update keyboard handler to use new unified navigation functions
- Support showUnreadOnly filter (AI tabs filtered, file tabs always navigable)
- Add comprehensive test coverage (20 new tests)
Add unified closed tab history system that tracks both AI and file
preview tabs, enabling Cmd+Shift+T to restore any recently closed tab:
- Add ClosedTabEntry discriminated union type for AI/file tabs
- Add unifiedClosedTabHistory to Session (runtime-only, not persisted)
- Add closeFileTab() function with unified history support
- Add addAiTabToUnifiedHistory() for AI tab close tracking
- Add reopenUnifiedClosedTab() with duplicate detection for both types
- Update closeTab() to also update unifiedTabOrder
- Update forceCloseFileTab() to use helper and add to history
- Update performTabClose() to track AI tabs in unified history
- Add comprehensive test coverage (12 new tests)
Update keyboard shortcuts to navigate through unified tab order
(both AI and file tabs) instead of just AI tabs:
- Add navigateToUnifiedTabByIndex() for Cmd+1-9 tab jumping
- Add navigateToLastUnifiedTab() for Cmd+0 (last tab)
- Functions handle AI tabs (clear activeFileTabId) and file tabs
(preserve activeTabId for easy switching back)
- Update useMainKeyboardHandler to use new unified functions
- Add comprehensive test coverage (18 new tests)
- Add initialSearchQuery and onSearchQueryChange props to FilePreview
- Auto-open search panel when initialSearchQuery is provided and non-empty
- Add handleFileTabSearchQueryChange handler in App.tsx
- Wire search state through useMainPanelProps and MainPanel
- Add 4 tests for search state persistence in FilePreview.test.tsx
- Added initialScrollTop and onScrollPositionChange props to FilePreview
- Implemented throttled scroll position reporting (200ms) in content scroll handler
- Added scroll position restoration with requestAnimationFrame for DOM readiness
- Created handleFileTabScrollPositionChange handler in App.tsx
- Wired handler through useMainPanelProps to MainPanel
- Added 4 tests for scroll position persistence behavior
- Renamed handleCloseFileTab to forceCloseFileTab (performs unconditional close)
- Added new handleCloseFileTab wrapper that checks for unsaved changes
- When tab.editContent !== undefined, shows confirmation modal before closing
- Uses existing showConfirmation pattern with setConfirmModal* state
- Modal displays: "<filename>" has unsaved changes. Are you sure you want to close it?
- On confirm, calls forceCloseFileTab to perform actual close
- Add `lastModified: number` field to FilePreviewTab interface to track
when content was loaded from disk
- Add `fileTabAutoRefreshEnabled` setting (default: disabled) to control
whether file tabs auto-refresh when switched to
- Update handleOpenFileTab to accept and store lastModified
- Update handleOpenFileTabAsync to fetch file stat and set lastModified
from the file's actual modification time
- Modify handleSelectFileTab to check if file changed on disk when
auto-refresh is enabled:
- Compares current file mtime with stored lastModified
- Refreshes content if file was modified since last load
- Skips refresh if tab has unsaved edits to prevent data loss
- Update all FilePreviewTab test fixtures with lastModified field
- Fix MainPanel to use activeFileTab.content as source (was using empty editContent)
- Add sshRemoteId and isLoading fields to FilePreviewTab interface
- Update handleOpenFileTab to accept optional sshRemoteId parameter
- Add handleOpenFileTabAsync for SSH files with async loading:
- Creates tab immediately with loading state
- Fetches content asynchronously
- Updates tab when content loaded (or removes on error)
- Add loading state UI in MainPanel for file tabs
- Add tests for file tab content storage and SSH loading support
This enables proper file content management for the unified tab system,
with support for SSH remote files that need async loading.
Store file content directly on FilePreviewTab (Option A) for simplicity.
File previews are typically small, and we already store larger AI logs.
Updated handleOpenFileTab to populate content when opening file tabs.
Connect FilePreviewTab rendering to the unified tab system:
- Add unified tab props to MainPanel (unifiedTabs, activeFileTabId, etc.)
- Remove !previewFile condition so TabBar always renders in AI mode
- Update content area to prioritize activeFileTabId over legacy previewFile
- Add showCloseButton prop to FilePreview (false when rendered as tab)
- Add activeFileTab computation in App.tsx
- Connect handlers through useMainPanelProps hook
- Verified FileTab's handleMouseDown correctly handles button === 1 (middle-click)
- Added test: left-click does NOT close file tab
- Added test: right-click does NOT close file tab
- Added test: middle-click on AI tab still works in unified mode
- All 115 TabBar tests pass
Verify that both AI tabs and file tabs use identical active indicator
styling (bright background connecting to content area). The visual
difference is correctly the extension badge, not the active state.
Added 3 tests:
- applies same active styling to both AI tabs and file tabs
- applies same inactive styling to both AI tabs and file tabs
- file tab displays extension badge with file extension text
Add 12 comprehensive tests for unified tabs drag-and-drop reordering:
- AI tab to file tab drag-and-drop calls onUnifiedTabReorder
- File tab to AI tab drag-and-drop calls onUnifiedTabReorder
- File tab to file tab drag-and-drop works correctly
- Dropping on same tab does not trigger reorder
- Drag over visual feedback (ring-2 class) on target tab
- Falls back to legacy onTabReorder when unifiedTabs not provided
- Move to First/Last shown for file tabs not at edges
- Move to First hidden for first tab
- Move to Last hidden for last tab
- Move to First click calls onUnifiedTabReorder
- Move to Last click calls onUnifiedTabReorder
- Middle-click closes file tabs
Implements file-specific overlay menu for FileTab component:
- Add shell:showItemInFolder IPC handler for "Reveal in Finder" action
- Add showItemInFolder to shell preload API and global.d.ts types
- Extend FileTabProps with position and close action callbacks
- Implement full overlay menu with file actions:
- Copy File Path/Name to clipboard
- Open in Default App via file:// URL
- Reveal in Finder via new showItemInFolder API
- Move to First/Last Position
- Close Tab/Other/Left/Right actions
- Add 10 tests for file tab overlay menu
- Add 3 tests for shell:showItemInFolder handler
- Add displayedUnifiedTabs computed value with unread filter support
- Update render loop to conditionally render from unified tabs when provided
- Check unified tab type to render either Tab (AI) or FileTab (file)
- Update handleDrop, handleMoveToFirst, handleMoveToLast for unified tabs
- Update overflow check and empty state to consider unified tabs
- Maintain backwards compatibility with legacy AI-only tab rendering
Verified that the FileTab extension badge implementation is complete:
- Positioned after filename
- 10px font size (text-[10px])
- Rounded corners (rounded class)
- Color-coding by file type via getExtensionColor() helper
- Tests to be added after Task 4 (unified tab rendering) is complete
- Create FileTabProps interface with file tab specific props
- Implement FileTab memoized component with:
- Filename without extension as label
- Color-coded extension badge (blue for TS/JS, green for MD, etc.)
- Unsaved edits indicator (pencil icon)
- Middle-click to close support
- Drag and drop handlers
- Same active/inactive styling as AI tabs
- Add getExtensionColor() helper for extension badge coloring
- Add UnifiedTab discriminated union type to types/index.ts
- Add new props to TabBarProps: unifiedTabs, activeFileTabId,
onFileTabSelect, onFileTabClose
- Props are optional for backwards compatibility during transition
- Phase 3 of file preview tabs implementation
Implements handleCloseCurrentTab that:
- Determines which tab is active (file tab via activeFileTabId first, then AI tab via activeTabId)
- Closes file tabs immediately without wizard confirmation
- For AI tabs, returns info to allow keyboard handler to show wizard confirmation
- Prevents closing the last AI tab (keeps at least one AI tab)
Updated keyboard handler (Cmd+W) to use handleCloseCurrentTab for unified tab support.
Updated handleCloseOtherTabs, handleCloseTabsLeft, and handleCloseTabsRight
to support both AI and file preview tabs based on unifiedTabOrder position:
- Determine active tab from activeFileTabId or activeTabId
- Use unifiedTabOrder to determine which tabs are left/right/other
- Close AI tabs using closeTab helper (with wizard history handling)
- Close file tabs by removing from filePreviewTabs and unifiedTabOrder
Implements unified tab reorder functionality that operates on the
unifiedTabOrder array, allowing both AI and file preview tabs to be
reordered relative to each other. This supplements the existing
handleTabReorder (AI-only) for the unified tab system.
Changes:
- Added handleUnifiedTabReorder in App.tsx with index validation
- Propagated through useMainPanelProps.ts, MainPanel.tsx, TabBar.tsx
Modify setActiveTab function to deselect any active file preview tab
when an AI tab is selected. This ensures only one tab type (AI or file)
is active at a time. Updated early-return condition to also check if
activeFileTabId is null before returning unchanged session.
Adds handleSelectFileTab handler that sets the activeFileTabId to select a file preview tab. The activeTabId is preserved (not nullified) following the established pattern from handleOpenFileTab, which tracks the last active AI tab for when the user switches back.
Implements the handler to open file preview tabs in the unified tab system:
- Checks if a tab with the same file path already exists and selects it
- Creates new FilePreviewTab with proper extension parsing
- Adds tab to both filePreviewTabs and unifiedTabOrder arrays
- Sets activeFileTabId to activate the new file tab
Creates a memoized unifiedTabs array that combines aiTabs and
filePreviewTabs according to the session's unifiedTabOrder. Uses
a discriminated union type to allow components to render the
appropriate content for each tab type (AI or file preview).
Phase 1 of file preview tabs feature:
- Add FilePreviewTab interface with id, path, name, extension, scrollTop,
searchQuery, editMode, editContent, and createdAt fields
- Add UnifiedTabRef type for tab ordering across types
- Add filePreviewTabs, activeFileTabId, and unifiedTabOrder to Session
- Update all 13 session creation locations with new fields
- Update session restoration to hydrate new fields from persistence
This establishes the data model for coexisting AI tabs, file preview tabs,
and future terminal tabs in a unified tab bar.
The jumpToBottom keyboard shortcut was using scrollIntoView() which fails
in nested scroll containers. Changed to use scrollTo() on the parent
scroll container, matching the working New Message Indicator button.
Fixes#155
Changed IssueCard from <button disabled> to <div role="button"> to allow
nested PR link button to receive click events. Disabled buttons block all
pointer events on children, even with pointerEvents: 'auto' style.
- Outer container is now a div with role="button" and manual keyboard handling
- PR link is now a proper <button> that can receive clicks independently
- Maintains same visual styling (opacity-60 for unavailable issues)
- Keyboard navigation preserved via tabIndex and onKeyDown
- Moderator @mentions now normalize names (spaces→hyphens) for reliability 🧭
- Participant and available-session lists now show mention-ready normalized handles 👥
- Header responsiveness tuned for AUTO mode’s extra button width 📐
- Session name now hides on ultra-narrow panels to save space 🪟
- Git branch icon won’t shrink; branch text truncates cleanly ✂️
- Symphony issue PR link upgraded from span to proper button 🧷
- PR link click handling simplified; keyboard hacks removed for cleaner UX ⌨️
- Batch TTS settings now use refs to avoid stale closures mid-run 🎙️
- Audio feedback toggles take effect immediately during batch processing ⚡
- Batch processor deps slimmed since audio settings are ref-driven 🧼
- Add isGeneratingName property to AITab interface
- Show Loader2 spinner in tab while name generation is in progress
- Set isGeneratingName true before API call, false on completion/error
- Spinner only shows when automatic tab naming is enabled
Moved additional visual/output settings from General to Display:
- Interface font family and size
- Terminal width (columns)
- System log level and max buffer
Updated tests and docs to reflect new Display tab location.
When closing the Auto Run Configuration modal, show a confirmation
dialog if there are unsaved changes to:
- Document list (documents added or removed)
- Loop settings (enabled/disabled, max loops)
- Agent prompt (edited from initial value)
If no changes were made, the modal closes immediately without
confirmation.
This prevents accidental loss of configuration when users press
Escape, click Cancel, or click the X button.
Add comprehensive test suite to verify modal priority ordering:
- Child modals must have higher priority than parents (30 test cases)
- Ensures DocumentSelectorModal closes before BatchRunner
- Ensures MarketplaceModal closes before BatchRunner/AutoRunExpanded
- Verifies confirmation dialogs are 1000+, overlays are lower priority
- Tests priority ranges match documented conventions
These tests will catch future regressions where child modals have
incorrect priorities, causing Escape to close parent modals first.
Split General settings panel by creating new Display tab containing:
- Max output lines per response
- Document graph settings (external links, max nodes)
- Context window warnings (thresholds)
Updated docs to reflect new panel location.