Commit graph

573 commits

Author SHA1 Message Date
Joshua Horton
e59e474923 Merge branch 'refactor/web/extract-duplicate-result-filter' into feat/web/correction-search-abstraction 2026-04-24 09:13:55 -05:00
Joshua Horton
7766c99273
change(web): explicitly import CorrectionResultMapping type
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-04-24 21:11:49 +07:00
Joshua Horton
f0c7084dc2 change(web): re-filter previously returned results 2026-04-24 08:52:47 -05:00
Joshua Horton
4dae9255e0
change(web): Apply EB suggestions from code review
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-04-24 20:40:15 +07:00
Joshua Horton
e819630c67 change(web): add 'type' for circular import (per AI review)
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-22 09:19:07 -05:00
Joshua Horton
8232cb3c1a fix(web): restore explicit interface implementation 2026-04-22 09:17:13 -05:00
Joshua Horton
4a4e996cb1 Merge branch 'refactor/web/extract-duplicate-result-filter' into feat/web/correction-search-abstraction 2026-04-22 09:16:59 -05:00
Joshua Horton
50cf4b997e fix(web): require helper argument required in main version of function
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-22 09:09:08 -05:00
Joshua Horton
6abf6ed08c fix(web): ensure newly-mapping result is returned from clusters 2026-04-22 09:08:46 -05:00
Joshua Horton
a4f392fb2a Merge branch 'refactor/web/extract-duplicate-result-filter-extended' into feat/web/correction-search-abstraction-extended 2026-04-21 16:56:27 -05:00
Joshua Horton
92bc44ef13 Merge branch 'change/web/fix-result-spaceId-remapping-extended' into refactor/web/extract-duplicate-result-filter-extended 2026-04-21 16:34:40 -05:00
Joshua Horton
8a430ca637 change(web): increase TokenResultMapping encapsulation to prevent .spaceId ambiguity 2026-04-21 16:27:55 -05:00
Joshua Horton
92b1387a29 change(web): add TokenResultMapping construction null guard 2026-04-20 17:00:30 -05:00
Joshua Horton
e9f0be4cb3 Merge branch 'refactor/web/extract-duplicate-result-filter' into feat/web/correction-search-abstraction
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-20 16:58:00 -05:00
Joshua Horton
2710b261d8 fix(web): undo accidental sign-change in extracted filter method
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-20 16:52:25 -05:00
Joshua Horton
a382b343e1 Merge branch 'change/web/return-search-token-mapping' into refactor/web/extract-duplicate-result-filter 2026-04-20 16:51:30 -05:00
Joshua Horton
3f6722e0a5 fix(web): constructor should also remap spaceId 2026-04-20 16:40:37 -05:00
Joshua Horton
6e1cb03bc4 Merge branch 'change/web/fix-result-spaceId-remapping' into change/web/return-search-token-mapping 2026-04-20 16:39:36 -05:00
Joshua Horton
f9ec855873 change(web): simplify search-result spaceId tagging + remapping
After using devin.ai to check some of my PRs, it caught something on #15817 that I was able to trace back to some decisions already in place for `TokenResultMapping`.  It appears best to simplify the type and its relation to spaceId-tagging now to simplify it, to prevent the bug, and to hopefully prevent re-implementing the bug in the future.

I did consider constructing new instances of SearchNode, just with the changed spaceId... but that may be prone to causing memory churn that can be avoided by just letting spaceId be public.

Build-bot: skip build:web
Test-bot: skip
2026-04-20 16:24:03 -05:00
Joshua Horton
6084bbe687 docs(web): add documentation for new search-related interfaces
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-09 16:48:18 -05:00
Joshua Horton
6cd518bc69 docs(web): add header comment to new file
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-09 16:40:24 -05:00
Joshua Horton
eaf419f960 feat(web): add abstraction for main correction-search algorithm, leveraged types
Build-bot: skip build:web
Test-bot: skip
2026-04-09 16:37:56 -05:00
Joshua Horton
3ae0e4cb8e refactor(web): extract token-search result duplicate-filtering method
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Build-bot: skip build:web
Test-bot: skip
2026-04-09 16:35:56 -05:00
Joshua Horton
b4b40bdea0 change(web): return token-correction mapping from search-oriented methods
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Build-bot: skip build:web
Test-bot: skip
2026-04-09 16:35:06 -05:00
Joshua Horton
77b8af29f7 refactor(web): move and rename SearchResult as TokenResultMapping
Build-bot: skip build:web
Test-bot: skip
2026-04-09 16:34:07 -05:00
Joshua Horton
04e6479299 refactor(web): extract buildAndMapPredictions as new prediction-helper
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Build-bot: skip build:web
Test-bot: skip
2026-04-09 15:57:17 -05:00
Joshua Horton
0e3368698d change(web): prepare suggestion-application for whitespace fat-finger handling
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Build-bot: skip build:web
Test-bot: skip
2026-04-09 15:46:20 -05:00
Joshua Horton
d1a4b69413 feat(web): implement tokenization convergence and associated unit test
Build-bot: skip build:web
Test-bot: skip
2026-04-09 15:36:50 -05:00
Joshua Horton
938d5ed002 refactor(web): split ContextState.analyzeTransition
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
The implementation of ContextState.analyzeTransition is rather long and large, comprised of multiple subsections.  We can get clearer, more maintainable code if we split it into multiple pieces - especially if we can do so in a manner that allows individual pieces to be unit-tested.

Also, with whitespace fat-finger handling coming up, special handling for applied suggestions may be needed.  This refactor may facilitate development of a suggestion-specialized variant.

Build-bot: skip build:web
Test-bot: skip
2026-04-09 15:29:55 -05:00
Joshua Horton
8c29ab0fbb fix(web): do not overwrite isPartial from parameter when clone-constructing
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-07 08:23:11 -05:00
Joshua Horton
92a67bee08 Merge branch 'refactor/web/create-default-keep' into change/web/context-token-init 2026-04-07 08:22:10 -05:00
Joshua Horton
e7d4b1e769 docs(web): patch up comments for prior commit's changes
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-07 08:21:36 -05:00
Joshua Horton
df097f3f1d change(web): reworks ContextToken construction patterns
Build-bot: skip build:web
Test-bot: skip
2026-04-06 11:52:34 -05:00
Joshua Horton
d285478319 refactor(web): spin off default keep-generation from suggestionSimilarity
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
This gives us smaller, more specialized methods - something that's usually a win of its own.  It will also help facilitate further adjustments needed for support of whitespace fat-finger prediction & autocorrection.

Build-bot: skip build:web
Test-bot: skip
2026-04-02 14:25:08 -05:00
Joshua Horton
74844bbd32
Update web/src/engine/predictive-text/worker-thread/src/main/correction/context-tokenization.ts
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-03-13 23:16:46 +07:00
Joshua Horton
41beca3664 refactor(web): split tokenization realignment from evaluateTransition
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
With the various ways that tokenizations can transition depending upon which potential inputs are applied, it's possible for multiple different tokenizations to transition into the same one. As such, there will no longer be "just one" way that a tokenization is reached.

Accordingly, it's best to perform word-boundary realignment operations (splits, merges) separately from text-editing operations (inserts, deletes).

Build-bot: skip build:web
Test-bot: skip
2026-03-12 12:34:50 -05:00
Joshua Horton
eb958fa4de fix(web): address most PR review concerns
Covers unit test names, describe => it for one case, and consistency in an error case between spurs and roots.
2026-03-11 08:14:58 -05:00
Joshua Horton
9bd3f68bc4 refactor(web): improve clarity and organization of search-graph root + legacy-spur unit tests
As the next work in line will introduce new, specialized spur types designed to replace the current 'legacy spurs', it is wise to clarify existing search-graph unit tests and which sections of the code they actually target.  We'll eventually drop behaviors specific to 'legacy' spurs, but those that apply to the new incoming specialized spur types should be preserved.

At the same time, it may be wise to improve the unit testing of each specific type by placing each within its own specialized unit-test suite, then adding new tests that test and clarify the role of each type.

Build-bot: skip build:web
Test-bot: skip
2026-03-10 11:00:33 -05:00
Joshua Horton
3a470085f8 fix(web): clarify check for infinite search-path cost
Build-bot: skip build:web
Test-bot: skip
2026-03-05 06:39:06 -06:00
Joshua Horton
b808b24aa0 fix(web): remove legacy-spur specific handling
The removed bits of code were already refactored into LegacyQuotientSpur's implementation.  They just... weren't removed from their original source.

There's a chance that the original removal got undone during a rebase, but either way, it's best to do this cleanup now, as this code would impact some of the specialized spur code coming up.

Build-bot: skip build:web
Test-bot: skip
2026-03-05 06:27:14 -06:00
Keyman Server
cf8f0e27a1
Merge branch 'epic/autocorrect' into auto/A19S23-merge-master-into-autocorrect 2026-02-27 08:24:59 +01:00
Joshua Horton
b7975973af maint(web): ensure Web build scripts handle paths with spaces properly
The command shortcuts that were used by Web
scripts to create bundles via `esbuild` were not
properly handling the $KEYMAN_ROOT path when it
contained a space.  These changes will rectify
this behavior and permit builds for such cases.

Build-bot: skip build:web
Test-bot: skip
2026-02-18 09:14:30 +07:00
Joshua Horton
56ea49c92a
Merge pull request #15031 from keymanapp/feat/web/cluster-splitting-and-merging
feat(web): implement SearchCluster splitting 🚂
2026-02-16 10:25:11 +07:00
Joshua Horton
89ede157b1
Merge pull request #15517 from keymanapp/change/web/prepare-for-divergent-splits
change(web): change .split() signature for handling divergent results 🚂
2026-02-16 10:24:56 +07:00
Joshua Horton
38adb953fa
Merge pull request #15516 from keymanapp/feat/web/cluster-merging
feat(web): implement SearchQuotientCluster merging 🚂
2026-02-16 10:24:48 +07:00
Joshua Horton
7828a4c380
Merge pull request #15478 from keymanapp/change/web/add-same-edge-detection
feat(web): add isSameNode for duplicate quotient-node detection 🚂
2026-02-16 10:24:39 +07:00
Joshua Horton
b72da04380
Merge pull request #15508 from keymanapp/feat/web/spur-edge-key
change(web): add .edgeKey for use + validation of complex .split cases 🚂
2026-02-16 10:24:31 +07:00
Joshua Horton
eaaee70289
Merge pull request #14949 from keymanapp/refactor/web/complex-search-space-reuse
refactor(web): begin implementation of quotient-path convergence via SearchQuotientCluster 🚂
2026-02-16 10:24:21 +07:00
Joshua Horton
71fcb02120 Merge branch 'change/web/prepare-for-divergent-splits' into feat/web/cluster-splitting-and-merging 2026-02-16 10:02:20 +07:00
Joshua Horton
690d77ac51 Merge branch 'feat/web/cluster-merging' into change/web/prepare-for-divergent-splits 2026-02-16 09:48:10 +07:00