Skip to content

feat(sidebar): File Diff section, diff viewer, and git graph fix#19

Merged
iptoux merged 3 commits into
mainfrom
feat/sidebar-file-diff-section
May 23, 2026
Merged

feat(sidebar): File Diff section, diff viewer, and git graph fix#19
iptoux merged 3 commits into
mainfrom
feat/sidebar-file-diff-section

Conversation

@iptoux
Copy link
Copy Markdown
Contributor

@iptoux iptoux commented May 23, 2026

Summary

  • Adds a File Diff sidebar section between Project Files and Git Commits: lists changed files with status markers and +/- line counts, stage/unstage actions, and auto-refresh via a debounced filesystem watcher (git_status_dirty).
  • Opens an inline diff viewer as a center tab (CenterTabKind::FileDiff) for the selected file (staged or unstaged).
  • Refactors the sidebar panels area to a three-slot layout (Explorer / Diff / Graph) with a second resizer and persisted height.
  • Git Commits now auto-refreshes on the same dirty event (shared watcher).
  • Fixes git log --graph failing because -c log.graphWidth=… was passed as one argv token instead of -c + log.graphWidth=… (symptom: “Could not load commit history” while File Diff showed a clean tree).

Test plan

  • Open a workspace on a Git repo; confirm File Diff lists changes and refreshes after edits (without manual refresh).
  • Click a changed file → diff tab opens with correct +/- highlighting.
  • Stage/unstage from row hover actions; list updates after action.
  • Git Commits loads history and refreshes after a commit or checkout.
  • Resize Explorer / Diff / Graph panels; reload app and confirm heights persist.
  • Workspace without Git: Diff + Graph sections hidden.

Made with Cursor

iptoux and others added 3 commits May 23, 2026 11:29
Added a new file diff section to the sidebar, allowing users to view changes in files. Introduced new components for handling file diffs, including CSS for styling. Updated the workspace state to manage the visibility of the file diff section and integrated it with the existing sidebar functionality. Enhanced internationalization support by adding relevant keys for file diff actions and messages in multiple languages.
…graph_entries function

Updated the argument formatting in the fetch_graph_entries function to ensure proper execution of the git command. This change improves the clarity and correctness of the command being constructed, enhancing the functionality of the git graph feature.
Co-authored-by: Cursor <cursoragent@cursor.com>
@iptoux iptoux added bugfix Fixed Bug enhancement New feature or request labels May 23, 2026
@iptoux iptoux self-assigned this May 23, 2026
@iptoux iptoux merged commit 2f115b1 into main May 23, 2026
1 check passed
@iptoux iptoux deleted the feat/sidebar-file-diff-section branch May 27, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixed Bug enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant