Skip to content

Conversation

@malore350
Copy link
Contributor

Pull Request

Revamped the git interface with advanced stashing capabilities and layout improvements for better file management workflow.

Changes Made

Git Stashing System:

  • Implemented comprehensive stashing system with a dedicated panel
  • Added granular file-level control within stashes
  • Users can now view, apply, and drop individual stashes with precision
    Changes View Redesign:
  • Split changes view into 'Stashed Changes' and 'Unstaged Changes' sections
  • Mirrors VS Code's intuitive staging workflow
  • Improves clarity between staged and unstaged modifications
    UI/UX Improvements:
  • Added dynamic panel resizing for flexible workspace customization
  • Reordered panels: Status → History → Stashes for logical flow
  • Introduced 'Unstage All' and 'Stash All Unstaged' quick actions for efficiency
    Bug Fixes:
  • Fixed external git operation consistency by broadcasting file watcher events globally
  • Ensures all git operations (commit, push, pull, checkout) properly sync across the application

Motivation

This enhancement improves the daily git workflow by providing more control over file staging and stash management, matching the UX patterns developers expect from modern IDEs.

Testing

  • Verified stashing operations create, apply, and drop stashes correctly
  • Confirmed file watcher events propagate globally after external git operations
  • Validated responsive panel resizing works across different window sizes

Closes #157

- Implement comprehensive stashing system with dedicated panel and granular file control
- Split changes view into 'Staged Changes' and 'Changes' sections matching VS Code style
- Add dynamic panel resizing and reorder to Status -> History -> Stashes
- Fix external git operation consistency by broadcasting file watcher events globally
- Add 'Unstage All' and 'Stash All Unstaged' quick actions
Copilot AI review requested due to automatic review settings January 16, 2026 08:38
@malore350 malore350 changed the title Bump version to 0.3.2 Revamped Git Interface Jan 16, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a comprehensive git stashing system with a dedicated panel interface, redesigns the changes view with staged/unstaged separation, and improves global file watcher event propagation for git operations. The version has been bumped to 0.3.2, matching an existing CHANGELOG entry.

Changes:

  • Added dedicated stash panel with apply/pop/drop operations integrated into the git view
  • Split status panel into collapsible "Staged Changes" and "Changes" sections with file-level stashing
  • Enhanced git store to fetch and manage stash state, with automatic stash refresh on git operations
  • Broadcast file watcher events globally to ensure git operations sync across the application

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/features/version-control/git/controllers/store.ts Added stashes state management and fetching logic to git store
src/features/version-control/git/controllers/git.ts Extended createStash function to support file-specific stashing
src/features/version-control/git/components/view.tsx Integrated GitStashPanel into main view and removed modal-based stash manager
src/features/version-control/git/components/status-panel.tsx Redesigned with collapsible staged/unstaged sections and stash functionality
src/features/version-control/git/components/stash-panel.tsx New collapsible panel displaying stashes with apply/pop/drop actions
src/features/version-control/git/components/stash-message-modal.tsx New modal for capturing stash messages
src/features/version-control/git/components/file-item.tsx Added stash button to unstaged file actions
src/features/version-control/git/components/commit-history.tsx Made history panel resizable and changed default collapsed state
src/features/version-control/git/components/actions-menu.tsx Removed "Manage Stashes" menu item
src/features/file-system/controllers/file-watcher-store.ts Added global file-external-change event dispatch
src-tauri/src/commands/vcs/git/stash.rs Added file list parameter support for selective stashing
Comments suppressed due to low confidence (1)

src/features/version-control/git/components/status-panel.tsx:42

  • The _STATUS_LABELS constant is no longer used after the status panel redesign removed the status group headers. This unused code should be removed to reduce maintenance burden.
const _STATUS_LABELS: Record<StatusGroup, string> = {
  added: "Added",
  modified: "Modified",
  deleted: "Deleted",
  renamed: "Renamed",
  untracked: "Untracked",
};

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const GitCommitHistory = ({ onViewCommitDiff, repoPath }: GitCommitHistoryProps) => {
const { commits, hasMoreCommits, isLoadingMoreCommits, actions } = useGitStore();
const [isCollapsed, setIsCollapsed] = useState(true);
const [isCollapsed, setIsCollapsed] = useState(false);
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the default collapsed state from true to false for the commit history panel is a UX change that should be documented in the PR description. This affects the initial view state for all users.

Suggested change
const [isCollapsed, setIsCollapsed] = useState(false);
const [isCollapsed, setIsCollapsed] = useState(true);

Copilot uses AI. Check for mistakes.
@mehmetozguldev mehmetozguldev self-requested a review January 16, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show staged and unstaged hunks with different visual styles in diff viewer

1 participant