Repository navigation
Stop saving prefix-only mode when inline suggestions turn on - #475
Merged
Merged
Conversation
…rn on The options page wrote prefixOnlyMode=true when inline suggestions were on. ConfigAssembler already forces prefix-only mode while inline suggestions are on, so this write was not necessary. After the user turned inline suggestions off, the saved value kept prefix-only mode on, and predictions that use the text after the caret returned nothing. Now the page shows the checkbox as on without a write, and shows the user's value again when inline suggestions turn off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
getBackgroundContext waits 1000 ms for the Chrome service worker. If the worker starts slowly, Puppeteer throws "Timed out after waiting 1000ms". isRetriableBackgroundContextError did not match this message, so the wake-and-retry path did not run and the suite failed in beforeAll (local-ai.e2e, E2E Full chrome 1/2 on PR #475). Co-Authored-By: Claude Opus 5.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.
Summary
The options page saved
prefixOnlyMode=truewhen it loaded with inline suggestions on, and when the user turned inline suggestions on. After the user turned inline suggestions off, the saved value kept prefix-only mode on. Predictions that use the text after the caret (afterCursorTokenSuffix) then returned nothing.Why this fix
prefixOnlyMode || inlineSuggestion(ConfigAssembler.ts:159)..set(true). That call also saves the value. Its purpose was to show the box as locked, not to change the stored setting.Thus the page now stops the write and keeps only the runtime value.
Changes
applyInlineSuggestionLocks(src/ui/options/settings.ts): when inline suggestions turn on, the prefix-only checkbox shows as checked and disabled with a silent set (no write). When inline suggestions turn off, the checkbox shows the user's value again. AWeakMapkeeps that value for each control.tests/options.page.test.ts. It failed before the fix and passes now.Notes for reviewers
prefixOnlyMode=truesaved from this bug keep it. A migration cannot tell it from a value the user set on purpose, so there is none. These users must clear the checkbox one time.ConfigAssemblerforces prefix-only mode only from the global inline setting. A per-site inline override does not force it on that site.Test plan
bun run checkbun run test🤖 Generated with Claude Code