mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Unify TUI status content and layout caching in StatusLine (#61200)
## What changed - Replace `FooterContent` and the separate layout cache with a `StatusLine` that owns native or extension content and caches its layout by bounds. - Move footer padding into the caller's layout and retain cached wrapping for unchanged agent-labeled status lines. - Remove extension-to-single-line conversion and render prepared UI trees directly within their allotted rectangles. ## Testing Extend composer coverage to verify that replacing measured extension content updates the displayed rows. Adapt status-line and UI-tree tests to exercise direct rendering, clipping, hyperlinks, and viewport bounds. GitOrigin-RevId: 72273c87d689b8b59748ab243793a9e2a45f4884
This commit is contained in:
@@ -2122,14 +2122,16 @@ impl ChatWidget {
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn status_line_text(&self) -> Option<String> {
|
||||
self.status_line_content()
|
||||
.cloned()
|
||||
.map(|content| content.into_hyperlink_line().line.to_string())
|
||||
self.status_line_content().map(|status| {
|
||||
status
|
||||
.as_native()
|
||||
.expect("native status line")
|
||||
.line
|
||||
.to_string()
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn status_line_content(
|
||||
&self,
|
||||
) -> Option<&crate::bottom_pane::footer_content::FooterContent> {
|
||||
pub(crate) fn status_line_content(&self) -> Option<&crate::bottom_pane::StatusLine> {
|
||||
self.bottom_pane.status_line_content()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user