Skip to content

[Feature]: Complete git system in Source Control panel #47

@matiaspalmac

Description

@matiaspalmac

Describe the feature

The Source Control panel currently supports: status, branches list, stage/unstage, commit, push, diff and init. Missing common operations push users to drop to a terminal.

This feature completes the everyday git toolkit inside the panel:

Branches

  • Wire checkout on the branch dropdown (currently the list renders but does nothing on click).
  • Create branch by wiring the existing + button (git checkout -b <name>).
  • Merge a selected branch into the current one, with confirmation.
  • Detached HEAD label (no SHA resolution — the explicit label covers the case).
  • Filter input for branch dropdown when there are many branches.

Remote

  • Pull (with rebase option) and Fetch icon buttons in the panel header.
  • Push automatically falls back to --set-upstream origin <branch> on first push of a new branch.

Commit

  • Amend last commit via a dropdown on the commit button.
  • Larger, resizable commit message textarea.
  • Commit disabled while there are unresolved merge conflicts, with a clear banner.

History / log

  • Collapsible history section showing the last N commits.
  • Per-commit actions: reset --soft, reset --mixed (confirmed), reset --hard (confirmed), revert (confirmed).
  • Load more (+30) pagination.
  • Relative time labels localized in EN/ES.

Stash

  • Collapsible stash section.
  • Save with optional message, per-entry pop / apply / drop (drop confirmed).

Files

  • Click a staged / unstaged file to open a side-by-side-style diff viewer with syntax-colored + / - / @@ lines.
  • Discard (restore) an unstaged change, with confirmation.

Polish

  • Detached HEAD pill badge, check mark on current branch, count badges on collapsible sections, conflict banner, localized refresh tooltip, cleaned-up feedback toast.

Hardening

  • Normalizes the get_git_branches payload so a non-array response no longer crashes the panel (fixes the crash tracked in a separate bug).
  • Polling guard so the 5s refresh does not race with an in-flight user action.
  • Cleanup of the feedback toast timeout on unmount.

Out of scope (to be handled in separate issues if needed):

  • Branch deletion.
  • Resolving detached HEAD to a commit/tag via git rev-parse --short HEAD — the explicit label covers the case.

Would you like to implement this feature yourself by sending a PR?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions