Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- **Sidebar File Diff section + center diff viewer**: new collapsible **File Diff** panel sits between Project Files and Git Commits in the sidebar. Backend module `src-tauri/src/git_status.rs` exposes `git_status_changes` (`git status --porcelain=v1 -z` + merged `--numstat` for staged/unstaged, untracked line counts via file read), `git_file_diff` (unified diff, synthetic `+++` body for untracked files), `git_stage_file` / `git_unstage_file`, and `git_status_watch_start` / `git_status_watch_stop` — a `notify`-based recursive watcher on the work tree (debounced 300 ms) emits `git_status_dirty` via Tauri so the UI refreshes without manual polling. `ChangedFile` rows show a status marker (`M`/`A`/`D`/`R`/`?`/`C`), path, and `+N`/`-N` counts; hover reveals **stage** (`+`) and **unstage** (`−`) actions. Clicking a row opens (or focuses) a `CenterTabKind::FileDiff { rel_path, staged }` tab with an inline diff viewer (`src/workbench/file_diff/`) that classifies lines (`@@` hunk headers, `+`/`-`/`---`/`+++`). Frontend bridge mirrors all types and adds `listen_git_status_dirty` with an RAII `TauriEventListener`. Per-workspace `sidebar_diff_open` (default **open**) persists expand/collapse; `open_center_diff_tab` deduplicates tabs per path. Sidebar panels block is now a **three-slot** layout (Explorer → Diff → Graph) with two `SidebarResizer` handles and `SIDEBAR_DIFF_HEIGHT_PCT_*` in `localStorage`. 18 new `SbDiff*` i18n keys in all 13 locales. Component CSS in `file_diff_section/file-diff-section.css` and `file_diff/file-diff.css` (theme tokens only).

### Changed

- **Git Commits auto-refresh**: `GitGraphSection` now listens to the same `git_status_dirty` event (400 ms debounced reload) so the commit graph updates when the index or working tree changes, without a manual refresh.

### Fixed

- **Git commit graph `git log` invocation**: `fetch_graph_entries` passed `-c log.graphWidth=14` as a single argv token, which Git rejects (`unknown option: -c log.graphWidth=14`) and surfaced in the UI as "Could not load commit history." even though the repository was detected and File Diff worked. Split into `-c` + `log.graphWidth=14` as separate arguments.

### Removed


Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
<link data-trunk rel="css" href="src/workbench/agent_panel/turn_metrics_bar/turn_metrics_bar.css" />
<link data-trunk rel="css" href="src/workbench/appearance_settings_pane/appearance_settings_pane.css" />
<link data-trunk rel="css" href="src/workbench/sidebar_resizer/sidebar-resizer.css" />
<link data-trunk rel="css" href="src/workbench/file_diff_section/file-diff-section.css" />
<link data-trunk rel="css" href="src/workbench/file_diff/file-diff.css" />
<link data-trunk rel="copy-dir" href="public" />
<link
rel="stylesheet"
Expand Down
1 change: 1 addition & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ hound = "3.5"
uuid = { version = "1", features = ["v4"] }
tauri-plugin-updater = "2"
tauri-plugin-process = "2"
notify = "6"
3 changes: 2 additions & 1 deletion src-tauri/src/git_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ fn fetch_graph_entries(work_tree: &Path, limit: u32) -> Result<GitGraphLayout, S
let out = Command::new("git")
.arg("-C")
.arg(work_tree)
.arg(format!("-c log.graphWidth={GRAPH_WIDTH}"))
.arg("-c")
.arg(format!("log.graphWidth={GRAPH_WIDTH}"))
.args([
"log",
"--graph",
Expand Down
Loading
Loading