Skip to content
Open
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
689a8bd
Add interactive TUI mode with file tree side panel
armanarutiunov Feb 11, 2026
4d11f97
Add per-file addition/deletion line counts
armanarutiunov Feb 11, 2026
c434705
Add dir, border-focused, additions, deletions theme colors
armanarutiunov Feb 11, 2026
0575e48
Rewrite file tree as nested expandable tree with file icons and +N -M…
armanarutiunov Feb 11, 2026
92ae324
Add focus border indicator, ctrl+d/u half-page scroll, update sync fo…
armanarutiunov Feb 11, 2026
53d1685
Match folder color to file name header, darken tree background
armanarutiunov Feb 11, 2026
e5aed4e
Add git staging status detection with green/orange file coloring
armanarutiunov Feb 11, 2026
2cc4e2a
Add staged/partial-staged/file-selected theme colors, fix span ordering
armanarutiunov Feb 11, 2026
4096f5d
Use background-only selection for files, keep inverse for dirs
armanarutiunov Feb 11, 2026
c06368d
Fix dead ternary in FileTreePanel, use execFileSync in gitStatus
armanarutiunov Feb 12, 2026
9a533ca
Deduplicate side-by-side diff parser into single iterSideBySideDiffEv…
armanarutiunov Feb 12, 2026
6eb9fa7
Add Windows fallback for interactive mode, deduplicate TREE_WIDTH/BOR…
armanarutiunov Feb 12, 2026
df4fa57
Fix stale rendering artifacts with ERASE_TO_EOL and screen clear
armanarutiunov Feb 12, 2026
4086e02
Add 'e' key tree toggle and dynamic diff re-render on terminal resize
armanarutiunov Feb 12, 2026
a608033
Fix ttyFd leak, remove dead params, restore comments, export helpers
armanarutiunov Feb 12, 2026
211ffe4
Add unit tests for TUI helpers
armanarutiunov Feb 12, 2026
0be5f85
Make tree width configurable via split-diffs.tree-width
armanarutiunov Feb 12, 2026
6f29eee
Add 'f' key to toggle flat/folder file tree mode
armanarutiunov Mar 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use background-only selection for files, keep inverse for dirs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  • Loading branch information
armanarutiunov and claude committed Feb 11, 2026
commit 4096f5d0cbc9d459dd72652a24bdac5aacff5989
30 changes: 25 additions & 5 deletions src/tui/FileTreePanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ export class FileTreePanel {
FILE_TREE_DIR_COLOR,
FILE_TREE_ADDITIONS_COLOR,
FILE_TREE_DELETIONS_COLOR,
FILE_TREE_FILE_SELECTED_COLOR,
FILE_TREE_STAGED_COLOR,
FILE_TREE_PARTIAL_STAGED_COLOR,
} = this.context;

for (let row = 0; row < this.height; row++) {
Expand Down Expand Up @@ -362,13 +365,26 @@ export class FileTreePanel {

const line = T()
.appendString(fullText)
.fillWidth(this.width, ' ')
.addSpan(0, this.width, FILE_TREE_COLOR);
.fillWidth(this.width, ' ');

// Specific spans first (first-added wins in reduceThemeColors)
const staging = vn.node.file.stagingStatus;
if (staging === 'staged') {
line.addSpan(
prefix.length,
prefix.length + name.length,
FILE_TREE_STAGED_COLOR
);
} else if (staging === 'partial') {
line.addSpan(
prefix.length,
prefix.length + name.length,
FILE_TREE_PARTIAL_STAGED_COLOR
);
}

// Color the stat portion
if (stat) {
const statStart = this.width - suffix.length + 1;
// Color additions part
if (adds > 0) {
const addStr = `+${adds}`;
const addStart = statStart;
Expand All @@ -389,10 +405,14 @@ export class FileTreePanel {
}
}

// Selected bg before generic base so it wins the bg merge
if (isSelected) {
line.addSpan(0, this.width, FILE_TREE_SELECTED_COLOR);
line.addSpan(0, this.width, FILE_TREE_FILE_SELECTED_COLOR);
}

// Generic base color last (fallback for unspanned regions)
line.addSpan(0, this.width, FILE_TREE_COLOR);

screen.writeAt(
screenRow,
startCol,
Expand Down