Send the real Shift state to the prediction worker - #915
Merged
Merged
Conversation
The worker saw only a yes/no shift flag, so Shift once and Shift locked both uppercased the whole suggestion: Shift once before "water" inserted "WATER". The keyboard now reports off, once or locked. Caps or Shift locked uppercase the whole completion and cancel each other as on typed letters. Before any letter of the word is typed, Shift once changes only the first letter, as it would the next typed letter, and a sentence start capitalises it without a modifier. After typed letters a pending Shift once is left for the next letter. Closes #907 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Lowering the first letter whenever it was not to be capitalised also lowered names like WhatsApp in an unmodified mid-sentence suggestion. Only an explicit Shift once flip lowers a first letter now. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <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.
Closes #907. First of the casing changes tracked in #914.
What changed
Shift::{Off, Once, Locked}instead of a boolean. This is the in-process pipe message only; no persisted schema or protocol changes.casedfunction inworker.rsdecides the suffix case in one place:docs/word-prediction.mddescribes the rule.Validation
Node 24.13.0, Rust 1.97.1:
npm run lint,npm test(244 Vitest tests and 5 Node tests) andnpm run buildpassed. No frontend files changed.cargo fmt --checkandcargo clippy --all-targets -D warningspassed.cargo testpassed: 566 tests.🤖 Generated with Claude Code