Fix lstk start hanging on an invisible license re-login prompt - #449
Merged
tiurin merged 4 commits intoAug 11, 2026
Merged
Conversation
A prompt emitted while a spinner was stopped inside its min duration was parked in the spinner text, and the min-duration tick then erased it. `lstk start` looked hung after a rotated auth token was rejected: the re-login offer was never drawn while the domain waited on ResponseCh. The prompt now always goes to inputPrompt; the spinner text is only a mirror for as long as the spinner is on screen. Towards DEVX-1045 Co-Authored-By: Claude <noreply@anthropic.com>
Bubble Tea truncates every rendered line to the terminal width, and prompts were the one thing not wrapped. The license re-login prompt is ~165 characters, so on a normal terminal the "(Press ENTER to log in again)" hint fell off the right edge: a question with no visible answer. InputPrompt.View now takes the width and wraps like message lines do, keeping the key hints intact on their own line when they no longer fit. Towards DEVX-1045 Co-Authored-By: Claude <noreply@anthropic.com>
Ctrl+C was the only way out of the re-login offer, and it cancels the root context: the actionable error the decline renders then races the TUI quit, so the manual recovery steps could be lost entirely. ESC declines without cancelling, so the steps always print, immediately. Adds an integration test for the decline path, which also asserts the prompt is on screen at all. Towards DEVX-1045 Co-Authored-By: Claude <noreply@anthropic.com>
…lator The test shared Docker state with the rest of the suite while declaring t.Parallel(), and container discovery matches by (image repo, internal port) — so an emulator already running on 4566 makes `lstk start` report that instead of reaching the license check. It now clears the container first via cleanupLicense, which unlike cleanup leaves the keyring token alone. require.Eventually evaluates its message args eagerly, so the PTY transcript is logged from a cleanup on failure instead of coming out empty. Also records the prompt-visibility invariant in the root CLAUDE.md UI rules, where it is read before new prompt code gets written. Co-Authored-By: Claude <noreply@anthropic.com>
tiurin
marked this pull request as ready for review
August 11, 2026 13:23
tiurin
deleted the
devx-1045-improve-lstk-start-ux-after-auth-token-regeneration
branch
August 11, 2026 13:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
After rotating an auth token,
lstk startprinted✓ Pulled localstack/localstack-pro:latestand then sat there indefinitely. The license failure and the recovery steps only showed up after Ctrl+C. The CLI was blocked on an interactive prompt that the TUI haven't drawn.Before the fix:
After the fix:
Problem
promptReloginemits itsUserInputRequestEventa few hundred ms aftervalidateLicensestarts the "Checking license" spinner. A spinner stopped inside its 400 ms min duration stays on screen inpendingStop, so the TUI parked the prompt in the spinner's text. Then the min-duration tick erased it, leaving a blank screen while the domain waited onResponseCh.Solution
Three changes:
inputPrompt; spinner text is only a mirror for as long as the spinner is on screen(Press ENTER to log in again)could be truncated, so even a correctly rendered prompt didn't say what to pressESC to exitnext to ENTER. Ctrl+C also declines, but it cancels the root context and the decline'sErrorEventthen races with the TUI's quit, so the recovery steps could be lost entirelyThe re-login recovery added in #394 is unchanged. This PR fixes its visibility.
Closes DEVX-1045