fix(ui): Prevent stale Git branch and working directory in agent sessions#9970
fix(ui): Prevent stale Git branch and working directory in agent sessions#9970PratikRai0101 wants to merge 2 commits intowarpdotdev:masterfrom
Conversation
…ions (Fixes Bug 1 from warpdotdev#9958)
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR changes terminal tab metadata to prefer live working-directory and git-status data over potentially stale prompt chips.
Concerns
- The changed metadata is visible in the sidebar/status bar, but the PR does not include a screenshot or video demonstrating the updated behavior end to end. For faster review, please upload screenshots or a video of the feature working end to end.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR changes terminal tab metadata so working directory and Git branch display prefer live terminal/repo state over prompt chip snapshots, addressing stale UI during active agent sessions.
Concerns
current_git_branch()now prefersgit_status_metadata(), but the Git status subscription is still gated byGitDiffStatsconfiguration rather than branch consumers, so branch-only toolbar/prompt configurations can still fall back to the staleShellGitBranchchip.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. I reviewed this pull request and requested human review from: @warpdotdev/oss-maintainers. Comment Powered by Oz |
Oz no longer requests changes for this pull request after the latest automated review.
There was a problem hiding this comment.
Overview
This PR updates terminal tab metadata to prefer live working-directory and git-status model data over prompt chip values, and broadens git status subscription so branch/diff metadata remains available even when toolbar chips are disabled.
Concerns
- No blocking correctness, security, or error-handling concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Description
This PR addresses Bug 1 from issue #9958. It ensures that the Git branch and working directory displayed in the vertical tabs and status bar remain fresh during active CLI agent sessions.
Key Changes
current_git_branch()anddisplay_working_directory()to prioritize live filesystem/process data over potentially stale shell prompt chips.should_subscribe_to_git_status()inview.rsto be unconditional when a repository is detected. This ensures thatgit_status_metadata()is actually populated even if theGitDiffStatstoolbar chip is disabled.repo_pathand are managed byGitStatusUpdateModelwhich handles deduplication and automatic teardown.Linked Issue
Addresses Bug 1 in #9958
Screenshots / Videos
screenrecording-2026-05-03_16-03-59.mp4
Testing
Verified that branch and CWD updates are reflected immediately in the UI even when the CLI agent is active and prompt chips are not refreshing. Verified that disabling toolbar chips no longer breaks the live branch update.
Agent Mode
Changelog Entries for Stable
CHANGELOG-BUG-FIX: Fixed an issue where the terminal sidebar and status bar could show stale Git branch and working directory information during an active CLI agent session.