Update Codex login success page UX (#20136)

## Summary

update the local login success page to match the Codex desktop auth UX
use theme-aware colors and an inline 20px Codex mark
keep the actual localhost success page aligned with the browser auth UX
PR

## Tests

<img width="1728" height="1117" alt="Screenshot 2026-04-29 at 12 00
34 PM"
src="https://github.com/user-attachments/assets/76a40c3f-07c3-452c-97da-e7c43717cd2c"
/>
This commit is contained in:
rafael-jac
2026-04-29 19:14:53 -04:00
committed by GitHub
parent 74f06dcdfb
commit 98f67b15d3
15 changed files with 550 additions and 188 deletions
@@ -1338,8 +1338,11 @@ impl CodexMessageProcessor {
self.login_api_key_v2(request_id, LoginApiKeyParams { api_key })
.await;
}
LoginAccountParams::Chatgpt => {
self.login_chatgpt_v2(request_id).await;
LoginAccountParams::Chatgpt {
codex_streamlined_login,
} => {
self.login_chatgpt_v2(request_id, codex_streamlined_login)
.await;
}
LoginAccountParams::ChatgptDeviceCode => {
self.login_chatgpt_device_code_v2(request_id).await;
@@ -1441,6 +1444,7 @@ impl CodexMessageProcessor {
// Build options for a ChatGPT login attempt; performs validation.
async fn login_chatgpt_common(
&self,
codex_streamlined_login: bool,
) -> std::result::Result<LoginServerOptions, JSONRPCErrorError> {
let config = self.config.as_ref();
@@ -1458,6 +1462,7 @@ impl CodexMessageProcessor {
let opts = LoginServerOptions {
open_browser: false,
codex_streamlined_login,
..LoginServerOptions::new(
config.codex_home.to_path_buf(),
CLIENT_ID.to_string(),
@@ -1496,13 +1501,20 @@ impl CodexMessageProcessor {
}
}
async fn login_chatgpt_v2(&self, request_id: ConnectionRequestId) {
let result = self.login_chatgpt_response().await;
async fn login_chatgpt_v2(
&self,
request_id: ConnectionRequestId,
codex_streamlined_login: bool,
) {
let result = self.login_chatgpt_response(codex_streamlined_login).await;
self.outgoing.send_result(request_id, result).await;
}
async fn login_chatgpt_response(&self) -> Result<LoginAccountResponse, JSONRPCErrorError> {
let opts = self.login_chatgpt_common().await?;
async fn login_chatgpt_response(
&self,
codex_streamlined_login: bool,
) -> Result<LoginAccountResponse, JSONRPCErrorError> {
let opts = self.login_chatgpt_common(codex_streamlined_login).await?;
let server = run_login_server(opts)
.map_err(|err| internal_error(format!("failed to start login server: {err}")))?;
let login_id = Uuid::new_v4();
@@ -1573,7 +1585,9 @@ impl CodexMessageProcessor {
async fn login_chatgpt_device_code_response(
&self,
) -> Result<LoginAccountResponse, JSONRPCErrorError> {
let opts = self.login_chatgpt_common().await?;
let opts = self
.login_chatgpt_common(/*codex_streamlined_login*/ false)
.await?;
let device_code = request_device_code(&opts)
.await
.map_err(Self::login_chatgpt_device_code_start_error)?;