feat: split terminal panel with Ctrl+T toggle#233
feat: split terminal panel with Ctrl+T toggle#233yashas-salankimatt wants to merge 18 commits intomarcus:mainfrom
Conversation
Add a third diff view mode (full-file side-by-side) alongside unified and split views. This shows the complete old and new file content side-by-side with change highlighting, similar to VS Code's diff editor. - Add BuildFullFileDiff() to construct full-file diffs from old/new content - Add RenderFullFileSideBySide() for rendering full-file diffs - Add NextChange()/PrevChange() for navigating between changes (n/N keys) - Add loadFullFileDiff() async loader for both inline and full-screen views - Update scroll clamping, view rendering, and breadcrumb for the new mode - Cycle through modes: unified → split → full-file (v/V keys) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the single scrollable diff view with a two-pane hierarchical layout
matching the git plugin's interaction model:
- Left pane: file list with status icons (+/-) and commits section
- Right pane: per-file diff viewer with unified/split/full-file modes
- j/k navigate files, l/enter drills into diff, h/esc goes back
- Commit hover shows file list preview in right pane
- Commit drill-down: left=file list with commit info, right=file diff
- v/V cycles view modes, n/N jumps between changes, {/} jumps files
- Default split ~25% file list, ~75% diff viewer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Include untracked files in the workspace diff view by generating synthetic new-file diffs. Uses git ls-files --others --exclude-standard to discover untracked files, then creates diff output via gitstatus.GetNewFileDiff() so they appear alongside tracked file changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow drag-to-resize the file list vs diff viewer split in the diff tab. The width is saved to state.json and restored across sessions. - Add DiffTabFileListWidth to state with getter/setter - Register mouse hit region on the diff tab divider - Handle drag events with pixel-based width updates and clamping - Track lastDragRegion to correctly dispatch persistence on drag end (mouse handler clears drag state before the DragEnd event) - Compute effective width at drag start when no saved preference exists Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the diff tab content width is below 120 columns, switch from the two-pane side-by-side layout to a single-pane hierarchical view. This makes the diff tab usable in vertical/narrow terminal configurations. Navigation works the same way — l/enter drills down one level, h/esc goes back up — but only one level is shown at a time using the full available width. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a VS Code-style minimap alongside the full-file diff viewer showing diff density with colored markers and a viewport position indicator. Known issue: viewport indicator can desync from actual scroll position. - Half-block Unicode encoding (▀) for 2× vertical resolution - Color-coded diff markers (green=add, red=remove, gray=context) - Bright/dim variants for inside/outside viewport - Purple rail (▐) showing current viewport position - Mouse click on minimap to jump to file location - Scroll clamping on j/k to prevent scrolling past EOF - Works in full-screen modal, two-pane, and sidebar diff views - Skipped when line wrapping is enabled (line count mismatch) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ormulas G key, ctrl+d, and full-file-diff-loaded handlers used (height-2) for maxScroll while clampDiffScroll used (height-4), allowing scroll 2 lines past the true maximum. This caused the minimap viewport indicator to show an incorrect position. Replace all inline maxScroll calculations with calls to the centralized clamp functions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e scroll clamping - Replace ▐ rail with half-block characters (▀/▄/█) that encode per-slot viewport membership, eliminating the visual desync between the rail and the bright/dim boundary of the map cells - Replace all remaining inline maxScroll calculations in mouse.go and plugin.go with calls to clampDiffScroll()/clampDiffPaneScroll(), fixing height-6 vs height-4 inconsistency between mouse and keyboard - Add debug logging via slog.Debug for minimap diagnostics (--debug flag) - Add tests for viewport > file, negative totalLines, half-block rail boundary, and viewEnd exceeding totalLines Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…to full width Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
These three PRs were developed together and should be merged in order:
Together they represent a large bump to sidecar's diff viewing, agent output inspection, and workspace management capabilities. |
…ommitStatusHeader) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8109c5b to
f1a0170
Compare
…iles in workspace stats - GetCommitDetail now runs --name-status alongside --numstat to get actual file statuses (Added, Deleted, Renamed, etc.) instead of defaulting everything to Modified - Workspace getDiffStats now counts lines in untracked files as additions, matching what git would show if they were staged Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
62e56bf to
02c26b2
Compare
…r diff from commit preview - Fix h/l scrolling in full-screen diff view: clampDiffHorizScroll was using side-by-side parsedDiff metrics in full-file mode, clamping the offset back to 0 immediately. Now skips side-by-side clamp in full-file mode. - Same fix for inline diff pane clampDiffPaneHorizScroll. - Add l/right as aliases for enter/d in commit preview file list to enter the diff view, matching workspace plugin navigation conventions. - h at offset 0 in inline diff pane now returns focus to sidebar. - h at offset 0 in full-screen diff exits back to previous view. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a persistent terminal panel that splits the workspace preview pane, allowing side-by-side agent/shell output and an independent terminal. - Ctrl+T toggles panel visibility, Alt+T switches bottom/right layout - Adaptive polling mirrors agent pane performance (active/idle/unfocus intervals) - Interactive mode with seamless click-to-switch between panes - Mouse drag to resize the split, state persisted across sessions - Session restoration on restart via worktree-aware tmux sessions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
02c26b2 to
3735bdb
Compare
|
Thanks @yashas-salankimatt! This is great work — the terminal panel, full-file diff view, git sidebar enhancements, and minimap are all features I want to land. The challenge: several PRs from this batch have now been merged (#234, #235, #236, plus #237 from @EugeneOsipenko), and they share overlapping files with this branch. Main has diverged significantly. PR #232 is the superset of this branch with more commits on top. I'd like to land all of it, but it needs a rebase first. Request: Could you rebase #232 on current If you run into trouble with the rebase, let me know and I can help resolve specific conflicts. Thank you for all this work! 🪡 |
|
Thanks @yashas-salankimatt! This PR's changes (split terminal panel with Ctrl+T toggle) were included in #232 which we just merged. Closing this one as covered — all the terminal panel work is live on main. 🎉 |


Summary
Key Changes
terminal_panel.gowith full tmux session management, rendering, and resize logicTest plan
🤖 Generated with Claude Code