Skip to content

TUI overwrites output of 'Check quotas' and 'Verify accounts' in 'opencode auth login' #537

@thomasmaerz

Description

@thomasmaerz

Summary

When executing opencode auth login and selecting Check quotas, Verify one account, or Verify all accounts, the output is printed to the console but immediately overwritten by the TUI menu. This makes the information impossible to read as it flashes briefly before the menu reappears.

Steps to Reproduce

  1. Run opencode auth login
  2. Select Check quotas
  3. Observe that the quota table flashes briefly and is then replaced by the main menu.

Technical Analysis

In dist/src/plugin.js (around line 2145), after the quota/verification data is logged, the code simply calls continue; in a while (true) loop. This loop calls promptLoginMode, which calls showAuthMenu, which in turn calls select with clearScreen: true.

Because the action completes so quickly, the screen is cleared by the next menu render before the user can read the output.

Proposed Fix

The plugin should wait for a keypress (e.g., 'Press any key to return to menu') after displaying informative data, or only clear the screen when explicitly requested. Adding a simple confirmation or using a pager for large outputs would solve this.

Note: This affects all versions up to 1.6.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/authOAuth, login, tokens, credentialsbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions