Skip to content

fix(tui): Fixes infinite "Loading..." if Cerebras API key config is skipped#59

Merged
kevint-cerebras merged 1 commit intokevint-cerebras:devfrom
adventchilde:dev
Feb 2, 2026
Merged

fix(tui): Fixes infinite "Loading..." if Cerebras API key config is skipped#59
kevint-cerebras merged 1 commit intokevint-cerebras:devfrom
adventchilde:dev

Conversation

@adventchilde
Copy link
Contributor

Problem

When a user starts the TUI for the first time and skips the Cerebras onboarding modal, the app displays "Loading..." indefinitely, making it seem like something is wrong. (And it is factually incorrect, Cerebras is not loading at that point.)

Root Cause

Commit c1aba40 changed the model selection logic to return undefined when Cerebras provider is not connected. This causes the parsed memo to show "Cerebras / Loading..." forever, making it seem like the user needs to wait.

Solution

Changed the error state from "Loading..." to "Not configured" when no provider is available:

  • Display "No provider / Not configured" instead of "Cerebras / Loading..."
  • Show the error state in red color (theme.error) to make it visually distinct
  • This provides clear feedback that the user needs to configure a provider.

Changes

  • local.tsx: Lines 231-232 (error message)
  • prompt/index.tsx: Lines 816-819 (error color styling)

Testing

  1. Start TUI with no provider configured
  2. Skip Cerebras onboarding when prompted
  3. ✅ See "No provider / Not configured" in red (instead of infinite "Loading...")
  4. ✅ Press Ctrl+P → "Connect provider" to configure a provider

Impact

  • Users will no longer appear to be stuck in an infinite loading state
  • Clear, actionable message

When user skips Cerebras onboarding, show 'Not configured' instead of 'Loading...' to prevent indefinite hang.
@kevint-cerebras
Copy link
Owner

thanks for the PR!

@kevint-cerebras kevint-cerebras merged commit 5704673 into kevint-cerebras:dev Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants