Joshua Horton
063054a592
refactor(web): relocate textToCharTransforms method
2025-07-30 12:09:26 -05:00
Joshua Horton
e0c553d306
change(web): appliedSuggestionId should be undefined, not -1, when none are applied
2025-07-30 09:22:09 -05:00
Joshua Horton
0ceffce32e
refactor(web): refactor ContextToken and usage pattern
...
Also places the class within its own separate source file.
This PR's changes aim to meet our _current_ needs while moving much closer to the design specified within the [Correction-Search + Context-Tracking design doc](https://docs.google.com/document/d/1RYwgW8zI8A7VLMq40BpWYkfJJQ-i6K0MIs4QcAMxglE/edit?tab=t.0 ).
2025-07-30 09:22:03 -05:00
Joshua Horton
145f34f434
Merge pull request #14384 from keymanapp/change/web/split-suggestion-transforms
...
change(web): split suggestion transforms into main-body + appended (whitespace) transforms 🚂
2025-07-24 22:00:03 +07:00
Joshua Horton
c4e0faa101
Merge pull request #14365 from keymanapp/refactor/web/attempt-match-context
...
refactor(web): rework `attemptMatchContext` to use new `attemptTokenizedAlignment` method 🚂
2025-07-24 21:59:48 +07:00
Joshua Horton
521aae9709
Merge pull request #14364 from keymanapp/refactor/web/attempt-tokenized-alignment
...
refactor(web): new method - attemptTokenizedAlignment 🚂
2025-07-24 21:59:38 +07:00
Joshua Horton
3c36ee2e73
change(web): fix typo (per PR review)
...
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2025-07-24 20:38:03 +07:00
Joshua Horton
7e88fa2c41
docs(web): enhance doc-comment for getEditPathLastMatch
...
Per review request by @ermshiperete
2025-07-23 13:43:26 -05:00
Joshua Horton
0f3130fbd4
fix(web): properly apply Transforms in sequence
...
Thanks to a PR review that caught an accidental restart that hid one of the Transforms
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2025-07-22 23:48:37 +07:00
Joshua Horton
f264fca881
change(web): split suggestion transforms into main-body + appended (whitespace) transforms
2025-07-21 15:57:28 -05:00
Joshua Horton
cd59e1fffb
fix(web): correct typo in unit test name
...
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2025-07-21 22:12:17 +07:00
Joshua Horton
a1c10de821
refactor(web): reworks attemptMatchContext to use new attemptTokenizedAlignment method
...
Following from #14364 , this PR integrates the new method with the main predictive-text context-tracking code, significantly reworking the `attemptMatchContext` method in the process. While further refactoring of the latter method is planned, this step allows us to verify that the new methods integrate properly with the main codebase in their current form.
This also comes with the benefit of simplifying `attemptMatchContext` _significantly_ - large parts of its code were refactored into `attemptTokenizedAlignment`, and the new logic patterns are generally more straightforward to parse and understand.
2025-07-15 14:16:51 -05:00
Joshua Horton
8c052968ae
refactor(web): new method - attemptTokenizedAlignment
...
Following from #14363 , this method performs context alignment calculations that may be
used to match forms of the context before and after an edit by aligning their tokens and
validating any edits that may have occurred.
Note that no 'tracked context' states are manipulated or altered by this method - it
solely calculates the alignment deltas needed to align the two contexts. Other methods
may then take these values and determine the edits that occurred during the associated
context transition as needed.
Note that the `attemptTokenizedAlignment` method is not integrated into the main codebase
for the predictive-text worker at this time. That said, this method _does_ integrate
the `isSubstitutionAlignable` method introduced by #14363 .
2025-07-15 13:55:21 -05:00
Joshua Horton
9bbed384e6
feat(web): adds isSubstitutionAlignable to assist validating context matches after edits
...
This adds one new method within the predictive-text worker space: isSubstitutionAlignable. The method is designed to report whether or not two words are "related enough" to consider as an appropriate word-level "substitution" when matching the incoming context against previously-seen contexts - a process useful for facilitating delayed reversions, among other things.
It is not yet integrated with the main body of worker code, however.
2025-07-15 13:41:38 -05:00
Joshua Horton
606c7e7767
change(web): do not set deleteRight when merging Transforms without it
2025-07-10 09:17:12 -05:00
Marc Durdin
31c55159c3
Merge branch 'epic/autocorrect' into chore/merge-master-into-autocorrect
2025-05-30 08:23:56 +07:00
Marc Durdin
48d61b9b03
Merge branch 'epic/autocorrect' into chore/merge-master-into-autocorrect
2025-05-16 12:12:05 +07:00
Joshua Horton
155c1a2b12
maint: update mocha
...
Some of the npm audit warnings left after #13897 require an updated `mocha` version to remedy. As we only really use `mocha` to do unit-testing, it should be safe to update if all of our existing tests pass with the new version.
Test-bot: skip
2025-05-13 14:02:02 +07:00
Joshua Horton
a783fbc902
maint(web): also fixes worker-thread inspectable browser test call
2025-05-13 12:44:26 +07:00
Joshua Horton
1438704ee0
Merge pull request #13819 from keymanapp/maint/web/use-builder_is_ci_build
...
chore(web): replace --ci flag with builder_is_ci_build
2025-05-06 08:16:37 +07:00
Joshua Horton
e382bf45ce
Merge pull request #13785 from keymanapp/change/web/drop-usvstring-alias
...
change(web): replace USVString with string in predictive-text engine
2025-05-06 08:16:28 +07:00
Joshua Horton
cb5e3035a7
chore(web): replace --ci flag with builder_is_ci_build
...
Fixes : #12640
2025-05-02 09:39:39 +07:00
Joshua Horton
e601d59b59
change(web): replace USVString with string in predictive-text engine
...
Fixes : #12046
It was only ever an alias (for `string`!) for its intended use, with actual `USVString` typing being unavailable in the browser.
2025-04-29 10:47:20 +07:00
Joshua Horton
dc450cde9e
chore(web): finalize removal of side-effect KMWString implementation
2025-04-22 11:40:57 +07:00
Joshua Horton
f8ea902fd9
refactor(web): refactor _kmwCharAt
2025-04-22 11:40:57 +07:00
Joshua Horton
70c1920854
refactor(web): refactor _kmwSlice, _kmwSubstr, _kmwSubstring
2025-04-22 11:40:57 +07:00
Joshua Horton
418f3d6aec
chore(web): update all Web engine uses of kmwLength, kmwCodePointToCodeUnit, kmwCodeUnitToCodePoint
2025-04-22 10:17:07 +07:00
Marc Durdin
29f0a20898
Merge branch 'epic/autocorrect' into chore/merge-master-into-autocorrect
2025-03-14 10:57:26 +07:00
Marc Durdin
a43a378be7
Merge pull request #13222 from keymanapp/chore/merge-master-into-autocorrect
...
chore: merge master into autocorrect 🚂
2025-02-14 05:29:34 +07:00
Joshua Horton
b2598e76ba
chore(web): fix coverage-reporting artifact
...
Fixes : #13195
2025-02-12 15:56:54 +07:00
Joshua Horton
0e7b47e075
Merge pull request #12927 from keymanapp/fix/web/context-match-applied-suggestions
...
fix(web): correctly track context transitions caused by applying suggestions 🖲️
2025-02-03 15:11:01 +07:00
Joshua Horton
3c7ae5d7f6
Merge pull request #12925 from keymanapp/fix/web/context-match-path-ordering
...
fix(web): correct edit-path ordering at source 🖲️
2025-02-03 15:10:50 +07:00
Joshua Horton
316395a180
Merge pull request #12911 from keymanapp/change/web/context-tracker-backspaces-and-alignment
...
change(web): add context tracker bksp handling, alignment-offset calculations 🖲️
2025-02-03 15:10:36 +07:00
Marc Durdin
74db3c9833
Merge branch 'epic/autocorrect' into chore/merge-master-into-autocorrect
2025-01-30 18:50:17 +07:00
Joshua Horton
e97cd3094f
fix(web): disabled correction state should prevent predictive corrections
...
Fixes : #12214
2025-01-29 10:12:53 +07:00
Joshua Horton
ce705500d7
chore(web): better cloning of cloned object's values
2025-01-22 08:27:20 +07:00
Joshua Horton
d9058adfae
Merge pull request #12930 from keymanapp/chore/merge-master-into-autocorrect
...
chore: merge master into autocorrect 🚂
2025-01-21 09:49:28 +07:00
Joshua Horton
44cb4044df
fix(web): clone token replacement arrays properly
2025-01-21 09:06:27 +07:00
Joshua Horton
5a0e6a3b01
change(web): minor tweak in constructor for clarity
2025-01-21 09:04:52 +07:00
Joshua Horton
54e2e70c23
Merge pull request #12877 from keymanapp/change/web/prevent-autocorrect-for-numbers
...
change(web): add auto-correct filter that requires letter in initial position 🚂
2025-01-20 15:41:32 +07:00
Joshua Horton
5633b9ca36
fix(web): track shifts in context across applied suggestions
2025-01-17 10:40:56 +07:00
Joshua Horton
9b48385095
fix(web): correct edit-path ordering at source
2025-01-17 10:26:01 +07:00
Joshua Horton
817adffc70
fix(web): prevent array aliasing during context-token cloning
2025-01-17 10:15:18 +07:00
Joshua Horton
d798083c76
feat(web): track token shift counts during context tracking
2025-01-16 10:58:32 +07:00
Joshua Horton
e61e79e01b
change(web): enable context-tracker matching to track across backspaces
2025-01-16 10:56:45 +07:00
Joshua Horton
84875cdc6e
change(web): simplify context-tracker token cloning
2025-01-16 10:52:30 +07:00
Joshua Horton
bf9b601d7a
change(web): keep transform pattern should match standard suggestion format
2025-01-16 08:36:23 +07:00
Joshua Horton
9796ab32a5
chore(web): apply suggestion from code review
...
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-01-14 08:03:20 +07:00
Joshua Horton
ea466d7e5d
change(web): adds auto-correct filter, requiring letter in existing text
2025-01-13 10:30:00 +07:00
Joshua Horton
064d753653
fix(web): better bad-context match handling due to tokenization shifts
...
Fixes : #12494 .
2025-01-09 09:48:40 +07:00