Skip to content

[BUG] [cortex] TUI welcome screen hardcodes Plan: Pro even for API-key-only sessions #53288

@haha12-ai

Description

@haha12-ai

Project

cortex

Description

In the native interactive Cortex TUI, the welcome screen always shows:
Plan: Pro
But the same binary's login screen explicitly describes API key mode as:

For API access without subscription
Visible result:

start the native Cortex TUI with only CORTEX_API_KEY set,
reach the welcome screen without any Cortex account subscription data,
the right-side info card still shows Plan: Pro.

So the startup UI can claim a paid subscription tier even for an API-key-only session that the product itself describes as being without subscription.

Root Cause
The welcome screen right-side card is hardcoded in minimal_session/rendering.rs:

src/cortex-tui/src/views/minimal_session/rendering.rs:459
.add("Plan", "Pro")
src/cortex-tui/src/views/minimal_session/rendering.rs:772
.add("Plan", "Pro")
But the login screen explicitly describes API key login as a non-subscription path:

src/cortex-tui/src/runner/login_screen.rs
LoginMethod::ApiKey => "For API access without subscription"
So the welcome card is not rendering actual session/account plan state. It is rendering a fixed label.

Error Message

Debug Logs

System Information

- Cortex `v0.0.7`
- Platform: Linux terminal

Screenshots

570926493-0b9deace-2914-4230-bc29-0e207379b2ea.mov

Steps to Reproduce

  1. Build the native TUI binary:
    cd /opt/177/cortex
    cargo build -p cortex-cli --no-default-features --features cortex-tui --bin Cortex
  2. Set an API key environment variable so the native TUI skips the login screen:
    export CORTEX_API_KEY=dummy
  3. Launch the native TUI:
    ./target/debug/Cortex
  4. If the workspace trust screen appears, choose Yes, I trust this folder.
  5. Observe the welcome screen info card on the right side.

Expected Behavior

The welcome screen should not hardcode Plan: Pro.

For API-key-only sessions it should either:

show no plan,
show an API-key / no-subscription state,
or display real billing data only after it has actually been loaded.

Actual Behavior

The welcome screen always renders:

Plan: Pro
even when the session is launched only with CORTEX_API_KEY=dummy.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions