Skip to content

[Feature]: Add a refresh button to the git branch list #2926

Description

@ji233-Sun

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I am describing a concrete problem or use case, not just a vague idea.

Area

apps/web

Problem or use case

The git branch list does not reliably reflect the current state of the repository. Sometimes after deleting a branch (e.g. via the terminal, another git client, or as part of cleaning up merged branches), the deleted branch still shows up in the branch list. The only way I have found to get an accurate list again is to fully reload, which is disruptive when I'm in the middle of working on a thread.

Proposed solution

Add a manual Refresh button (or a refresh icon) next to / inside the git branch list that re-queries the repository's branches on demand and updates the displayed list. This gives a quick, non-disruptive way to resync the UI with the real repo state without reloading everything.

Alternatives considered

  • Reloading the app/window — works but is heavy-handed and loses my current context.
  • Automatic polling/refresh on focus — would also solve it, but a manual refresh button is simpler, predictable, and a reasonable first step.

Risks or tradeoffs

Minimal. The main consideration is debouncing rapid clicks and showing a brief loading state while branches are re-fetched, so the button can't trigger overlapping git calls.

Examples or references

Most git GUI tools (e.g. VS Code's Source Control view, GitKraken, Fork) expose a refresh control for exactly this stale-state scenario.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions