Commit graph

1944 commits

Author SHA1 Message Date
Joshua A. Horton
b2b088ac6e fix(web): show reversion after backspace following key-based auto-apply 2024-06-27 10:22:43 +07:00
Joshua A. Horton
017d0e4521 feat(web): apply auto-correct suggestions when applicable 2024-06-27 09:51:31 +07:00
Joshua A. Horton
7bda1e5d93 feat(web): determine suggestion to use for auto-correct 2024-06-27 09:51:30 +07:00
Joshua A. Horton
60772bfdfa chore(web): minor cleanup after generalizing fix with prior commit 2024-06-27 09:50:40 +07:00
Joshua A. Horton
34986503c9 fix(web): patch-up automated tests that utilize dummy models
The dummy model never set a prediction's probability on the suggestion, so it never emitted p, lexical-p, or correction-p values before this branch's changes.
2024-06-27 09:49:09 +07:00
Joshua A. Horton
ba5b0f6c91 change(web): track the base correction when generating predictions 2024-06-26 14:48:50 +07:00
Joshua A. Horton
ef7d87ace1 refactor(common/models): moves TS priority-queue implementation to web-utils 2024-06-21 15:02:52 +07:00
Joshua Horton
b782800de1
Merge pull request #11263 from keymanapp/change/web/keyboard-preprocess-optimization
change(web): optimization for keyboard-layout preprocessing 
2024-06-21 11:22:50 +07:00
Joshua A. Horton
8841dd9ee2 chore(web): define common timeout variable for automated testing
Fixes: #11499
2024-06-20 11:43:11 +07:00
Joshua A. Horton
9c79aa4f65 chore(web): Merge branch 'master' into change/web/keyboard-preprocess-optimization 2024-06-19 15:21:14 +07:00
Joshua Horton
e4b0d1859c
Merge pull request #11784 from keymanapp/feat/web/interruptible-predictions
feat(web): improve predictive-text responsiveness when typing rapidly 🕐
2024-06-19 14:54:14 +07:00
Joshua Horton
342ffd82fa
Merge pull request #11758 from keymanapp/refactor/web/prediction-execution-timer
refactor(web): overhaul predictive-text engine's timer to better detect paused time 🕐
2024-06-19 14:54:06 +07:00
Joshua Horton
0be4943a21
Merge pull request #11757 from keymanapp/chore/web/extract-execution-timer
chore(web): move correction-search execution timer to its own file 🕐
2024-06-19 14:53:58 +07:00
Joshua Horton
2b9a12fade
Merge pull request #11768 from keymanapp/change/web/drop-correction-batching
change(web): drop correction batching 🕐
2024-06-19 14:53:49 +07:00
Joshua A. Horton
f22bb5fc68 chore(web): Merge remote-tracking branch 'origin/change/web/drop-correction-batching' into change/web/drop-correction-batching 2024-06-19 08:21:42 +07:00
Joshua A. Horton
7545957546 chore(web): adjustments per PR review
- let -> const
- drops no-op expression
2024-06-19 08:21:14 +07:00
Joshua Horton
e65ba7ca04
Merge pull request #11800 from keymanapp/change/web/after-word-whitespace-check
change(web): change after-word whitespace check to be more selective
2024-06-19 08:12:08 +07:00
Marc Durdin
26328463c8
Merge branch 'master' into change/web/drop-correction-batching 2024-06-18 07:49:26 +10:00
Marc Durdin
e081e0c72e fix(developer): check HISTORY.md to get last modified date for keyboard_info and model_info
This updates the calculation of the lastModifiedDate property of the
.keyboard_info and .model_info file. It now looks for the most recent
commit to HISTORY.md, and then falls back to the project folder for
.keyboard_info and .model_info.

getLastGitCommitDate now also returns UTC date (it was giving TZ=0
which is affected by daylight saving), and works for a file rather than
just for a folder, and a corresponding unit test has been added.

