Skip to content

refactor(web): differentiate search-space module types 🚂#15413

Merged
jahorton merged 8 commits intoepic/autocorrectfrom
refactor/web/differentiate-module-types
Jan 22, 2026
Merged

refactor(web): differentiate search-space module types 🚂#15413
jahorton merged 8 commits intoepic/autocorrectfrom
refactor/web/differentiate-module-types

Conversation

@jahorton
Copy link
Contributor

@jahorton jahorton commented Jan 8, 2026

This PR converts SearchQuotientSpur into an abstract base class with specialized forms for different cases. Three implementations are provided:

  • SearchQuotientRoot - for the root node of the search
  • LegacyQuotientRoot - for modeling existing behavior at the root node of the search ('insert' edits supported within the same "module")
    • Of note: this was made necessary by an error I encountered in development of refactor(web): implement token splitting on SearchQuotientSpur types 🚂 #15023.
      • SearchQuotientSpur cannot directly use the constructor of any of its subtypes without a runtime JS error occurring.
      • This thus mandated a separate 'root node' type that does not inherit from (or overload) SearchQuotientSpur... which also does give us clearer typing and behavior for it.
  • LegacyQuotientSpur - for modeling existing behavior before swapping to our target design and model

In the future, the plan is to retire LegacyQuotientSpur in favor of three new variants:

  • InsertionQuotientSpur
  • DeletionQuotientSpur
  • SubstitutionQuotientSpur

The search graph can then be dynamically built and managed in accordance with our target design as documented at #15161.

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

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Jan 8, 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): differentiate search-space module types refactor(web): differentiate search-space module types 🚂 Jan 8, 2026
@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S20 milestone Jan 8, 2026
@jahorton jahorton force-pushed the refactor/web/use-interface-as-search-parent branch from 28ded16 to 3a56e23 Compare January 9, 2026 17:32
This PR converts SearchQuotientSpur into an abstract base class with specialized forms for different cases.  Two implementations are provided:
- SearchQuotientRoot - for the root node of the search
- LegacyQuotientSpur - for modeling existing behavior before swapping to our target design and model

Build-bot: skip build:web
Test-bot: skip
@jahorton jahorton force-pushed the refactor/web/differentiate-module-types branch from 8f505b3 to 348e876 Compare January 9, 2026 17:33
@jahorton jahorton marked this pull request as ready for review January 14, 2026 21:31
@keyman-server keyman-server modified the milestones: A19S20, A19S21 Jan 16, 2026
@@ -0,0 +1,61 @@
import { PriorityQueue } from '@keymanapp/web-utils';
Copy link
Member

Choose a reason for hiding this comment

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

missing prolog comment

@@ -0,0 +1,92 @@

Copy link
Member

Choose a reason for hiding this comment

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

missing header comment

// Shallow-copies the array to prevent external modification; the Transforms
// are marked Readonly to prevent their modification as well.
return [...this.inputs];
return this.inputs ?? [];
Copy link
Member

Choose a reason for hiding this comment

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

This no longer matches the comment

Base automatically changed from refactor/web/use-interface-as-search-parent to epic/autocorrect January 22, 2026 16:00
@jahorton jahorton merged commit 3ee8a7d into epic/autocorrect Jan 22, 2026
7 of 8 checks passed
@jahorton jahorton deleted the refactor/web/differentiate-module-types branch January 22, 2026 16:21
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants