fix(cli): default logicsrc login to app.logicsrc.com - #107
Merged
Conversation
The default was the apex, which runs the marketing app -- so every path the CLI needs (/cli/device/code, /cli/device/token, /cli/authorize, /cli/token, /api/me) returns 404 there. Point it at the host that actually serves them. app.logicsrc.com is now a custom domain on the credentials service with a valid certificate, verified live: /cli/device/code returns 200 and issues a real user code, /api/me returns 401 rather than 404, which is routing working correctly for an unauthenticated request. The apex can forward these paths instead -- that is what the rewrites in apps/logicsrc-web/next.config.ts do -- but that needs a second service deployed to be true, while this needs nothing beyond the domain that already exists. The rewrites stay useful as a convenience; they are no longer load-bearing. $LOGICSRC_API still overrides, unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
ralyodio
added a commit
that referenced
this pull request
Jul 30, 2026
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>
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 CLI defaulted to the apex, which runs the marketing app — so every path it needs
404s there. This points it at the host that actually serves them.
Verified live
app.logicsrc.comis now a custom domain on the credentials service with a valid cert(
CN=app.logicsrc.com), and the flow genuinely works:vs
logicsrc.com/cli/device/code-> 404.Relationship to #106
#106 makes the apex forward these paths, which also works — but it needs
logicsrc-webdeployed with
CREDENTIALS_APP_URLset to be true. This needs nothing beyond the domainthat already exists. The rewrites remain useful as a convenience; they're just no longer
load-bearing.
$LOGICSRC_APIstill overrides, unchanged.The device flow currently returns:
That's #105 (make the URL follow the calling host) — merged but not deployed. Until the
pwa service redeploys,
logicsrc login --devicewill still print the raw Railway hostnameeven after this change lands. Nothing in this PR can fix that; it needs a deploy.
🤖 Generated with Claude Code