Skip to content

Header: hide unconfigured providers from the auth inventory to save vertical space #582

Closed

Description

@ravshansbox

Problem

The startup header renders a full credential inventory: a /login to add provider heading plus one line for every known provider, whether or not it is configured. Unconfigured providers get a dim hollow ○.

Code: crates/jcode-tui/src/tui/ui_header.rs

  • auth_full_specs (:290) always returns all 7 entries: anthropic, openrouter, openai, cursor, copilot, gemini, antigravity.
  • build_auth_status_lines (:358) maps each to a line, with auth_dot_char (:281) using ○ for AuthState::NotConfigured.
  • build_header_lines_with_auth (:772) pushes the heading then all of those lines.

So a typical single-provider user burns 8 header rows to say "6 providers you don't use". On short terminals this pushes out genuinely useful rows (mcp, skills, working dir + branch, updates box).

Note the active route is already reported separately on the model line via header_provider_label (:431, used at :696), e.g. oauth:anthropic · claude-opus-5, so the inventory is not what tells you which provider is live.

Proposal

Show only configured providers (AuthState::Available / Expired) in the header, and collapse the rest into one dim hint line:

/login to add provider (+5 more)
● anthropic(oauth*+key)
● openai(key)

Details:

  • Keep the ordering from auth_full_specs; just filter NotConfigured in build_auth_status_lines.
  • Keep the /login heading so discoverability of unconfigured providers survives; append a +N more count so users know the list is truncated, not that those providers vanished.
  • If nothing is configured, fall back to the current full list so first-run onboarding still shows what is available.
  • /login picker remains the canonical full list; no change there.

Expected saving: 5-6 rows for the common case.

Open questions (needs a decision)

  1. Should this be unconditional, or gated behind a config key (e.g. ui.header_show_unconfigured_providers, default false)?
  2. Should Expired (◐) providers stay pinned near the top so a stale credential is not easy to miss?
  3. Is +N more the right affordance, or should the heading just stay as-is?

Testing

ui_header.rs already has header line tests in its mod tests; add cases for: all-unconfigured (full list), partially configured (filtered + +N more), and expired-only.

Activity

  1. added
    enhancement
    priority: low
    triage: needs-decision
    autonomous: no
    on Jul 24, 2026
  2. 1jehuang commented on Jul 24, 2026

    @1jehuang
    Owner

    Good writeup, and the code references are accurate: auth_full_specs does emit all 7 providers unconditionally and the live route is already shown on the model line.

    Marking this needs-decision rather than auto-fixing, because your three open questions are exactly the parts an agent should not decide unilaterally (unconditional vs config-gated, expired-credential visibility, and the +N more affordance). Filtering NotConfigured with a full-list fallback on first run looks like the right default to me; leaving it for maintainer sign-off on the config-key question.

    --- — Jcode agent (automated triage), on behalf of @1jehuang

  3. ravshansbox commented on Aug 9, 2026

    @ravshansbox
    Author

    Related: filed #858 for the /login to add provider heading specifically.

    The provider-row filtering from this issue landed in 5c70ac4 (build_auth_status_lines now drops NotConfigured with a full-list fallback), but the heading above those rows is still pushed unconditionally in build_header_lines_with_auth (ui_header.rs:850). So a configured user still sees a call-to-action for setup they already completed.

    The +N more affordance question (open question 3 here) overlaps #858 question 1, since +N more would have to attach to that heading. Probably worth deciding both at once — or closing #858 into this one if you prefer a single decision.

    --- — Jcode agent, on behalf of @ravshansbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomous: noenhancementpriority: lowtriage: needs-decision

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions