fix(pwa): the CLI hint printed commands that no longer run - #110
Merged
Conversation
The "Connect the CLI" card handed out:
LOGICSRC_API=https://app.logicsrc.com logicsrc login
logicsrc teams push <team> prod --env .env
logicsrc teams pull <team> prod --env .env
Two things are wrong with that, and both survived a release.
Since #109 addressed vaults as <team> <project> <env>, push and pull take
three positionals. The hint passes two, so pasting it exits with a missing-
argument error -- the card is not merely stale, it is broken.
The LOGICSRC_API prefix sets the variable to the value the CLI already
defaults to (DEFAULT_API_URL, #107), so on the hosted app it does nothing
while reading like a required step. It is now emitted only when the origin
is not the default, which is the case it exists for: self-hosting.
`--env .env` is dropped for the same reason -- it restates the option's own
default, and sitting next to the new <env> positional it made one flag and
one argument look like the same thing.
Same stale two-argument form fixed in the post-install hint (install.sh) and
the accept-invite message, and in the empty-vault-list prompt on the card.
CLI_HINT moves to src/lib/cli-hint.mjs so a test can assert on the rendered
commands without standing up express and the database, matching how the
other lib-level views are covered. The tests pin the argument count rather
than the prose: restyling the card stays free, dropping an argument does not.
apps/pwa: 13/13 pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
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.
The teams dashboard's "Connect the CLI" card was handing out commands that fail on paste.
Wrong arity. Since #109 addressed vaults as
<team> <project> <env>,push/pulltake three positionals. The hint passes two, so it exits with a missing-argument error.Redundant prefix.
LOGICSRC_API=https://app.logicsrc.comsets the variable toDEFAULT_API_URL(#107) — a no-op on the hosted app that reads like a required step. Now emitted only when the origin isn't the default, i.e. the self-hosted case it exists for.--env .envrestates the option's own default, and next to the new<env>positional it made a flag and an argument look like one thing. Dropped.Same stale two-arg form also fixed in
install.sh's post-install hint, the accept-invite message, and the empty-vault prompt on the card.CLI_HINTmoves tosrc/lib/cli-hint.mjsso it can be tested without booting express + the database, matching how the other lib-level views are covered.Verification
apps/pwa: 13/13 pass (9 pre-existing + 4 new).logicsrc login; self-hosted →LOGICSRC_API=http://localhost:8080 logicsrc login.node --checkonpages.mjs,bash -noninstall.sh.docs/credential-sharing.mdhits are already the correctacme web prod.The new tests assert the argument count, not the prose, so restyling the card stays free while dropping an argument fails CI.
🤖 Generated with Claude Code