feat: add TUI login profile picker#120
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Codex Lab is moving toward dogfooding with multiple auth accounts. The CLI auth-profile work gave us named credential stores, but the TUI still lacked an ergonomic way to choose which saved login should back the current session.
This adds the first
/loginTUI surface so a user can inspect saved profiles and start a fresh session using one of them. Because auth is process-scoped in the embedded app-server, the TUI does an embedded-server restart for profile switches instead of pretending that a per-thread config change is enough. Shared daemon and remote app-server sessions now get an explicit restart-with---auth-profilemessage.What Changed
/loginas a slash command with a searchable profile picker./login defaultand/login <profile>.AppEvent::SwitchAuthProfileand a TUI switch path that:auth_home,config.auth_homerather thanconfig.codex_home.Verification
cargo test -p codex-tui login_slash_commandcargo test -p codex-app-server account_login_storage_uses_auth_homecargo check -p codex-tuicargo fmt --manifest-path codex-rs/Cargo.toml --all -- --checkgit diff --checkNotes
In-TUI creation of new login profiles is intentionally left as a follow-up. The picker points users at
codex-lab login --profile <name>until the app-server login endpoints are profile-aware enough to support a full in-TUI add-account flow safely.