feat(tui): two-tab layout isolating Accounts and Providers (PR-3) - #69
Merged
xjoker merged 2 commits intoAug 26, 2026
Merged
Conversation
Load custom API provider profiles into the TUI and render them in a separate "Custom providers" panel below the account table. Providers carry no OAuth/usage, so they stay out of the account table, scoring, and refresh; the panel lists alias / name / model / base_url and never renders the key. Interactive add/remove of providers in the TUI is PR-4. Adds a TestBackend render test asserting the panel lists a provider and does not leak the API key. Co-authored-by: xJoker <xjoker@users.noreply.github.com>
Rework the custom-providers UI from a stacked panel into a top-level tab layout (per design 方案③), isolating codex-native ChatGPT accounts from third-party API+key providers: - Tab bar with Accounts (N) / Providers (N); Tab / BackTab switches. - Accounts tab: the existing account table + detail panel, unchanged. - Providers tab: a full-height read-only table of custom providers (alias / name / model / base_url) with a selection highlight; the API key is never rendered. - Event loop routes keys per active tab: account keys (a/r/t/i/s/space///Esc, and W auto-warmup) only fire on the Accounts tab; j/k move the provider selection on the Providers tab; q/h/Tab are global. Interactive add/remove within the Providers tab is PR-4. Test updated to render the Providers tab; still asserts the key never renders. Co-authored-by: xJoker <xjoker@users.noreply.github.com>
xjoker
marked this pull request as ready for review
August 26, 2026 05:01
This was referenced Aug 26, 2026
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.
Third slice of custom-provider support (方案 A). Surfaces custom providers in the TUI.
Per the refined design (two tabs), the TUI is now split into a top-level tab layout that isolates codex-native ChatGPT accounts from third-party API+key providers — their semantics (quota/scoring/OAuth vs base_url/key) and key bindings never mix.
Stacked on PR-2 (#68) — base branch is
cursor/provider-launch-5a91; retarget down the stack as they merge.What's in this PR
Accounts (N)/Providers (N);Tab/BackTabswitches (q/hstay global).alias/name/model/base_url) with a selection highlight (j/kmove it). The stored API key is never rendered. Empty state points tocodex-switch provider add.a/r/t/i/s/space///Esc, andWauto-warmup) only fire on the Accounts tab; provider selection keys only on the Providers tab.Interactive add/remove within the Providers tab is PR-4; CLI
provider add/removealready exists from PR-1.Tests
providers_tab_lists_custom_providers_without_the_key— renders the Providers tab viaTestBackend, asserts it lists a provider (alias+base_url) and does not leak the API key.cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --all— all pass, 0 failed.Manual demo (real TUI, verified via video review)
Seeded an isolated home (2 accounts + 2 providers) and drove the real TUI: the tab bar switches between the Accounts table and the Providers table with
Tab, the selection moves withj, and no API key is shown.tui_two_tabs_accounts_providers_demo.mp4
Accounts tab:
Accounts tab
Providers tab (keys never shown):
Providers tab
Note: CI Format and audit will be red until #63 (webbrowser RUSTSEC bump) merges to
dev; pre-existing and unrelated.To show artifacts inline, enable in settings.