Skip to content

Stop saving prefix-only mode when inline suggestions turn on - #475

Merged
bartekplus merged 2 commits into
masterfrom
claude/vibrant-kirch-ef2ae9
Oct 5, 2026
Merged

bartekplus merged 2 commits into
masterfrom
claude/vibrant-kirch-ef2ae9

Conversation

@bartekplus

Copy link
Copy Markdown
Owner

Summary

The options page saved prefixOnlyMode=true when 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

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. A WeakMap keeps that value for each control.
  • The "Accept with Tab key" and "Number of predictions" locks do not change. Nothing at runtime forces those settings, so the saved values are still necessary.
  • New regression test in tests/options.page.test.ts. It failed before the fix and passes now.

Notes for reviewers

  • Users who already have prefixOnlyMode=true saved 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.
  • Not changed: ConfigAssembler forces 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 check
  • bun run test
  • Manual check on the options page (not done)

🤖 Generated with Claude Code

…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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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>
@bartekplus
bartekplus merged commit 421f5a4 into master Oct 5, 2026
13 checks passed
@bartekplus
bartekplus deleted the claude/vibrant-kirch-ef2ae9 branch October 5, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant