Skip to content

Commit 32fcdd5

Browse files
committed
fix: refresh tui header after rate limit polls
1 parent f59e9be commit 32fcdd5

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.agents/skills/status-header-colors/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,6 @@ if let Some(summary) = self.rate_limit_summary.as_ref() {
7777
- Only change colors if this skill explicitly instructs it; do not introduce new colors.
7878
- Keep the separator as dim to avoid competing with the segments.
7979
- Prefer the exact icon codes shown above unless the feature removes a segment entirely.
80+
- If a status-header segment depends on background-polled or async state (for example rate-limit
81+
data fetched from `/usage`), the update path must explicitly request a redraw/frame after the
82+
cached state changes so the header updates while the UI is otherwise idle.

codex-rs/tui/src/chatwidget.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,6 +1700,9 @@ impl ChatWidget {
17001700
self.rate_limit_snapshots_by_limit_id.clear();
17011701
}
17021702
self.refresh_status_line();
1703+
// Rate-limit polling happens off the main turn stream, so request a frame explicitly
1704+
// to keep header/status surfaces in sync while the UI is otherwise idle.
1705+
self.request_redraw();
17031706
}
17041707

17051708
pub(crate) fn on_git_status_update(&mut self, summary: Option<GitStatusSummary>) {

0 commit comments

Comments
 (0)