fix(vscode): keep sign-in reachable from the no-models screen - #2393
Open
wbxl2000 wants to merge 3 commits into
Open
fix(vscode): keep sign-in reachable from the no-models screen#2393wbxl2000 wants to merge 3 commits into
wbxl2000 wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: d8376a4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
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.
Related Issue
No linked issue — the problem is explained below (reported by a user: after installing the extension, the authorization/sign-in UI could not be opened; workaround was to quit VS Code, log in via the CLI, and reopen the extension).
Problem
A brand-new user's first sign-in can end in a state where the extension believes they are logged in but has zero models:
config.toml) then fails — e.g. a transient network or server error. On a first login this failure is surfaced without the retry path that later logins enjoy.Existing users never hit this because their models were provisioned long ago; logging in via the CLI escapes the trap by writing
config.tomlexternally, which matches the reported workaround.What changed
resolveAppViewfunction and made theno-modelsstatus always resolve withcanGoToLogin: true.App.tsxnow keeps an explicitshowLoginstate so the sign-in screen is reachable from the no-models screen, and wires the existingonBackToLoginaffordance of the error screen into that path (the component already supported it; only the skipped-login branch passed it before).test/app-init.test.tscovering the routing, including a regression case for the no-models trap.vsix-verify.mjs), which mistook bundledthis.require("...")class method calls (from the engine's host-environment service) for bare CommonJS runtime dependencies and therefore failed everyvsix-packagerun; added a regression test intest/vsix-package.test.ts.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.