Skip to content

Show git branch in default footer#2347

Merged
Hmbown merged 2 commits into
Hmbown:mainfrom
nightt5879:nightt5879/default-git-branch-statusline
May 31, 2026
Merged

Show git branch in default footer#2347
Hmbown merged 2 commits into
Hmbown:mainfrom
nightt5879:nightt5879/default-git-branch-statusline

Conversation

@nightt5879
Copy link
Copy Markdown
Contributor

@nightt5879 nightt5879 commented May 29, 2026

Summary

  • Add the existing Git branch status item to the default footer so local branch info is visible without first configuring /statusline.
  • Use the existing workspace context cache for footer branch rendering so the default footer does not run git synchronously on each draw.
  • Harden the git-repo footer test helper against global commit signing config.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features
    • Passed with existing clippy warnings outside this patch.
  • cargo test -p codewhale-tui --bin codewhale-tui --all-features default_footer
  • cargo test -p codewhale-tui --bin codewhale-tui --all-features render_footer_from_git_branch_item_renders_workspace_branch
  • GitHub Actions CI
    • Lint, Version drift, Test (ubuntu-latest), Test (macos-latest), Test (windows-latest), npm wrapper smoke, GitGuardian, and Greptile all passed.

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • Verified TUI behavior manually if UI changes
    • Covered by focused footer rendering tests in this non-interactive Windows session.

Closes #2341

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds the GitBranch status item to the default TUI footer configuration. It also updates the test suite to disable GPG signing for test git commits, asserts that the default footer contains the new GitBranch item, and adds a test verifying that the workspace branch is correctly rendered in the default footer. There are no review comments, and I have no additional feedback to provide.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56d2e74b0d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/tui/src/config.rs
@nightt5879
Copy link
Copy Markdown
Contributor Author

Ready for review now. Follow-up commit 834bfeb addresses the Codex P2 feedback by reading the cached workspace context instead of running git from footer rendering. All CI checks are passing, including Windows, and the inline review thread has a direct fix reply.

@Hmbown
Copy link
Copy Markdown
Owner

Hmbown commented May 31, 2026

oooh thank you. let me think about how to fit this without overwhelming the ui/ux. I think there might be a way to get this on the sidebar

@Hmbown Hmbown merged commit 9d3d453 into Hmbown:main May 31, 2026
9 checks passed
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.

ui能不能显示出本地的git分支信息

2 participants