fix terminal corruption that could happen when onboarding and update banner (#5269)
Instead of printing characters before booting the app, make the upgrade banner a history cell so it's well-behaved. <img width="771" height="586" alt="Screenshot 2025-10-16 at 4 20 51 PM" src="https://github.com/user-attachments/assets/90629d47-2c3d-4970-a826-283795ab34e5" /> --------- Co-authored-by: Josh McKinney <joshka@openai.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#![cfg(not(debug_assertions))]
|
||||
|
||||
use crate::UpdateAction;
|
||||
use crate::history_cell::padded_emoji;
|
||||
use crate::key_hint;
|
||||
use crate::render::Insets;
|
||||
@@ -12,6 +11,7 @@ use crate::tui::FrameRequester;
|
||||
use crate::tui::Tui;
|
||||
use crate::tui::TuiEvent;
|
||||
use crate::updates;
|
||||
use crate::updates::UpdateAction;
|
||||
use codex_core::config::Config;
|
||||
use color_eyre::Result;
|
||||
use crossterm::event::KeyCode;
|
||||
@@ -39,7 +39,7 @@ pub(crate) async fn run_update_prompt_if_needed(
|
||||
let Some(latest_version) = updates::get_upgrade_version_for_popup(config) else {
|
||||
return Ok(UpdatePromptOutcome::Continue);
|
||||
};
|
||||
let Some(update_action) = crate::get_update_action() else {
|
||||
let Some(update_action) = crate::updates::get_update_action() else {
|
||||
return Ok(UpdatePromptOutcome::Continue);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user