Commit graph

987 commits

Author SHA1 Message Date
Marc Durdin
f0fb18a853
Merge pull request #16582 from keymanapp/maint/web/build-perf
maint(web): improve build perf and test params
2026-09-29 11:04:09 +02:00
Marc Durdin
3c90c732e1 chore(android): remove unused map-polyfill.js and es6-shim.min.js polyfills
These files were copied in but never referenced in 19.0 source.

Fixes: #16583
Test-bot: skip
2026-09-23 11:25:13 +02:00
Joshua Horton
bf98a2f03b
Merge pull request #16600 from keymanapp/change/web/lexically-weight-prediction-search
change(web): add lexical weighting to prediction search
2026-09-21 21:50:24 +07:00
Joshua Horton
00a9b66b01
Merge pull request #16581 from keymanapp/change/web/remove-tokenization-corrector
change(web): remove TokenizationCorrector class only used in epic/boundary-correction
2026-09-18 20:08:35 +07:00
Joshua Horton
013def7d9c change(web): add lexical weighting to prediction search
Fixes: #16577

From 14.0 up until now, our correction-search focused on the minimum "correction distance" to a possible text _correction_, then performed prediction _on top of that_.  This PR changes the search to integrate word-frequency weighting from models within the search, allowing us to optimize for the most likely predictions.  There is no additional performace cost impact of note here - the probability associated with a correction's best prediction is already accessible O(1) with operations we've already been doing.

It is likely that this will help further mitigate issues with transposition handling noted in the user tests for #16450.

Build-bot: skip release:web,android,ios
2026-09-17 16:30:50 -05:00
Eberhard Beilharz
7b2f275eb1
Merge pull request #16524 from keymanapp/fix/web/16080_kbdoff
fix(web): allow to set default keyboard to 'off'

The parameters for setKeyboardForControl basically have three different modes: - an id of a keyboard/language to set that keyboard, enabling independent keyboard mode - empty string to set the system keyboard, enabling independent keyboard mode - null to disable independent keyboard mode.

Our previous code didn't properly handle the last two modes. This change fixes the problems and also clarifies and updates the documentation.

