fix: resolve v0.8.34 integration compile issues

This commit is contained in:
Hunter Bown
2026-05-12 23:33:49 -05:00
parent 6f3814f39c
commit b5a0e77bd3
5 changed files with 12 additions and 20 deletions
+2
View File
@@ -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,
+6 -6
View File
@@ -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");
+3 -3
View File
@@ -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(),
}
}
-11
View File
@@ -7891,17 +7891,6 @@ fn footer_context_percent_spans(app: &App) -> Vec<Span<'static>> {
)]
}
fn footer_git_branch_spans(app: &App) -> Vec<Span<'static>> {
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<Span<'static>> {
let displayed_cost = app.displayed_session_cost_for_currency(app.cost_currency);
if !should_show_footer_cost(displayed_cost) {
+1
View File
@@ -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));