Skip to content

Comments

refactor(web): generalize SearchQuotientSpur parent requirements 🚂#14987

Merged
jahorton merged 5 commits intoepic/autocorrectfrom
refactor/web/use-interface-as-search-parent
Jan 22, 2026
Merged

refactor(web): generalize SearchQuotientSpur parent requirements 🚂#14987
jahorton merged 5 commits intoepic/autocorrectfrom
refactor/web/use-interface-as-search-parent

Conversation

@jahorton
Copy link
Contributor

@jahorton jahorton commented Oct 21, 2025

As an upcoming goal is to introduce a new SearchQuotientNode type that will assist with context-caching across multiple tokenizations, it is wise to generalize SearchQuotientSpur and functions utilizing it to accept any SearchQuotientNode-implementing type as its parent.

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

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Oct 21, 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 changed the title refactor(web): generalize SearchPath parent requirements refactor(web): generalize SearchPath parent requirements 🚂 Oct 21, 2025
@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S14 milestone Oct 21, 2025
@jahorton jahorton force-pushed the refactor/web/use-interface-as-search-parent branch from 30f660a to 604ee6c Compare October 22, 2025 21:04
@jahorton jahorton changed the base branch from refactor/web/search-batcher to change/web/remove-duplicate-path-filtering October 22, 2025 21:04
@jahorton jahorton force-pushed the refactor/web/use-interface-as-search-parent branch from 604ee6c to 1f69bba Compare October 23, 2025 16:11
@darcywong00 darcywong00 modified the milestones: A19S14, A19S15 Oct 24, 2025
@jahorton jahorton force-pushed the change/web/remove-duplicate-path-filtering branch from 3f3382a to 1f3b029 Compare October 27, 2025 19:07
@jahorton jahorton force-pushed the refactor/web/use-interface-as-search-parent branch from 1f69bba to 7b67bc5 Compare October 27, 2025 20:17
@keyman-server keyman-server modified the milestones: A19S15, A19S16 Nov 8, 2025
@jahorton jahorton force-pushed the change/web/remove-duplicate-path-filtering branch from 1f3b029 to 9c197bd Compare November 10, 2025 18:44
@jahorton jahorton force-pushed the refactor/web/use-interface-as-search-parent branch from f0978aa to c28bb20 Compare November 10, 2025 19:21
@jahorton jahorton marked this pull request as ready for review November 12, 2025 20:00
Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

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

I think this is okay. It's very hard to tell if there are logic changes at all. But LGTM

@keyman-server keyman-server modified the milestones: A19S16, A19S17 Nov 22, 2025
@keyman-server keyman-server modified the milestones: A19S17, A19S18 Dec 6, 2025
@jahorton jahorton force-pushed the refactor/web/use-interface-as-search-parent branch from ec60680 to bc23b7b Compare January 7, 2026 19:32
@jahorton jahorton changed the base branch from refactor/web/replace-addInput-with-constructor to refactor/web/search-result-node-access January 7, 2026 19:32
@jahorton jahorton force-pushed the refactor/web/use-interface-as-search-parent branch from bc23b7b to aa538c5 Compare January 7, 2026 19:34
jahorton added a commit that referenced this pull request Jan 7, 2026
These changes were previously part of #14987 and have been extracted for ease of review.

Build-bot: skip build:web
Test-bot: skip
@jahorton jahorton changed the base branch from refactor/web/search-result-node-access to refactor/web/local-input-cost-heuristic January 7, 2026 19:43
@jahorton jahorton force-pushed the refactor/web/use-interface-as-search-parent branch 2 times, most recently from 5adf510 to 28ded16 Compare January 8, 2026 14:42
jahorton added a commit that referenced this pull request Jan 9, 2026
…nstructor

This has been factorized out of #14987 for ease of review.

Build-bot: skip build:web
Test-bot: skip
jahorton added a commit that referenced this pull request Jan 9, 2026
This was formerly part of #14987 and has been extracted for ease of review.

Build-bot: skip build:web
Test-bot: skip
jahorton added a commit that referenced this pull request Jan 9, 2026
These changes were previously part of #14987 and have been extracted for ease of review.

Build-bot: skip build:web
Test-bot: skip
@jahorton jahorton force-pushed the refactor/web/local-input-cost-heuristic branch from b467cc4 to 445cca2 Compare January 9, 2026 17:24
As an upcoming goal is to introduce a new SearchQuotientNode type that will assist with context-caching across multiple tokenizaitons, it is wise to generalize SearchQuotientSpur and functions utilizing it to accept any SearchQuotientNode-implementing type as its parent.

Build-bot: skip build:web
Test-bot: skip
@jahorton jahorton force-pushed the refactor/web/use-interface-as-search-parent branch from 28ded16 to 3a56e23 Compare January 9, 2026 17:32
@jahorton jahorton requested a review from mcdurdin January 14, 2026 21:29
@jahorton jahorton marked this pull request as ready for review January 14, 2026 21:29
@jahorton
Copy link
Contributor Author

I've now reworked this PR and split it into multiple segments focused on each individual "moving part". Hopefully that'll make the changes easier to follow.

@keyman-server keyman-server modified the milestones: A19S20, A19S21 Jan 16, 2026
Comment on lines 71 to 72
* Designed explicitly for use in unit testing; it's not super-efficient, so
* avoid live use.
Copy link
Member

Choose a reason for hiding this comment

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

Given this we should probably lean towards using the unitTestEndpoints pattern?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After a bit of thought, I opted for a different option - it's now a standalone method that is no longer part of the type.

Among other things, this also allows it to be tree-shaken easily.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure why you don't want to use the accepted pattern but this is at least better than before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am a bit curious how that works when declared on an interface, admittedly.

Looking at https://github.com/keymanapp/keyman/wiki/Unit-Tests#typescript, would it be best to wrap that standalone function in its own unitTestEndpoints separate from the interface?

Copy link
Member

Choose a reason for hiding this comment

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

For interfaces, it probably doesn't work. But you could export a unitTestEndpoints-style interface that can be cast to?

For the function quotientPathHasInputs in question, rather than exporting it directly, have:

export const unitTestEndpoints = {
  quotientPathHasInputs,
};

Base automatically changed from refactor/web/local-input-cost-heuristic to epic/autocorrect January 22, 2026 14:38
@jahorton jahorton merged commit 0925ff6 into epic/autocorrect Jan 22, 2026
7 of 8 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Jan 22, 2026
@jahorton jahorton deleted the refactor/web/use-interface-as-search-parent branch January 22, 2026 16:00
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.

5 participants