Skip to content

Conversation

@jahorton
Copy link
Contributor

@jahorton jahorton commented Oct 13, 2025

This PR introduces a new implementation of the SearchSpace interface - SearchCluster. The SearchCluster type is designed to represent cases where two or more SearchPath instances represent the same total range of user input, as described in #15104's description as them "converging". In such cases, extending the search space by new input proceeds in exactly the same manner, regardless of which parent space is the original source. It's notably more efficient to cluster the paths together.

Also note that SearchCluster directly reflects a TokenizationSubset (as described in #15140) - any of the paths leading to the cluster will correct to words of the same length, representing the same keystroke range from the user. Use of this type thus allows us to build a single ContextTokenization instance to represent the convergence of these paths - both for correction-search operations and for preservation of state after application of a suggestion arising from it.

Build-bot: skip build:web
Test-bot: skip

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Oct 13, 2025

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

  • Web
    • KeymanWeb Test Home - build : all tests passed (no artifacts on BuildLevel "build")

@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S14 milestone Oct 13, 2025
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 6ddd57f to 9068e40 Compare October 13, 2025 20:50
@jahorton jahorton force-pushed the refactor/web/simple-search-space-reuse branch from 1eaf922 to ddf9a58 Compare October 17, 2025 15:03
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 9068e40 to b8457ec Compare October 17, 2025 15:10
@keymanapp-test-bot keymanapp-test-bot bot changed the title refactor(web): splits part of SearchSpace off into SearchPath refactor(web): splits part of SearchSpace off into SearchPath 🚂 Oct 17, 2025
@jahorton jahorton changed the base branch from refactor/web/simple-search-space-reuse to refactor/web/multi-space-correction-search October 17, 2025 15:10
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 228d93a to f3fc256 Compare October 17, 2025 20:02
@jahorton jahorton changed the base branch from refactor/web/multi-space-correction-search to refactor/web/search-batcher October 17, 2025 20:03
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from f3fc256 to a6e14c5 Compare October 17, 2025 20:35
@jahorton jahorton changed the base branch from refactor/web/search-batcher to change/web/start-search-path October 17, 2025 20:36
@jahorton jahorton changed the base branch from change/web/start-search-path to refactor/web/multi-space-correction-search October 20, 2025 16:09
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from a6e14c5 to a03bc15 Compare October 20, 2025 18:18
@jahorton jahorton force-pushed the refactor/web/multi-space-correction-search branch from 02b9293 to 96a4b99 Compare October 21, 2025 19:14
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from a03bc15 to 3f199ce Compare October 21, 2025 21:00
@jahorton jahorton changed the title refactor(web): splits part of SearchSpace off into SearchPath 🚂 refactor(web): begin implementation of SearchCluster for merging paths reaching the same intermediate tokenization state 🚂 Oct 22, 2025
@jahorton jahorton force-pushed the refactor/web/multi-space-correction-search branch 2 times, most recently from 3fe8645 to de3d86c Compare October 23, 2025 21:36
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 3f199ce to 0e70658 Compare October 24, 2025 18:43
@jahorton jahorton changed the base branch from refactor/web/multi-space-correction-search to refactor/web/search-path-merging October 24, 2025 18:43
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 0e70658 to 72798ba Compare October 24, 2025 18:48
@darcywong00 darcywong00 modified the milestones: A19S14, A19S15 Oct 24, 2025
});

it('handles case that triggers a token merge: can+\'+t', () => {
it.skip('handles case that triggers a token merge: can+\'+t', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: double-check - is this still valid? I thought I reworked things to be supported at this point; this change may be a holdover from a previous implementation strategy.

@keyman-server keyman-server modified the milestones: A19S15, A19S16 Nov 8, 2025
@jahorton jahorton force-pushed the refactor/web/search-path-merging branch from 076bfdc to bc51029 Compare November 10, 2025 20:50
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from ca906dd to 316abe3 Compare November 10, 2025 20:51
@jahorton jahorton force-pushed the refactor/web/search-path-merging branch from bc51029 to 413fdcf Compare November 10, 2025 21:18
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 316abe3 to ef700d0 Compare November 10, 2025 21:19
@jahorton jahorton force-pushed the refactor/web/search-path-merging branch from 413fdcf to e9b8e2d Compare November 10, 2025 22:21
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from ef700d0 to 567ba68 Compare November 10, 2025 22:22
@jahorton jahorton force-pushed the refactor/web/search-path-merging branch from e9b8e2d to 9b947b7 Compare November 11, 2025 22:34
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 567ba68 to 0286e3c Compare November 11, 2025 23:15
@jahorton jahorton changed the base branch from refactor/web/search-path-merging to refactor/web/simplify-input-segments November 12, 2025 19:49
@jahorton jahorton force-pushed the refactor/web/complex-search-space-reuse branch from 18c246a to d98603f Compare November 12, 2025 19:52
Comment on lines +166 to +169
public stopTrackingResults() {
delete this.completedPaths;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public stopTrackingResults() {
delete this.completedPaths;
}

@keyman-server keyman-server modified the milestones: A19S16, A19S17 Nov 22, 2025
@keyman-server keyman-server modified the milestones: A19S17, A19S18 Dec 6, 2025
@keyman-server keyman-server modified the milestones: A19S18, A19S19 Dec 21, 2025
@keyman-server keyman-server modified the milestones: A19S19, A19S20 Jan 3, 2026
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.

4 participants