Skip to content

Fix partial-word boundaries in inline completions - #3

Merged
seeARMS merged 2 commits into
mainfrom
seeARMS/fix-two-github-comments
Sep 6, 2026
Merged

Fix partial-word boundaries in inline completions#3
seeARMS merged 2 commits into
mainfrom
seeARMS/fix-two-github-comments

Conversation

@seeARMS

@seeARMS seeARMS commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Fixes #1.

Accepting a completion after The quick brow could save The quick brow n fox.... Ask the model for a completed sentence beginning with the exact existing prefix, then remove that prefix without trimming the insertion boundary. Partial words, normal word separators, existing spaces, apostrophes, and punctuation keep their correct placement. Rewritten or missing prefixes are ignored.

Validation:

  • Reproduced the original bug in Chromium before the fix: Tab saved The quick brow n fox jumps over the lazy dog.
  • All 11 browser regression tests passed against the production build. These control only the model response and drive the real editor, ghost text, Tab/Escape handlers, and saved-draft reload. Includes consecutive spaces, contractions, punctuation, and word-limit clipping.
  • Drove Chrome with its real Gemini Nano: typed The quick brow, accepted the ghost text with Tab, and confirmed The quick brown fox jumps over the lazy dog. persisted after reload.
  • npm run typecheck, npm run build, and git diff --check passed.

Adds reproducible Playwright tests and runs them in CI. Model wording remains nondeterministic; the parser requires the existing prefix to remain unchanged before showing a suggestion.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 6, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
draftside 3132f4c Sep 06 2026, 04:54 PM

@seeARMS
seeARMS merged commit bcaa03b into main Sep 6, 2026
1 of 2 checks passed
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.

Completions may insert a space for partially written words

1 participant