Port upstream UI polish and refresh dependencies
Bring over selected Warp UI improvements: selectable Thought text, message timestamps, animated theme backgrounds, editable New Window shortcuts, safer tab renaming and restoration, and text/font/discard crash fixes. Match upstream orchestration pill geometry and tooltips, and replace expanded subagent previews with compact links that retain live status and conversation navigation for launches and follow-up messages. Include the pending Cargo.lock dependency refresh. Adapted upstream PRs: #15948, #15884, #15691, #14618, #15772, #15705, #15605, #14895, #15996, #15771, #14893, and #14603.
This commit is contained in:
@@ -28,6 +28,8 @@ use crate::ai::agent_tips::AITipModel;
|
||||
use crate::ai::ambient_agents::github_auth_notifier::GitHubAuthNotifier;
|
||||
use crate::ai::blocklist::agent_view::orchestration_pill_bar_model::OrchestrationPillBarModel;
|
||||
use crate::ai::blocklist::{BlocklistAIHistoryModel, BlocklistAIPermissions};
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use crate::ai::chatgpt_auth::ChatGPTAuthModel;
|
||||
use crate::ai::document::ai_document_model::AIDocumentModel;
|
||||
use crate::ai::execution_profiles::profiles::AIExecutionProfilesModel;
|
||||
use crate::ai::facts::manager::AIFactManager;
|
||||
@@ -178,6 +180,8 @@ pub(crate) fn initialize_app(app: &mut App) {
|
||||
app.add_singleton_model(AgentNotificationsModel::new);
|
||||
app.add_singleton_model(AgentConversationsModel::new);
|
||||
app.add_singleton_model(SessionPermissionsManager::new);
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
app.add_singleton_model(|_| ChatGPTAuthModel::new_for_test());
|
||||
app.add_singleton_model(LLMPreferences::new);
|
||||
app.add_singleton_model(HarnessAvailabilityModel::new);
|
||||
app.add_singleton_model(|ctx| AITipModel::new_for_agent_tips(ctx));
|
||||
@@ -255,8 +259,9 @@ pub(crate) fn initialize_app(app: &mut App) {
|
||||
app.add_singleton_model(|ctx| {
|
||||
CodebaseIndexManager::new_for_test(ServerApiProvider::as_ref(ctx).get(), ctx)
|
||||
});
|
||||
app.add_singleton_model(|ctx| PersistedWorkspace::new(vec![], HashMap::new(), None, ctx));
|
||||
// PersistedWorkspace subscribes to project-context updates during construction.
|
||||
app.add_singleton_model(|_| ProjectContextModel::default());
|
||||
app.add_singleton_model(|ctx| PersistedWorkspace::new(vec![], HashMap::new(), None, ctx));
|
||||
app.add_singleton_model(|_| PricingInfoModel::new());
|
||||
app.add_singleton_model(AIDocumentModel::new);
|
||||
app.add_singleton_model(|_| History::new(vec![]));
|
||||
@@ -4257,3 +4262,52 @@ fn test_pin_tab_on_grouped_tab_extracts_then_pins() {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/// Regression test for #14241.
|
||||
///
|
||||
/// Creating a tab group opens the inline name editor and also spawns a terminal. About
|
||||
/// a second later that terminal's bootstrap block becomes visible and takes focus, which
|
||||
/// blurs the editor while the user is still typing. Blur used to be treated as
|
||||
/// confirmation, so whatever fragment had been typed became the group's name — and was
|
||||
/// persisted.
|
||||
///
|
||||
/// A rename the user never finished must not be committed.
|
||||
#[test]
|
||||
fn test_tab_group_rename_blur_does_not_commit_unfinished_name() {
|
||||
let _grouped_tabs_guard = FeatureFlag::GroupedTabs.override_enabled(true);
|
||||
|
||||
App::test((), |mut app| async move {
|
||||
initialize_app(&mut app);
|
||||
|
||||
let workspace = mock_workspace(&mut app);
|
||||
workspace.update(&mut app, |workspace, ctx| {
|
||||
workspace.handle_action(
|
||||
&WorkspaceAction::SelectNewSessionMenuItem(NewSessionMenuItem::CreateNewTabGroup),
|
||||
ctx,
|
||||
);
|
||||
let group_id = workspace.tabs[0]
|
||||
.group_id
|
||||
.expect("active tab should be assigned to the new group");
|
||||
assert_eq!(workspace.tab_groups[&group_id].name, None);
|
||||
|
||||
workspace.rename_tab_group(group_id, ctx);
|
||||
|
||||
// The user gets three characters in before the terminal is ready.
|
||||
workspace
|
||||
.tab_group_rename_editor
|
||||
.update(ctx, |editor, ctx| {
|
||||
editor.clear_buffer_and_reset_undo_stack(ctx);
|
||||
editor.user_insert("Bui", ctx);
|
||||
});
|
||||
|
||||
// The auto-created terminal takes focus; the editor blurs with no user intent
|
||||
// to finish.
|
||||
workspace.handle_tab_group_rename_editor_event(&EditorEvent::Blurred, ctx);
|
||||
|
||||
assert_eq!(
|
||||
workspace.tab_groups[&group_id].name, None,
|
||||
"a rename interrupted by the terminal stealing focus must not be committed"
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user