Skip to content

Improve slow-start prompt behavior - #457

Merged
tiurin merged 1 commit into
mainfrom
devx-1051-improve-the-slow-start-prompt-behavior-in-lstk
Aug 13, 2026
Merged

Improve slow-start prompt behavior#457
tiurin merged 1 commit into
mainfrom
devx-1051-improve-the-slow-start-prompt-behavior-in-lstk

Conversation

@gtsiolis

@gtsiolis gtsiolis commented Aug 13, 2026

Copy link
Copy Markdown
Member

Motivation

When LocalStack takes longer than the interactive startup timeout, the recovery prompt wraps awkwardly and hides its shortcut keys. More importantly, startup health checks pause while the prompt is open, so it can remain stuck after the emulator is ready and a stale Stop selection can stop a healthy emulator.

Solution

  • Render the slow-start actions as vertical, shortcut-first choices.
  • Continue monitoring readiness and container exit while the prompt is visible.
  • Dismiss only the matching prompt when startup resolves automatically.
  • Recheck readiness before stopping to protect an emulator that became healthy during the prompt.
  • Add regression tests for layout, automatic dismissal, and readiness/Stop races.

BEFORE / AFTER

Aspect Before After
Prompt layout Question and actions form one long line and wrap awkwardly Question and actions render on separate lines
Shortcuts Keep waiting [W] / Stop LocalStack and exit [S] [W] Keep waiting / [S] Stop and exit
Successful startup Prompt remains stuck until a key is pressed Prompt closes automatically and the success sequence appears
Stop action A stale prompt can stop an emulator that has become ready Readiness is checked again before stopping
Monitoring Health checks pause while awaiting input Health and exit monitoring continue behind the prompt
BEFORE AFTER
Screenshot 2026-08-13 at 13 36 25 Screenshot 2026-08-13 at 13 58 06

Docs

Docs assessment

No documentation changes are needed. This refines existing interactive startup behavior and keeps the recovery command visible in the prompt.

Review

Self-merge candidate: this is a small, already-discussed UX fix with focused unit and race regression coverage.

Validation

  • go test -race ./internal/container -run 'TestStartupMonitorAwait_(InteractivePromptKeepWaitingThenStop|DismissesPromptWhenEmulatorBecomesReady|DoesNotStopEmulatorThatBecameReadyBeforeSelection)$' -count=1
  • go test ./internal/ui/... ./internal/output/... -count=1
  • make build
  • git diff --check

Closes DEVX-1051

Co-Authored-By: Claude noreply@anthropic.com

@gtsiolis gtsiolis self-assigned this Aug 13, 2026
@gtsiolis gtsiolis added semver: patch docs: skip Pull request does not require documentation changes labels Aug 13, 2026
@gtsiolis

gtsiolis commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

@tiurin could you take a look since you added this in #449. Friendly reminder to also ask for a peer review when there are many moving parts on the interactive or non-interactive outputs. Cc @localstack/devx

@gtsiolis
gtsiolis marked this pull request as ready for review August 13, 2026 10:59
@gtsiolis
gtsiolis requested review from a team and peter-smith-phd as code owners August 13, 2026 10:59

@skyrpex skyrpex left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better now, thanks!

@tiurin

tiurin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@tiurin could you take a look since you added this in #449. Friendly reminder to also ask for a peer review when there are many moving parts on the interactive or non-interactive outputs. Cc @localstack/devx

thanks @gtsiolis, great catch on not stopping the emulator that eventually started while the prompt was on-screen. 👏 Also, looks much better with line split. 👍

Just to confirm, #449 is related to a different problem. Did you mean #390? That one was peer-reviewed. But definitely agree that we can use more of cross-testing ourselves and validate the user experience more often by trying out a binary from the branch while reviewing. 💯 Could be a good default reviewing behaviour we can add to contributing guidelines, wdyt?

tiurin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

However, options added in #449 don't have vertical rendering applied, will follow-up on it -> #458

Co-Authored-By: Claude <noreply@anthropic.com>
@gtsiolis
gtsiolis force-pushed the devx-1051-improve-the-slow-start-prompt-behavior-in-lstk branch from 6d922f9 to 8942ae4 Compare August 13, 2026 15:55
@gtsiolis

gtsiolis commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

@tiurin Correct! Thanks for the follow up!

A design rule to follow for when to use what, is ...

  • Inline Y/n for binary confirmations: “Remove snapshot? [y/N]”
  • Vertical choices for distinct actions: “Keep waiting”, “Stop and exit”, etc.

Cc @localstack/devx for visibility.

@tiurin
tiurin merged commit 89f170e into main Aug 13, 2026
19 checks passed
@tiurin
tiurin deleted the devx-1051-improve-the-slow-start-prompt-behavior-in-lstk branch August 13, 2026 16:27

Copy link
Copy Markdown
Member Author

Thanks for merging, @tiurin, and for reviewing, @skyrpex! 🏀


Generated by Claude Code

@tiurin

tiurin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@tiurin Correct! Thanks for the follow up!

A design rule to follow for when to use what, is ...

  • Inline Y/n for binary confirmations: “Remove snapshot? [y/N]”
  • Vertical choices for distinct actions: “Keep waiting”, “Stop and exit”, etc.

Cc @localstack/devx for visibility.

Nice! I think we can make the code speak this design rule. This will guide developer towards choosing the right intent and hide rendering details like vertical behind it. I've generated a quick draft PR: #459. It's work in progress but curious what do you think about the intent @gtsiolis @localstack/devx?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: skip Pull request does not require documentation changes semver: patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants