feat(web): implement dedicated substitution-spur class, tests 🚂 🔪#15688
Merged
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
b0724e2 to
c5f9b66
Compare
1183bcc to
360c0ae
Compare
c5f9b66 to
91cf42e
Compare
cfc8d96 to
816fac7
Compare
8800920 to
c9b2859
Compare
816fac7 to
adcb188
Compare
b227e9e to
d71345c
Compare
adcb188 to
7d2544f
Compare
00f361b to
856466e
Compare
…-legacy splits, merges
086713a to
77b22a2
Compare
Base automatically changed from
feat/web/quotient-node-finalizer
to
epic/autocorrect
May 5, 2026 19:53
ermshiperete
reviewed
May 6, 2026
| it('constructs paths properly', () => { | ||
| const {searchRoot, nodes} = buildQuotientDocFixture(); | ||
|
|
||
| [searchRoot /*, nodes.sc1, nodes.sc2*/].forEach((n) => { |
Contributor
There was a problem hiding this comment.
Why do we have the commented nodes in these tests?
Contributor
Author
| // const sc1 = new InsertionQuotientSpur(searchRoot); | ||
| // const sc2 = new InsertionQuotientSpur(sc1); | ||
|
|
||
| // // K1C0 |
Contributor
There was a problem hiding this comment.
Do we have to keep the commented code?
Contributor
Author
|
Is this ready to go aside from the file header? Ignore the failed unit test - it's fixed in the next PR - #15911. |
ermshiperete
approved these changes
May 21, 2026
Contributor
yep. LGTM. Note the failed build/test though... |
ermshiperete
approved these changes
May 29, 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.
This PR implements a strictly substitution-edit-edge variant of
SearchQuotientSpur, which is one of the three specialized spur types needed to implement a proper "quotient graph" representation of the text-correction search space as documented at https://github.com/keymanapp/keyman/blob/8ac271788d56b04ee98a7a95d0191e6726220d52/web/src/engine/predictive-text/worker-thread/docs/correction-search-graph.md.To contrast, the
LegacyQuotientSpurtype we've been using does all three at once, which makes it impossible to meet our needs for word-boundary correction processes. (Again, see the doc linked above.)This PR also shifts many unit test fixtures from a
LegacyQuotientSpurimplementation to aSubstitutionQuotientSpurimplementation, as the related tests were generally designed with only the substitution aspect in mind.Build-bot: skip build:web
Test-bot: skip