Point users at shell completion setup on first start - #484
Conversation
6d5ed2a to
3039a2b
Compare
anisaoshafi
left a comment
There was a problem hiding this comment.
Thanks for the thorough integration testing, looks robust 👏🏼
Addresses review feedback on #484: the comments were verbose even where the code was obvious. Trimmed 74 comment lines to 31, keeping only what a future reader would otherwise break — the MessageEvent/DeferredEvent constraint in Run, the LIFO ordering scheduleVolumeCleanup depends on, why --type still counts as a first run — and dropping the design narration around them. Also fixes startTestContainer's doc comment, which scheduleVolumeCleanup had been inserted in front of, silently reattaching it to the wrong function. CLAUDE.md gains a length budget in Code Style, and the "Maintaining This File" bullet no longer reads as an invitation to write essays in doc comments. Co-Authored-By: Claude <noreply@anthropic.com>
Addresses review feedback on #484: the comments were verbose even where the code was obvious. Trimmed 74 comment lines to 31, keeping only what a future reader would otherwise break — the MessageEvent/DeferredEvent constraint in Run, the LIFO ordering scheduleVolumeCleanup depends on, why --type still counts as a first run — and dropping the design narration around them. Also fixes startTestContainer's doc comment, which scheduleVolumeCleanup had been inserted in front of, silently reattaching it to the wrong function. CLAUDE.md gains a length budget in Code Style, and the "Maintaining This File" bullet no longer reads as an invitation to write essays in doc comments. Co-Authored-By: Claude <noreply@anthropic.com>
c90cfae to
763353e
Compare
Addresses review feedback on #484: the comments were verbose even where the code was obvious. Trimmed 74 comment lines to 31, keeping only what a future reader would otherwise break — the MessageEvent/DeferredEvent constraint in Run, the LIFO ordering scheduleVolumeCleanup depends on, why --type still counts as a first run — and dropping the design narration around them. Also fixes startTestContainer's doc comment, which scheduleVolumeCleanup had been inserted in front of, silently reattaching it to the wrong function. CLAUDE.md gains a length budget in Code Style, and the "Maintaining This File" bullet no longer reads as an invitation to write essays in doc comments. Co-Authored-By: Claude <noreply@anthropic.com>
763353e to
a286f0e
Compare
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Addresses review feedback on #484: the comments were verbose even where the code was obvious. Trimmed 74 comment lines to 31, keeping only what a future reader would otherwise break — the MessageEvent/DeferredEvent constraint in Run, the LIFO ordering scheduleVolumeCleanup depends on, why --type still counts as a first run — and dropping the design narration around them. Also fixes startTestContainer's doc comment, which scheduleVolumeCleanup had been inserted in front of, silently reattaching it to the wrong function. CLAUDE.md gains a length budget in Code Style, and the "Maintaining This File" bullet no longer reads as an invitation to write essays in doc comments. Co-Authored-By: Claude <noreply@anthropic.com>
a286f0e to
06c440e
Compare
|
Showing two tips side-by-side is a UX regression. Things that can help:
|
@gtsiolis Should we only show the completion tip upon first launch and suppress the default tip (lstk status); i.e., enforcing max 1 tip? |
|
Enforcing max one tip would be great, that's why we added the tip rotation. Otherwise we will definitely end up with multiple tips listed as every new thing would race for attention. I remember opening PRO-245 few months ago specifically for promoting for auto-completion. Options to consider:
|
Good point. I can create a follow-up PR (EDIT: see draft here) and suppress other tips on first launch.
❓ How do we configure such short URLs ? Do we have an example? Regarding the other options:
I started designing such a solution, but reconsidered in favor of a simple approach (completion is also irrelevant for agents):
Thanks for sharing PRO-245 That could be a viable middle-ground. We'd need keep it in sync with the docs (https://docs.localstack.cloud/aws/developer-tools/running-localstack/lstk/#shell-completions) and do further testing (e.g., powershell instructions are missing). |
Motivation
Only Homebrew installs get shell completion set up automatically (
homebrew_casks.completions). npm and GitHub-release users have to find the docs themselves, so a shipped time-saving feature goes mostly unused.Solution
Emit one line after the first successful interactive start, pointing at
lstk completion [bash|zsh|fish|powershell]and the docs section:Two deliberate deviations from the ticket: the trigger is the first run, not install (no install path offers a usable hook — npm's
package.jsonis generated, apostinstallthat edits a shell rc is hostile and is skipped under--ignore-scripts, and binary installs have no hook), and it is a pointer, not a prompt — lstk never writes to the user's shell config. An automatedlstk completion --writewas designed and dropped in favour of this because the big complexity (cross-platform, cross-shell, cross-install-method) is not worth maintaining for a small gain.Needs no new persisted state:
firstRunmeans "config.toml was absent", and that same path creates the config, so the tip cannot repeat. Interactive-only, so CI and--jsonoutput are unchanged. Prefix and severity matchtipsForType, whose tip renders directly above it.The wording follows the
Verb ...: <command>shape the neighbouring tips already use.The
main_test.go/awsconfig_test.gopart of the diff is test plumbing: these tests isolateHOMEundert.TempDir()and start a real emulator, whose container writes root-owned files into the bind-mounted volume that Go'sTempDircleanup cannot delete on Linux.awsconfig_test.goalready solved this;scheduleVolumeCleanupextracts it so there is one copy rather than two.Manual testing
Screenshot from manual testing:
Docs
No documentation change needed — the tip points at the existing "Shell completions" section and adds no command, flag, or env var. Worth knowing that the CLI now links to that section directly, so the
#shell-completionsanchor should stay stable.Review
Human review advised — new user-facing output on the shared start path.
Todo
Closes DEVX-821