Port recent Warp terminal and UI improvements
Improve tab-group search, rename focus, history navigation, shell prompt and completion handling, emoji width promotion, and macOS clipboard support. Guard unavailable settings/model-selector/undo-close views and forward the MCP OAuth callback issuer through the existing authentication flow. Adapt local changes from 14 upstream Warp commits through f571865ca3f2, reviewed from the latest 200 commits. Preserve Galaxy provider lifecycle, permissions, storage, and branding; exclude hosted/cloud infrastructure. Fix existing boolean-assertion lints and use stronger optimization with four code-generation units for the app test target to fit macOS unwind offsets. Production and dependency compilation settings remain unchanged. Validation: two clean builds and a final build; both prescribed Clippy commands with -D warnings; formatting, shell syntax and completion cleanup; 167 focused regression tests. Galaxy was not launched.
This commit is contained in:
+17
-5
@@ -192,8 +192,14 @@ pub struct AuthContext {
|
||||
/// Result of OAuth callback.
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum CallbackResult {
|
||||
Success { code: String, csrf_token: String },
|
||||
Error { error: Option<String> },
|
||||
Success {
|
||||
code: String,
|
||||
csrf_token: String,
|
||||
issuer: Option<String>,
|
||||
},
|
||||
Error {
|
||||
error: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
/// Makes an authenticated client for the given authorization server.
|
||||
@@ -340,8 +346,12 @@ pub async fn make_authenticated_client(
|
||||
.await
|
||||
.map_err(|e| AuthError::InternalError(e.to_string()))?;
|
||||
|
||||
let (code, csrf_token) = match &oauth_result {
|
||||
CallbackResult::Success { code, csrf_token } => (code, csrf_token),
|
||||
let (code, csrf_token, issuer) = match &oauth_result {
|
||||
CallbackResult::Success {
|
||||
code,
|
||||
csrf_token,
|
||||
issuer,
|
||||
} => (code, csrf_token, issuer),
|
||||
CallbackResult::Error { error } => {
|
||||
return Err(AuthError::AuthorizationFailed(
|
||||
error.as_deref().unwrap_or("unknown error").to_string(),
|
||||
@@ -350,7 +360,9 @@ pub async fn make_authenticated_client(
|
||||
};
|
||||
|
||||
// Handle the callback with the received authorization code and CSRF token.
|
||||
oauth_state.handle_callback(code, csrf_token).await?;
|
||||
oauth_state
|
||||
.handle_callback_with_issuer(code, csrf_token, issuer.as_deref())
|
||||
.await?;
|
||||
|
||||
let auth_manager = oauth_state.into_authorization_manager().ok_or_else(|| {
|
||||
AuthError::InternalError("Failed to create authorization manager".to_string())
|
||||
|
||||
Reference in New Issue
Block a user