Skip to content

chore: merge epic/web-core into epic/autocorrect 🚂#16014

Draft
mcdurdin wants to merge 682 commits into
epic/autocorrectfrom
chore/merge-web-core-into-autocorrect
Draft

chore: merge epic/web-core into epic/autocorrect 🚂#16014
mcdurdin wants to merge 682 commits into
epic/autocorrectfrom
chore/merge-web-core-into-autocorrect

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin commented May 27, 2026

DO NOT MERGE.

Note: this is an investigative PR -- web will certainly not build.

This is an investigation of how hard it will be to merge web-core work with autocorrect work. It looks like the majority of the merge fixup work will be around renamed types RuleBehavior -> ProcessorAction and OutputTarget -> TextStore, and the subclasses and related variables.

ermshiperete and others added 30 commits December 22, 2025 14:53
refactor(web): remove defaults in keyboard-storage

- Also renamed `prefixed` and `withoutPrefix` functions to use the name   that was aliased on most cases: `toPrefixedKeyboardId` and   `toUnprefixedKeyboardId`. 
- Renamed `ModelManager` class to `ModelCache` which was the name used   everywhere except in comments.

Part-of: #15292
test(web): add baseline tests for .js keyboards

This change adds baseline tests for .js keyboards. Several of those tests fail and so are skipped for now (#15342).

This test also includes the .js files of the baseline keyboards because they can't easily be generated on non-Windows platforms. This is similar to the .kmx files that are also included in the repo for the same reason.
test(common): better group baseline tests

This change groups similar tests together. Also update `build.sh` to compile .js files.
Follow-up-of: #15341
test(common): add new baseline test `k_0202___alt.kmn`

This is basically the same test as `k_0201___ralt_2.kmn` but uses ALT instead of RALT in the rule.

Also update `k_0201___ralt_2.kmn` to be a bit more extensive.

Note: since the change in `k_0201___ralt_2.kmn` is only in the test data, i.e. in the comments, the compiled .js and .kmx files don't change.
test(web): add option setting/verification to baseline tests 

Also enable some .js tests that are now passing with these changes.
Co-authored-by: Marc Durdin <marc@durdin.net>
feat(web): remove 'export default' to eliminate more aliases

Also rename `KeyTip` to `PhoneKeyTip`.

Fixes: #15292
This is a follow-up of review comments in #15401.
- rename `DefaultWorker` → `Worker`
- rename `BUTTON_CLASSES` → `buttonClassNames`
Both exports now also match the filename.

Follow-up-of: #15401
Test-bot: skip
Addresses code review comment: `Worker` is a generic and semi-reserved
name that we should not be stepping on.

This renames it to `WebWorker` instead of the suggested `LMWorker` or
`PredictiveTextWorker`. `WebWorker` is a name that was already used
in a few places and seems to better match: there is a corresponding
class for running with node. Naming it `WebWorker` makes it clearer
that this is the corresponding class when running in the browser.

The corresponding class for running under node was renamed to `NodeWorker`.

Test-bot: skip
refactor(web): remove some aliases

This is a follow-up of review comments in #15401. 

- rename `DefaultWorker` (in `web` subfolder) → `WebWorker` 
- rename `Worker` (in `node` subfolder) → `NodeWorker`
- rename `BUTTON_CLASSES` → `buttonClassNames`

All exports now also match the filenames.

Follow-up-of: #15401
- rename tests from `cookies.tests.ts` → `cookieSerializer.tests.ts`
- add test for new function

Part-of: #13426
Test-bot: skip
The Playwright tests occasionally failed complaining about `Page`
and `Locator` not being defined. The solution is to import them as
types.

Test-bot: skip
refactor(web): explicitly specify public/private on CookieSerializer 🍪
Co-authored-by: Marc Durdin <marc@durdin.net>
This change adds a static `findStores` function to `VarStoreSerializer`
and `VariableStoreCookieSerializer` as well as to the
`VariableStoreSerializer` interface.

Also add unit tests for `VariableStoreCookieSerializer`.

Part-of: #13426
Test-bot: skip
feat(web): add CookieSerializer.loadAllMatching function 🍪

- rename tests from `cookies.tests.ts` → `cookieSerializer.tests.ts` 
- add test for new function

Part-of: #13426
- in `baseline.tests.html` default to keyboard name if `id` is not set
- in `kmxkeyboard.html` allow to pass the keyboard name (as `keyboard`
  query parameter), and rename existing `keyboard` query parameter to
  `type`.

Test-bot: skip
- move `CoreKeyboardInterface` to separate file
- add variable store to `CoreKeyboardInterface` to manage variable stores
  for active keyboard
- Add `VariableStoreSerializer` parameter to `CoreKeyboardProcessor.init()`
- Implement `process_persist_action()` to save options to persistent
  storage
- Update keyboard activation to load stored options from serializer

Closes: #13426
Test-bot: skip
docs(common): improve documentation for .kmn test files 🍪
@keymanapp-test-bot keymanapp-test-bot Bot added the user-test-missing User tests have not yet been defined for the PR label May 27, 2026
@keymanapp-test-bot
Copy link
Copy Markdown

User Test Results

Test specification and instructions

ERROR: user tests have not yet been defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants