From b5a0e77bd3f3c5705396e25211543464e1db448a Mon Sep 17 00:00:00 2001 From: Hunter Bown Date: Tue, 12 May 2026 23:33:49 -0500 Subject: [PATCH] fix: resolve v0.8.34 integration compile issues --- crates/tui/src/prompts.rs | 2 ++ crates/tui/src/sandbox/seatbelt.rs | 12 ++++++------ crates/tui/src/tui/session_picker.rs | 6 +++--- crates/tui/src/tui/ui.rs | 11 ----------- crates/tui/src/tui/ui/tests.rs | 1 + 5 files changed, 12 insertions(+), 20 deletions(-) diff --git a/crates/tui/src/prompts.rs b/crates/tui/src/prompts.rs index 7d6ec453..0b4d6c6a 100644 --- a/crates/tui/src/prompts.rs +++ b/crates/tui/src/prompts.rs @@ -1101,6 +1101,7 @@ mod tests { goal_objective: None, project_context_pack_enabled: false, locale_tag: "en", + translation_enabled: false, }, ) { SystemPrompt::Text(text) => text, @@ -1127,6 +1128,7 @@ mod tests { goal_objective: None, project_context_pack_enabled: false, locale_tag: "en", + translation_enabled: false, }, ) { SystemPrompt::Text(text) => text, diff --git a/crates/tui/src/sandbox/seatbelt.rs b/crates/tui/src/sandbox/seatbelt.rs index d1187f17..a31607b2 100644 --- a/crates/tui/src/sandbox/seatbelt.rs +++ b/crates/tui/src/sandbox/seatbelt.rs @@ -559,12 +559,12 @@ mod tests { /// sandbox-exec refuse to load the profile. #[test] fn test_npm_cache_paths_emitted_in_policy_and_params_when_home_set() { - let _guard = ENV_LOCK.lock().unwrap_or_else(|p| p.into_inner()); + let _guard = crate::test_support::lock_test_env(); let saved_home = std::env::var_os("HOME"); let saved_npm = std::env::var_os("NPM_CONFIG_CACHE"); - // SAFETY: HOME/NPM_CONFIG_CACHE are process-global; ENV_LOCK serializes - // all mutations in this module, and we always restore the prior value. + // SAFETY: HOME/NPM_CONFIG_CACHE are process-global; lock_test_env + // serializes mutations here, and we always restore the prior value. unsafe { std::env::set_var("HOME", "/tmp/seatbelt-npm-test"); std::env::remove_var("NPM_CONFIG_CACHE"); @@ -618,12 +618,12 @@ mod tests { /// and their param must both be omitted. #[test] fn test_npm_cache_skipped_when_no_env() { - let _guard = ENV_LOCK.lock().unwrap_or_else(|p| p.into_inner()); + let _guard = crate::test_support::lock_test_env(); let saved_home = std::env::var_os("HOME"); let saved_npm = std::env::var_os("NPM_CONFIG_CACHE"); - // SAFETY: HOME/NPM_CONFIG_CACHE are process-global; ENV_LOCK serializes - // mutations here and we restore the prior values before returning. + // SAFETY: HOME/NPM_CONFIG_CACHE are process-global; lock_test_env + // serializes mutations here and we restore the prior values before returning. unsafe { std::env::remove_var("HOME"); std::env::remove_var("NPM_CONFIG_CACHE"); diff --git a/crates/tui/src/tui/session_picker.rs b/crates/tui/src/tui/session_picker.rs index 77b86964..9fd520b1 100644 --- a/crates/tui/src/tui/session_picker.rs +++ b/crates/tui/src/tui/session_picker.rs @@ -17,8 +17,8 @@ use unicode_width::{UnicodeWidthChar, UnicodeWidthStr}; use crate::palette; use crate::session_manager::{ - SavedSession, SessionCostSnapshot, SessionManager, SessionMetadata, extract_title, - extract_user_prompt, strip_thinking_tags, + SavedSession, SessionManager, SessionMetadata, extract_title, extract_user_prompt, + strip_thinking_tags, }; use crate::tui::views::{ModalKind, ModalView, ViewAction, ViewEvent}; @@ -801,7 +801,7 @@ mod tests { model: "deepseek-v4-pro".to_string(), workspace: std::path::PathBuf::from("/tmp"), mode: Some("agent".to_string()), - cost: SessionCostSnapshot::default(), + cost: crate::session_manager::SessionCostSnapshot::default(), } } diff --git a/crates/tui/src/tui/ui.rs b/crates/tui/src/tui/ui.rs index 74086f94..defdfd67 100644 --- a/crates/tui/src/tui/ui.rs +++ b/crates/tui/src/tui/ui.rs @@ -7891,17 +7891,6 @@ fn footer_context_percent_spans(app: &App) -> Vec> { )] } -fn footer_git_branch_spans(app: &App) -> Vec> { - let workspace = app.workspace.as_path(); - let Some(branch) = workspace_git_branch(workspace) else { - return Vec::new(); - }; - vec![Span::styled( - format!("git:{branch}"), - Style::default().fg(app.ui_theme.text_muted), - )] -} - fn footer_cost_spans(app: &App) -> Vec> { let displayed_cost = app.displayed_session_cost_for_currency(app.cost_currency); if !should_show_footer_cost(displayed_cost) { diff --git a/crates/tui/src/tui/ui/tests.rs b/crates/tui/src/tui/ui/tests.rs index 54e24b12..67aa6868 100644 --- a/crates/tui/src/tui/ui/tests.rs +++ b/crates/tui/src/tui/ui/tests.rs @@ -2542,6 +2542,7 @@ fn apply_slash_menu_selection_keeps_change_executable_without_version() { name: "/change".to_string(), description: String::new(), is_skill: false, + alias_hint: None, }]; assert!(apply_slash_menu_selection(&mut app, &entries, true));