mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
Wrap built-in TUI status lines within the footer row budget (#60682)
## Why Long built-in status lines were truncated to a single row even when the footer had room for more content. ## What changed - Wrap status text to the available width and row budget, preserving styles and hyperlink targets across rows. - Show an unlinked ellipsis when content exceeds the available space. - Refresh wrapped content when the status text, agent label, or width changes. - Keep reasoning-effort transitions on one row and restore wrapping after the final animation frame. ## Testing Add coverage for wrapping and hyperlink boundaries across footer layouts, content and agent-label updates, resizing, and wrapping restoration after an effort transition. Update transcript and startup snapshots for multiline status text. GitOrigin-RevId: 30e0795c473efd62fc4d0dca4deb6029b625a9e8
This commit is contained in:
@@ -113,6 +113,17 @@ impl HyperlinkLine {
|
||||
self.mark_cells(area, buf);
|
||||
}
|
||||
|
||||
/// Reserve the last visible grapheme for an unlinked overflow marker.
|
||||
pub(crate) fn render_with_ellipsis(mut self, area: Rect, buf: &mut Buffer) {
|
||||
if area.is_empty() {
|
||||
return;
|
||||
}
|
||||
self.line =
|
||||
crate::line_truncation::truncate_line_with_ellipsis(self.line, usize::from(area.width));
|
||||
self.clip_hyperlinks_to_width(self.width().saturating_sub(1));
|
||||
self.render_fitted(area, buf);
|
||||
}
|
||||
|
||||
fn mark_cells(&self, area: Rect, buf: &mut Buffer) {
|
||||
if area.is_empty() {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user