Skip to content

Commit c983fb4

Browse files
Refresh workspace-changes status item on turn end and patch updates
`request_status_line_workspace_changes_refresh` was defined but never invoked, so the `+added/-deleted ?untracked` segment cached the first lookup and stayed frozen for the rest of the session. Hook it into the same refresh paths that already refresh branch and git-summary state: - both `finalize_turn` sites in `turn_runtime.rs` (so user-visible turn end picks up edits codex applied during the turn), and - `on_turn_diff` in `protocol_requests.rs` (so mid-turn patch applies immediately refresh the stats without waiting for the turn to finish). Co-authored-by: Open Codex <hff582580@gmail.com>
1 parent 7223291 commit c983fb4

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

codex-rs/tui/src/chatwidget/protocol_requests.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ impl ChatWidget {
138138

139139
pub(super) fn on_turn_diff(&mut self, unified_diff: String) {
140140
debug!("TurnDiffEvent: {unified_diff}");
141+
// Codex just applied a patch — re-query git for the live `+added/-deleted ?untracked`
142+
// stats so the status line reflects the change without waiting for the turn to end.
143+
self.request_status_line_workspace_changes_refresh();
141144
self.refresh_status_line();
142145
}
143146

codex-rs/tui/src/chatwidget/turn_runtime.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ impl ChatWidget {
186186
self.transcript.had_work_activity = false;
187187
self.request_status_line_branch_refresh();
188188
self.request_status_line_git_summary_refresh();
189+
self.request_status_line_workspace_changes_refresh();
189190
}
190191
// Mark task stopped and request redraw now that all content is in history.
191192
self.status_state.pending_status_indicator_restore = false;
@@ -360,6 +361,7 @@ impl ChatWidget {
360361
self.status_state.pending_status_indicator_restore = false;
361362
self.request_status_line_branch_refresh();
362363
self.request_status_line_git_summary_refresh();
364+
self.request_status_line_workspace_changes_refresh();
363365
self.maybe_show_pending_rate_limit_prompt();
364366
}
365367

0 commit comments

Comments
 (0)