Also included is an improvement to the guide-examples e2e tests that now wait until all keyboards are loaded (which may fix #16167).

Partially drafted by kilo.ai.

User tests will follow in an upcoming PR for #16522.

Fixes: #16080
2026-09-17 17:25:24 +02:00
Marc Durdin
d850c913b9 maint(web): improve build perf and test params
Allow for additional parameters to mocha (e.g. `-f testname`) and remove
unnecessary build steps; tidy up android-harness build script.

Test-bot: skip
2026-09-17 07:22:46 +02:00
Joshua Horton
115f2dba20 change(web): remove TokenizationCorrector class only used in epic/boundary-correction
Build-bot: skip build:web
Test-bot: skip
2026-09-16 16:53:55 -05:00
Joshua Horton
13ae31e2e6
Merge pull request #16450 from keymanapp/fix/web/support-transposition-autocorrect
fix(web): support autocorrection of transposed text
2026-09-17 01:33:19 +07:00
Joshua Horton
24060dbbc8 change(web): enhance unit test to help ensure transpositions aren't accidentally ignored
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-09-15 10:41:46 -05:00
Eberhard Beilharz
835f226aba
test(web): add e2e tests for independent/global mode
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-09-14 17:58:41 +02:00
Joshua Horton
91c36f3998 feat(web): add failed model-load recovery unit test 2026-09-10 11:06:10 -05:00
Eberhard Beilharz
4d7867e61c fix(web): allow to set default keyboard to 'off'
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
The parameters for `setKeyboardForControl` basically have three
different modes:
- an id of a keyboard/language to set that keyboard, enabling independent
  keyboard mode
- empty string to set the system keyboard, enabling independent keyboard
  mode
- `null` to disable independent keyboard mode.

Our previous code didn't properly handle the last two modes. This change
fixes the problems and also clarifies and updates the documentation.

Also included is an improvement to the guide-examples e2e tests that now
wait until all keyboards are loaded (which may fix #16167).

Partially drafted by kilo.ai.

Fixes: #16080
Build-bot: skip release:web
2026-09-08 11:56:41 +02:00
Joshua Horton
60f5effe6e change(web): add transposition unit tests, loosen search correction thresholding 2026-09-04 16:50:56 -05:00
Eberhard Beilharz
53540cc826
chore(web): adjust types 2026-09-03 18:25:05 +02:00
Eberhard Beilharz
58dbb3d1ee
refactor(web): clarify scope of PageContextAttachment functions
Also refactor function comments to follow the style we usually use,
and rename some parameters.

Build-bot: skip build:web
Test-bot: skip
2026-09-03 16:46:56 +02:00
Joshua Horton
78e3d509f4 Merge branch 'master' into fix/web/support-transposition-autocorrect 2026-09-03 09:44:18 -05:00
Joshua Horton
b665a19e7a
Merge pull request #16436 from keymanapp/change/web/narrow-autoselection-comparisons
change(web): narrow the range of suggestions examined to determine autocompletion
2026-09-03 20:16:56 +07:00
Joshua Horton
b659a287fb
Merge pull request #16429 from keymanapp/change/web/stage-correctpredicttuple-construction
change(web): stage construction of CorrectionPredictionTuple instances
2026-09-03 20:16:35 +07:00
Eberhard Beilharz
359c9270aa
chore(web): add explanations why test page only works on local test server 2026-09-03 11:16:15 +02:00
Eberhard Beilharz
9d2b9bc1ff
Update web/src/test/manual/web/keyboard-errors/index.html
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-09-03 09:22:11 +02:00
Eberhard Beilharz
a570108f85
chore(web): allow to run keyboard-errors test from build server
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-09-02 19:34:00 +02:00
Eberhard Beilharz
67c7bfe953
chore(web): adjust expected error message in manual test
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-09-02 15:23:30 +02:00
Eberhard Beilharz
7a61311147
chore(web): tweak error message
Previously the browser component and web engine had the same error message
which made it harder to know where the exception happened if a call stack
or source map were missing. This change modifies the message in engine.

Related-to: $#16190
Build-bot: skip release:android,ios,web
Test-bot: skip
2026-09-01 17:29:41 +02:00
Joshua Horton
45e3df9822 fix(web): support autocorrection of transposed text
Fixes: #16398
Fixes: #12311

Note:  will not handle transpositions that cross token boundaries.
Also note:  major changes will be needed for epic/boundary-correction, as it will discontinue use of the LegacyQuotientSpur type.

Build-bot: skip release:web,android,ios
2026-08-27 12:28:18 -05:00
Joshua Horton
c278c3601f change(web): narrow the range of suggestions examined to determine autocompletion
Build-bot: skip build:web
2026-08-25 10:48:54 -05:00
Joshua Horton
0e41273465 change(web): stage construction of CorrectionPredictionTuple instances
Build-bot: skip build:web
Test-bot: skip
2026-08-24 13:36:49 -05:00
Eberhard Beilharz
f07e05fb15
chore(web): skip guide-examples.tests.ts until race is fixed
The guide-examples.tests.ts have a race so that they occasionally fail
(#16167). This change disables the tests until we have a fix in place.

Related-to: #16167
Build-bot: skip build:web
Test-bot: skip
2026-08-24 11:43:39 +02:00
Joshua Horton
5a7b7118ff
Merge pull request #16314 from keymanapp/change/web/match-fatfingers-by-element-ids
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
change(web): lookup key-data via elementID, not reference, during fat-finger generation 🚂
2026-08-17 19:05:51 +07:00
Keyman Server
90c10d5f34
Merge branch 'epic/autocorrect' into auto/A19S35-merge-base-into-autocorrect 2026-08-14 16:18:38 +02:00
Marc Durdin
85d7b398bc chore(web): add test for versionInfo.full
Test-bot: skip
2026-08-13 08:40:21 +02:00
Joshua Horton
25f6e6694e Merge branch 'epic/autocorrect' into change/web/match-fatfingers-by-element-ids 2026-08-12 12:38:39 -05:00
Marc Durdin
f1361a94f0 feat(web): add keyman.versionInfo API
KeymanWeb has long had `keyman.build` and `keyman.version`. Neither of
these properties expose the full version string, and consumers are
forced to manipulate them to get a partial version string.

This change deprecates both these properties, and introduces a new
`keyman.versionInfo` property, which returns an object with all the
version information, most importantly `full`.

Update documentation and add a unit test for this, following the unit
test pattern established throughout Keyman of a unit test filename
matching the implementation class. The `KeymanEngineBase` class is a
little difficult to instantiate so this unit test module currently has
a minimal instantiation which provides enough to fulfill the one
included test.

Test-bot: skip
2026-08-12 11:07:31 +02:00
Joshua Horton
ce0df801e7 fix(web): fix complex backspace handling, add unit tests
Fixes: #16335

The new unit tests here caught the behavior addressed by this PR's predecessor, #16349.

Meanwhile, a _different_ behavior was noted here that had added complexity - it so happens the test case I constructed managed to catch a bug in backspace handling!  Fortunately, a small tweak was able to resolve the issue.

Build-bot: skip build:web
Test-bot: skip
2026-08-11 17:26:57 -05:00
Joshua Horton
b4c9b40916 fix(web): annotate transition ID on reconstructed context tokens
Build-bot: skip build:web
Test-bot: skip
2026-08-11 17:17:38 -05:00
Joshua Horton
dd0bf09cfd change(web): lookup key-data via elementID, not reference, during fat-finger generation
Build-bot: skip release:web release:android

Relates-to:  #16254
Relates-to:  #16313

Noting that similar issues to those fixed by #16313 have occurred in other gesture-related contexts, it seems wise to implement the same sort of fix for all gesture types - perhaps the Android WebView has its own circumstances where similar "reference replacements" may occur and throw off our internal key-matching logic.
2026-08-07 15:27:32 -05:00
Joshua Horton
2d59915030 fix(web): fix construction for suggestions emitted after left-deleting whitespace
Build-bot: skip release:web release:android
2026-08-05 10:52:36 -05:00
Joshua Horton
433f4ea90f
Merge pull request #16298 from keymanapp/feat/web/add-pred-text-unit-tests
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
feat(web): add new pred-text unit test cases 🚂
2026-08-04 20:33:16 +07:00
Joshua Horton
c6b55c5fcc
Merge pull request #16290 from keymanapp/fix/web/bksp-reconstruction
fix(web): restore backspace-input token reconstruction 🚂
2026-08-04 20:07:36 +07:00
Joshua Horton
04a75adef6 feat(web): add new pred-text unit test cases
Adds unit tests to cover context-reset patterns
and to ensure that transition IDs are always set
properly on generated suggestions, for all model
types.

Build-bot: skip build:web
Test-bot: skip
2026-08-03 12:54:57 -05:00
Joshua Horton
67b26cb643
Merge pull request #16273 from keymanapp/fix/web/empty-prediction-cases
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
fix(web): improve prediction whitespace-input, backspace-input edge case handling 🚂
2026-07-30 23:24:12 +07:00
Joshua Horton
e1f143a619 fix(web): fix unit test issues from last commit
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-07-30 11:23:48 -05:00
Joshua Horton
f2e160c232 feat(web): add unit tests for prior commit
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-07-28 12:01:03 -05:00
Joshua Horton
f864bf293a change(web): spin off method, add unit tests to verify handling of keep vs revert suggestions
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-07-27 12:11:50 -05:00
Joshua Horton
e225b26f10 change(web): add unit tests for issues fixed by this PR
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-07-23 15:52:53 -05:00
Keyman Server
c2a3fd8d7d
Merge branch 'epic/autocorrect' into auto/A19S33-merge-master-into-autocorrect 2026-07-20 07:26:08 +02:00
Marc Durdin
0e076d5389 chore(web): declare scope for stubAndKeyboardCache members
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Also remove redundant `fetchKeyboardForStub` function, as it had only a
single use (and was not unit tested directly).

Test-bot: skip
2026-07-11 14:47:32 +02:00
Joshua Horton
f3e0f0bfd5
Merge pull request #16123 from keymanapp/fix/web/block-keep-autoaccept
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
fix(web): do not auto-select model-matching keep suggestions 🚂
2026-07-09 21:27:09 +07:00
Joshua Horton
21c43452e0
Merge pull request #16209 from keymanapp/fix/auto-test-cookies-and-paths
fix(web): fixes cookie unit-tests and path for OSK resources during testing
2026-07-09 00:45:43 +07:00
Joshua Horton
81b0c0b706 fix(web): fixes cookie unit-tests and path for OSK resources during testing
Build-bot: skip build:web
Test-bot: skip
2026-07-06 11:13:24 -05:00