Skip to content

feat: add Graph tab with SourceTree-style branch lanes#3003

Open
tiagoyamashita wants to merge 1 commit into
gitui-org:masterfrom
tiagoyamashita:feature/graph-tab-lanes
Open

feat: add Graph tab with SourceTree-style branch lanes#3003
tiagoyamashita wants to merge 1 commit into
gitui-org:masterfrom
tiagoyamashita:feature/graph-tab-lanes

Conversation

@tiagoyamashita

Copy link
Copy Markdown

Summary

  • Add a new top-level Graph [6] tab after Stashes that walks commits from HEAD, local branches, remotes, and tags
  • Draw colored Unicode lane glyphs beside each commit so branch/merge topology is visible (SourceTree-style)
  • Reuse existing commit-list ref badges ({*branch}, [remote/branch], ) and Enter-to-inspect

Test plan

  • cargo test -p asyncgit graph_
  • cargo build
  • Open gitui, press 6 (or Tab to Graph)
  • Confirm diverged local/remote branches show multiple colored lanes
  • Confirm tags and HEAD branch labels appear on the correct commits
  • Confirm Enter opens commit inspect from the Graph tab

Walk all local/remote/tag tips and draw colored Unicode lanes beside
commits so branch topology is visible next to Stashes.
Comment thread src/app.rs
) || key_match(
k,
self.key_config.keys.tab_stashes,
) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You added a key_config.keys.tab_graph, but forgot to match against it to the if statement inside src/app.rs fn App.event that calls switch_tab. This means that the shortcut '6' does not activate the tab as intended.

@peso

peso commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

What are your thoughts behind placing the graph on a separate tab?
I would expect it to be on the log tab.
Fewer tabs gives a simpler interface that is faster to understand.

Perhaps with an option that toggles the graph on and off. Default would be on.
The option would be in the OptionsPopup as shown in the CommandBar.
It could also be a dedicated key, if it was important to toggle it often.

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.

2 participants