The date strings returned will now always include '.000' msec suffix. I
have manually verified that the import into the api.keyman.com database
copes with this, and that this change still conforms to the expected
schema for .keyboard_info and .model_info files.

Last, but important, it turned out that the unit tests for kmc were not
running. This has been resolved in kmc/build.sh.

Fixes: #11793
2024-06-18 07:03:08 +10:00
Joshua A. Horton
8f0a8bf0c1 change(web): change after-word whitespace check to be more selective
Now only skips emitting the after-word text if it is the immediate prefix of the current right-hand context.

Fixes: #5256
2024-06-17 14:56:23 +07:00
Joshua Horton
020bdb4231
Merge pull request #11732 from keymanapp/fix/web/array-from-polyfill
fix(web): add limited Array.from polyfill for lm-worker use
2024-06-14 15:39:30 +07:00
Joshua A. Horton
5c8c78f9ae chore(web): drops unused test import
It was used in an earlier version of the new unit test, which was more fragile and complex at the time.
2024-06-14 12:48:38 +07:00
Joshua A. Horton
dafe25eed6 feat(web): improve predictive-text responsiveness when typing rapidly
Fixes #3580
2024-06-14 12:22:58 +07:00
Joshua A. Horton
fe600b3b70 chore(web): pull up some changes, comments from child PR 2024-06-14 12:21:06 +07:00
Joshua A. Horton
b22a5fe4fe refactor(web): overhaul ExecutionTimer to better detect paused time
There are three main operations during correction-search:
- replay of old results, if applicable
- generation of new corrections
- generation of predictions rooted on found corrections

Each type naturally has a different 'expected' runtime... so we now make buckets for each.  We can then use stats principles to detect outliers on each level.  (Mixing them all together = higher variance, thus worse detection.)

Also adds a full set of unit tests at 100% coverage for the new implementation.

Fun detail - in practice, when running all of the unit tests on my personal machine, it's able to pick up a fair few 1-5 ms outliers during the prediction-oriented tests!  We previously lacked the resolution to detect those smaller-end cases.

This is work toward #3580, but not the final resolution of it.
2024-06-13 13:26:24 +07:00
Joshua A. Horton
7246b28afc chore(web): move correction-search execution timer to its own file 2024-06-13 13:17:43 +07:00
Joshua A. Horton
444ae92197 change(web): drop correction batching
While working on #3580, I was noticing some odd behavior after later changes and discovered that the assumption underlying the correction-batching behavior is invalid.  It would also complicate other aspects of #3580, so the simplest answer is likely to remove it.
2024-06-13 13:00:32 +07:00
Joshua A. Horton
17787b95ae chore(web): Merge branch 'change/common/update-esbuild' into change/web/lmworker-async-corrections 2024-06-13 12:49:52 +07:00
Joshua A. Horton
ace4eb25c4 chore(common): Merge branch 'master' into change/common/update-esbuild 2024-06-13 12:47:55 +07:00
Joshua Horton
3cf0082a6b
Merge pull request #10343 from keymanapp/change/web/lmworker-async-predict
change(web): prep for better asynchronous prediction handling 🕐
2024-06-13 12:44:50 +07:00
Joshua A. Horton
f2f1c09c84 chore(web): removes ts-node use from gesture-recognizer
Complication: the promise-status library used for testing our promise usage includes a .d.ts file that is not valid with current TS versions.  We now delete theirs and provide our own, fixed version.
2024-06-10 11:04:04 +07:00
Joshua A. Horton
d07fa7e953 chore(common): eliminate ts-node ref from most subpackages 2024-06-10 10:07:58 +07:00
Joshua A. Horton
e527317d3a fix(common): remove subpackge entries for older TS version 2024-06-10 09:14:03 +07:00
Joshua A. Horton
062a867ecd change(android): removes unneeded conditionals 2024-06-07 14:24:41 +07:00
Joshua A. Horton
891928e10b fix(web): array.from polyfill scoping, fixes after extracted test 2024-06-07 14:05:12 +07:00
Joshua A. Horton
d66d474f64 fix(web): add limited Array.from polyfill for lm-worker use
Fixes: #11502
Fixes: KEYMAN-WEB-K4
2024-06-07 11:56:18 +07:00
Marc Durdin
32e92846a3
Merge pull request #11690 from keymanapp/chore/common/move-cldr-import-copy-to-build-step
chore(common): move CLDR import copy into build step for common/web/types
2024-06-06 10:08:39 +07:00
Marc Durdin
23f9391855
Merge pull request #11660 from keymanapp/chore/8616-bring-xml2js-into-repo
chore: move xml2js into the repo to eliminate npm git dependency
2024-06-06 10:02:32 +07:00
Marc Durdin
f2e0398c13
Merge pull request #11657 from keymanapp/chore/8616-remove-restructure-git-dep
chore: replace git dep on restructure with 3.0.1 in npm
2024-06-06 10:02:22 +07:00
Joshua A. Horton
950b2780c3 change(web): converts correction-search to use of async generator 2024-06-05 12:30:19 +07:00
Joshua A. Horton
cb0a60165c change(common): updates esbuild to 0.18.9 2024-06-05 12:09:53 +07:00
Marc Durdin
93ba57dcd8 chore(common): move CLDR import copy into build step for common/web/types
The CLDR imports are copied into the build/ folder, so it makes more
sense for them to be done during the build phase, particularly as it is
a very quick operation. (Before this, removing the build/ folder did not
trigger a build.sh configure, so subsequent tests and usage will fail
with confusing LDML import errors. An alternative solution would have
been to declare the configure output to be one of these files.)
2024-06-05 10:53:44 +07:00
Marc Durdin
9c204ea071 fix(common): import EventEmitter only instead of all events in parser.js
When importing all of events with:

    import * as events from 'events';

