Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codex-rs/tui/src/bottom_pane/status_line_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ mod tests {
),
(
StatusLineItem::WeeklyLimit.preview_item(),
"weekly 82%".to_string(),
"weekly 82% left".to_string(),
),
]),
AppEventSender::new(tx_raw),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ expression: status_line_popup_snapshot(&mut chat)
[ ] current-dir Current working directory
[ ] project-name Project name (omitted when unavailable)

monthly 65% · weekly 50%
monthly 65% left · weekly 50% left
Press space to toggle; ←/→ to move; enter to confirm and close; esc to close
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
source: tui/src/chatwidget/tests/status_surface_previews.rs
expression: snapshot
---
status line: monthly 65% · weekly 50%
terminal title: monthly 65% | weekly 50%
status line: monthly 65% left · weekly 50% left
terminal title: monthly 65% left | weekly 50% left
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ expression: terminal_title_popup_snapshot(&mut chat)
[ ] run-state Compact session run-state text (Ready, Working, Thinking)
[ ] thread-title Current thread title, or thread identifier when unnamed

monthly 65% | weekly 50%
monthly 65% left | weekly 50% left
Press space to toggle; ←/→ to move; enter to confirm and close; esc to close
2 changes: 1 addition & 1 deletion codex-rs/tui/src/chatwidget/status_controls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ impl ChatWidget {
) -> Option<String> {
let window = window?;
let remaining = (100.0f64 - window.used_percent).clamp(0.0f64, 100.0f64);
Some(format!("{label} {remaining:.0}%"))
Some(format!("{label} {remaining:.0}% left"))
}

pub(super) fn status_line_reasoning_effort_label(
Expand Down
16 changes: 8 additions & 8 deletions codex-rs/tui/src/chatwidget/tests/status_and_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ async fn status_line_uses_secondary_fallback_for_unsupported_window() {

assert_eq!(
chat.status_line_value_for_item(crate::bottom_pane::StatusLineItem::WeeklyLimit),
Some("secondary usage 50%".to_string())
Some("secondary usage 50% left".to_string())
);
}

Expand Down Expand Up @@ -614,11 +614,11 @@ async fn status_line_legacy_limit_items_prefer_matching_windows() {

assert_eq!(
chat.status_line_value_for_item(crate::bottom_pane::StatusLineItem::FiveHourLimit),
Some("5h 60%".to_string())
Some("5h 60% left".to_string())
);
assert_eq!(
chat.status_line_value_for_item(crate::bottom_pane::StatusLineItem::WeeklyLimit),
Some("weekly 6%".to_string())
Some("weekly 6% left".to_string())
);
}

Expand Down Expand Up @@ -646,11 +646,11 @@ async fn status_line_shows_secondary_non_weekly_when_primary_is_weekly() {

assert_eq!(
chat.status_line_value_for_item(crate::bottom_pane::StatusLineItem::FiveHourLimit),
Some("monthly 65%".to_string())
Some("monthly 65% left".to_string())
);
assert_eq!(
chat.status_line_value_for_item(crate::bottom_pane::StatusLineItem::WeeklyLimit),
Some("weekly 6%".to_string())
Some("weekly 6% left".to_string())
);
}

Expand Down Expand Up @@ -678,7 +678,7 @@ async fn status_line_five_hour_item_omits_weekly_only_limit() {
);
assert_eq!(
chat.status_line_value_for_item(crate::bottom_pane::StatusLineItem::WeeklyLimit),
Some("weekly 91%".to_string())
Some("weekly 91% left".to_string())
);
}

Expand All @@ -702,7 +702,7 @@ async fn status_line_single_monthly_primary_omits_weekly_limit_item() {

assert_eq!(
chat.status_line_value_for_item(crate::bottom_pane::StatusLineItem::FiveHourLimit),
Some("monthly 65%".to_string())
Some("monthly 65% left".to_string())
);
assert_eq!(
chat.status_line_value_for_item(crate::bottom_pane::StatusLineItem::WeeklyLimit),
Expand Down Expand Up @@ -734,7 +734,7 @@ async fn status_line_secondary_only_non_weekly_limit_omits_primary_limit_item()
);
assert_eq!(
chat.status_line_value_for_item(crate::bottom_pane::StatusLineItem::WeeklyLimit),
Some("monthly 65%".to_string())
Some("monthly 65% left".to_string())
);
}

Expand Down
4 changes: 2 additions & 2 deletions codex-rs/tui/src/chatwidget/tests/status_surface_previews.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ async fn status_surface_preview_omits_unavailable_rate_limit_items() {
&mut chat,
&[StatusLineItem::FiveHourLimit, StatusLineItem::WeeklyLimit]
),
"weekly 91%"
"weekly 91% left"
);
assert_eq!(
title_preview_line(
Expand All @@ -256,7 +256,7 @@ async fn status_surface_preview_omits_unavailable_rate_limit_items() {
TerminalTitleItem::WeeklyLimit
],
),
"weekly 91%"
"weekly 91% left"
);
}

Expand Down
Loading