Skip to content

Show only one tip on first start - #495

Open
joe4dev wants to merge 1 commit into
mainfrom
devx-821-enforce-max-one-tip
Open

Show only one tip on first start#495
joe4dev wants to merge 1 commit into
mainfrom
devx-821-enforce-max-one-tip

Conversation

@joe4dev

@joe4dev joe4dev commented Sep 8, 2026

Copy link
Copy Markdown
Member

Motivation

#484 added a shell-completion tip on first start, and it rendered directly below the rotating lstk logs / lstk status tip. Two tips side by side compete for attention and neither lands. With no single owner for that line, every future nudge would race the existing ones for it.

Solution

At most one > Tip: line per run, enforced structurally rather than by convention:

  • selectTip (new internal/container/tips.go) is the only place that decides which tip to show, and it returns one string, not a list. The first-run completion tip outranks the rotating per-emulator tips: first run happens once per install, while the rotating tips come back on every later start.
  • container.Start is the only place that emits it. Its body moved to an unexported start, leaving the public entry point a thin wrapper around the single emit. emitPostStartPointers no longer emits a tip, and internal/ui no longer emits one either — RunOptions.CompletionTip is replaced by StartOptions.FirstRun.

Adding a tip now means ranking it inside selectTip; there is nowhere else to put it. The rule is written up under "Post-start tips" in CLAUDE.md.

User-visible change: a first interactive start shows the completion tip and nothing else. Every other run is unchanged, rotation included — tipsForType and all six tips moved to the new file byte-for-byte.

Tests: internal/container/tips_test.go pins the priority order and that no input combination can produce two lines; the existing first-run integration test now asserts the set of distinct tips is exactly the completion tip, and the subsequent-run test asserts exactly one tip.

Docs

No documentation change needed — no new command, flag, or env var. The only user-facing change is that a first interactive start shows one tip instead of two. The shell-completion tip text and the #shell-completions docs anchor it points at are unchanged, so that anchor should still stay stable.

Separately, @gtsiolis suggested a short URL for terminal output (#484 comment). That needs a docs-repo redirect (e.g. reserving /go/<topic>) before the CLI can point at one, so it is out of scope here.

Manual testing (on fish shell)

The first CLI invocation shows the tab completion tip exactly once (including false positive for Homebrew install):
Screenshot 2026-09-09 at 14 36 18

Every subsequent lstk start command rotates the existing tips as usual:
Screenshot 2026-09-09 at 14 36 46

Review

Human review advised — it changes user-facing output on the shared start path, and @gtsiolis raised the original concern on #484, so it's worth confirming this is the resolution he had in mind.

Related

Follow up from DEVX-821

Resolves DEVX-1119

@joe4dev joe4dev added semver: patch docs: skip Pull request does not require documentation changes labels Sep 8, 2026
@joe4dev
joe4dev force-pushed the devx-821-enforce-max-one-tip branch 2 times, most recently from 55008c9 to 2f6fbbe Compare September 8, 2026 14:33
Co-Authored-By: Claude <noreply@anthropic.com>
@joe4dev
joe4dev force-pushed the devx-821-enforce-max-one-tip branch from 2f6fbbe to 2360c8a Compare September 9, 2026 12:44
@joe4dev
joe4dev marked this pull request as ready for review September 9, 2026 12:51
@joe4dev
joe4dev requested review from a team and peter-smith-phd as code owners September 9, 2026 12:51
@joe4dev
joe4dev requested a review from gtsiolis September 9, 2026 12:51
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.

1 participant