tsc for kmc-ldml (but not for common/web/types) would error with:

    ../../../common/web/types/build/src/deps/xml2js/parser.d.ts:17:25 - error TS2306: File '.../node_modules/@types/node/events.d.ts' is not a module.

    17 import * as events from "node/events.js";

I am not clear why. Changing to the following side-stepped this:

    import { EventEmitter } from 'events';
2024-06-05 10:07:37 +07:00
Joshua A. Horton
d6f05323f8 fix(web): fix predictions after moving caret
Fixes: #11684
Fixes: KEYMAN-WEB-KR
Fixes: #11620
Fixes: KEYMAN-WEB-KT
2024-06-05 08:41:27 +07:00
Marc Durdin
e6d59fc173 chore: move xml2js into the repo to eliminate npm git dependency
Small rewrites to the xml2js code as ES6 modules. Based on
https://github.com/keymanapp/dependency-node-xml2js

Fixes: #8616
2024-06-03 16:07:29 +07:00
Joshua A. Horton
e5f2fbd10e chore(web): Merge branch 'master' into change/web/lmworker-async-predict 2024-06-03 15:20:39 +07:00
Joshua Horton
c3277c5fdf
Merge pull request #11464 from keymanapp/chore/web/final-config-flag-fixes
chore(web): finalize web/ project parity with base-repo TS config settings (aside from JS version target) 🔩
2024-06-03 15:16:35 +07:00
Joshua Horton
f5e65f0539
Merge pull request #11462 from keymanapp/chore/web/remove-no-implicit-any
chore(web): correct cases of implicit-any in web/ 🔩
2024-06-03 15:16:10 +07:00
Joshua Horton
604d2fcb11
Merge pull request #11424 from keymanapp/chore/web/partial-config-cleanup
chore(web): clean up remaining low-level Web .tsconfig settings 🔩
2024-06-03 15:16:00 +07:00
Marc Durdin
b874de25e8 chore: replace git dep on restructure with 3.0.1 in npm
3.0.1 includes our fix. However, 3.0.2 does not yet appear to have been
published, which has a patch for our fix?

Fixes: #8616
2024-06-03 14:58:39 +07:00