Skip to content

refactor(web): move and rename SearchResult as TokenResultMapping 🚂#15814

Open
jahorton wants to merge 2 commits intorefactor/web/build-and-map-predictionsfrom
refactor/web/move-and-rename-SearchResult
Open

refactor(web): move and rename SearchResult as TokenResultMapping 🚂#15814
jahorton wants to merge 2 commits intorefactor/web/build-and-map-predictionsfrom
refactor/web/move-and-rename-SearchResult

Conversation

@jahorton
Copy link
Copy Markdown
Contributor

@jahorton jahorton commented Apr 2, 2026

This is the first of four PRs designed to, in sequence, add an abstraction layer to the correction-search algorithm so that we can use the same core code to search for corrections in different ways.

In particular, up until now, we've always searched for corrections for just one token at a time - the current token. To better support whitespace fat-fingering, we'll need the ability to answer the following question: "Which tokenization pattern is the closest to matching the current text after corrections?" The core logic of the search is the same, but the backing data will be different - something that abstraction can handle well.

To accomplish the goal of abstracting the core search mechanisms, work will proceed in the following manner:

  1. Relocate the code representing paths through the search graph (before making further changes).
  2. Properly return the type representing the critical metadata for processing partial + completed paths of the search graph.
  3. Prepare the search method for abstraction, extracting any code specific to the existing search pattern that may not work well when searching for corrections in alternative ways.
  4. Abstractify the actual search method and critical metadata types.

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

@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Apr 2, 2026

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 changed the title refactor(web): move and rename SearchResult as TokenResultMapping refactor(web): move and rename SearchResult as TokenResultMapping 🚂 Apr 2, 2026
@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S26 milestone Apr 2, 2026
@jahorton jahorton changed the base branch from change/web/suggestion-range to refactor/web/build-and-map-predictions April 9, 2026 21:35
@jahorton jahorton force-pushed the refactor/web/move-and-rename-SearchResult branch from c92585c to 77b8af2 Compare April 9, 2026 21:36
@jahorton jahorton requested a review from ermshiperete April 9, 2026 21:52
@jahorton jahorton marked this pull request as ready for review April 9, 2026 21:52
@keyman-server keyman-server modified the milestones: A19S26, A19S27 Apr 14, 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.

2 participants