Repository navigation
fix(cli): Warm completion caches after the setup auto-login - #1789
Merged
Merged
Conversation
On a fresh curl install, setup warmed attribute keys before its optional login stored a token, so that warm-up did nothing and field completion stayed empty. Move the post-login warm-up (org list, then attribute keys) into completion-warmup.ts and run it after setup's auto-login too, unless completions are disabled.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
BYK
approved these changes
Nov 1, 2026
This branch was previously deployed
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.
Follow-up to #1788, addressing Warden's finding that landed after the merge.
On a fresh curl install,
cli setupwarms attribute keys before its optional auto-login stores a token. That warm-up exits early because no one is logged in yet.runInteractiveLogin()then succeeds without warming anything, so field completion stays empty on the main first-install path. The org/region cache is also empty at that point, sopickWarmupOrgs()would find nothing to warm anyway.The fix:
warmCachesAfterLogin()(list orgs with a 1s cap, then warm attribute keys) fromauth/login.tsintolib/completion-warmup.ts.--no-completionsis set.auth loginbehaves the same as before.test/lib/completion-warmup.test.ts, next to a success-path test. Adds setup tests for the auto-login warm-up with completions on and off.Verified with
oxlint,oxfmt --check,tsc --noEmit, and thecompletion-warmup,commands/cli, andcommands/authsuites (434 passed, 3 skipped).--
View Session in Sentry