Skip to content

Add staged/unstaged sections and file actions to Git diff panel#90

Merged
Dimillian merged 2 commits intomainfrom
codex/update-git-diff-sidebar-features
Jan 18, 2026
Merged

Add staged/unstaged sections and file actions to Git diff panel#90
Dimillian merged 2 commits intomainfrom
codex/update-git-diff-sidebar-features

Conversation

@Dimillian
Copy link
Owner

Motivation

  • Improve the Git diff sidebar to clearly separate staged and unstaged changes and allow quick file-level actions (stage/unstage/revert) from the UI.
  • Surface index vs worktree status so users can operate on files without leaving the app.

Description

  • Backend: split Git status into files, stagedFiles, and unstagedFiles, added helper run_git_command, and implemented Tauri commands stage_git_file, unstage_git_file, and revert_git_file in src-tauri/src/git.rs and exported them in src-tauri/src/lib.rs.
  • Service layer: added wrappers stageGitFile, unstageGitFile, and revertGitFile in src/services/tauri.ts and extended getGitStatus return type to include stagedFiles/unstagedFiles.
  • UI: updated the Git panel to render separate "Staged" and "Unstaged" sections with counts and per-file context menus that expose "Stage file", "Unstage file", and "Revert changes" actions in src/features/git/components/GitDiffPanel.tsx; added handlers wired through src/App.tsx and the layout hook useLayoutNodes.
  • Styling: added section header and list styles in src/styles/diff.css for the new sections.

Testing

  • Ran npm run lint (ESLint completed; warning about unsupported TypeScript version from @typescript-eslint was shown but no errors). — succeeded
  • Ran npm run typecheck (tsc --noEmit) — succeeded
  • Started the dev server with npm run dev and captured a UI screenshot of the Git diff panel to verify staged/unstaged sections and menus — succeeded

Codex Task

@Dimillian Dimillian merged commit 827739f into main Jan 18, 2026
2 checks passed
gersmann pushed a commit to gersmann/codex-monitor-web that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant