Skip to content

fix: keep interactive auth login prompt visible - #54

Open
ws wants to merge 1 commit into
stephendolan:mainfrom
ws:fix/auth-login-prompt
Open

ws wants to merge 1 commit into
stephendolan:mainfrom
ws:fix/auth-login-prompt

Conversation

@ws

@ws ws commented Oct 21, 2026

Copy link
Copy Markdown

Summary

  • Pass the token prompt directly to readline.question() rather than writing it separately and asking an empty question.
  • Add a regression test covering the prompt text, stderr output, trimmed token, readline cleanup, and successful login with mocked credentials/API calls.

Problem

On macOS with Bun 1.4.2, ynab auth login appears to hang: readline clears the separately written prompt when rendering its empty question. It is actually waiting for a token with no visible instructions. Passing the prompt to readline keeps it visible during redraws.

Validation

  • Regression test fails before the fix and passes afterward.
  • bun run test --run: all 46 tests pass.
  • bun run typecheck, bun run lint, and bun run build: pass.
  • Verified the built CLI in a pseudo-terminal under Bun: the prompt remains visible after the clear-line escape sequence. No token was submitted in this check.
  • Formatting could not run because the existing Biome config uses schema 1.9.4 and files.include/files.ignore, which installed Biome 2.3.11 rejects. Left this unrelated configuration unchanged.

Token input/masking behavior, piped stdin, and --token handling are unchanged.

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.

1 participant