Skip to content

Conversation

continue[bot]
Copy link
Contributor

@continue continue bot commented Oct 14, 2025

Description

This PR fixes the issue where the git branch indicator in the bottom-left of the CLI TUI doesn't update when the git branch is changed.

Changes

  • Added a new useGitBranch hook that polls for git branch changes every second
  • Updated ResponsiveRepoDisplay component to use the new hook and re-render when the branch changes
  • The branch indicator now updates automatically within 1 second of a branch change

How it works

The useGitBranch hook uses a polling mechanism with setInterval to check for branch changes every second. When a branch change is detected, it updates the React state, which triggers a re-render of the ResponsiveRepoDisplay component with the updated branch information.

Testing

The existing git branch tests should still pass. The fix can be manually tested by:

  1. Starting the CLI in a git repository
  2. Observing the current branch in the bottom-left status bar
  3. Switching to a different branch in another terminal
  4. Within 1 second, the TUI should update to show the new branch name

Fixes CON-4406


This agent session was co-authored by nate and Continue.


Summary by cubic

Fixes the stale git branch indicator in the CLI TUI; the bottom-left branch now updates within ~1s after switching branches. Addresses CON-4406.

  • Bug Fixes
    • Added useGitBranch hook that polls for branch changes and updates state only when it changes.
    • Updated ResponsiveRepoDisplay to use the hook and include the branch in memo dependencies to trigger re-render.

- Add useGitBranch hook to poll for git branch changes every second
- Update ResponsiveRepoDisplay to watch branch changes and re-render
- This ensures the bottom-left TUI indicator updates when git branch changes

Fixes CON-4406

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <[email protected]>
Co-authored-by: Username <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant