Repository navigation
The Preferences page is always there, and asks the server when it opens - #9
Merged
Merged
Conversation
A person new to the editor found no scmjs.dev page under Edit ▸ Preferences ▸ Plugins, which is where the guide sends them to add their Anthropic key (scm-js/scm-js#285). The page was registered only once the plugin knew the server offers the AI or takes a key, and the plugin asks nothing of the network until the person does something, so in a fresh browser it never learned either and the page never appeared. Opening the Account dialog asked the server, and then it did. The page is now registered at activation. When it opens and the server has not been asked yet, it asks, saying so while it waits; it then shows the key field, the AI options, a line that the server offers no AI, or the error with Try again. Nothing reaches the network before the page is opened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VEdp4XLSS6SLyCTiqCw5FB
This was referenced Nov 17, 2026
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.
Fixes the cause of scm-js/scm-js#285: in a fresh browser, Edit ▸ Preferences ▸ Plugins had no scmjs.dev page, which is the first place the guide sends you to add an Anthropic key. It only appeared after the Account dialog had been opened.
Why. The page was registered only once the plugin knew the server offers the AI or accepts a key. The plugin doesn't touch the network until the person does something, so a new visitor's stored flags stayed false and the page never registered. The Account dialog asked the server, and then the page appeared and stayed.
Change.
plugin.ts: the options page is registered at activation, always.ai/options.ts: when the page opens and the server hasn't been asked yet, it asks (account.connect(), as the Account dialog does) and shows "Asking scmjs.dev what it offers…" meanwhile. It then shows the key field, the AI options, "The server offers no AI features at the moment", or the error with Try again.ko.ts.Checked.
npm run typecheckandnpm test(263 pass). In the editor with this source vendored, using a fresh headless Chromium profile:/v1/inforequest./v1/info:access.byok: trueshows the key field. Neither AI nor keys shows the "offers no AI" line. An unreachable server shows the error and Try again.After merge, it needs a version bump and tag, then a pin in the editor.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VEdp4XLSS6SLyCTiqCw5FB