Skip to content

Comments

refactor(web): relocate definition of .sourceRangeKey to SearchQuotientSpur, SearchQuotientNode 🚂#15103

Merged
jahorton merged 2 commits intoepic/autocorrectfrom
refactor/web/relocate-source-range-key
Jan 28, 2026
Merged

refactor(web): relocate definition of .sourceRangeKey to SearchQuotientSpur, SearchQuotientNode 🚂#15103
jahorton merged 2 commits intoepic/autocorrectfrom
refactor/web/relocate-source-range-key

Conversation

@jahorton
Copy link
Contributor

@jahorton jahorton commented Nov 5, 2025

The .sourceRangeKey property previously defined on ContextToken will be very useful for validating certain conditions needed for the upcoming SearchQuotientCluster implementation of SearchQuotientNode. As ContextToken owns SearchQuotientNodes, and not the other way around, establishing it as a member of SearchQuotientNode provides better, more direct access for the new upcoming use-case.

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

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Nov 5, 2025

User Test Results

Test specification and instructions

User tests are not required

@keymanapp-test-bot keymanapp-test-bot bot changed the title refactor(web): relocate definition of .sourceRangeKey to SearchPath, SearchSpace refactor(web): relocate definition of .sourceRangeKey to SearchPath, SearchSpace 🚂 Nov 5, 2025
@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S15 milestone Nov 5, 2025
@keyman-server keyman-server modified the milestones: A19S15, A19S16 Nov 8, 2025
@jahorton jahorton force-pushed the refactor/web/relocate-source-range-key branch from 804e5d7 to 20c6f10 Compare November 10, 2025 20:49
@jahorton jahorton changed the base branch from refactor/web/complex-search-space-reuse to refactor/web/manage-true-inputs-on-path November 10, 2025 20:49
@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
@jahorton jahorton force-pushed the refactor/web/manage-true-inputs-on-path branch from 807c09d to 45ad85a Compare January 9, 2026 21:51
@jahorton jahorton force-pushed the refactor/web/relocate-source-range-key branch from 7831a6d to 346f737 Compare January 9, 2026 21:56
@jahorton jahorton changed the base branch from refactor/web/manage-true-inputs-on-path to change/web/rename-inputsource-as-pathinputprops January 12, 2026 20:31
@jahorton jahorton force-pushed the refactor/web/relocate-source-range-key branch from 346f737 to a6d4180 Compare January 12, 2026 20:31
@jahorton jahorton changed the title refactor(web): relocate definition of .sourceRangeKey to SearchPath, SearchSpace 🚂 refactor(web): relocate definition of .sourceRangeKey to SearchQuotientSpur, SearchQuotientNode 🚂 Jan 12, 2026
@jahorton jahorton force-pushed the refactor/web/relocate-source-range-key branch from a6d4180 to 3a19b06 Compare January 12, 2026 21:01
@jahorton jahorton force-pushed the change/web/rename-inputsource-as-pathinputprops branch from 27fc7da to 025c1f4 Compare January 14, 2026 23:13
@jahorton jahorton force-pushed the refactor/web/relocate-source-range-key branch from 3a19b06 to 01371c0 Compare January 14, 2026 23:14
@jahorton jahorton force-pushed the change/web/rename-inputsource-as-pathinputprops branch from 025c1f4 to ba97ea7 Compare January 15, 2026 21:16
@jahorton jahorton force-pushed the refactor/web/relocate-source-range-key branch from 01371c0 to a679ebe Compare January 15, 2026 22:04
@keyman-server keyman-server modified the milestones: A19S20, A19S21 Jan 16, 2026
@jahorton jahorton force-pushed the change/web/rename-inputsource-as-pathinputprops branch from fda509c to 3a613df Compare January 22, 2026 18:37
…ntSpur, SearchQuotientNode

Build-bot: skip build:web
Test-bot: skip
@jahorton jahorton force-pushed the refactor/web/relocate-source-range-key branch from cb6ffee to cf39508 Compare January 22, 2026 18:39
@jahorton jahorton marked this pull request as ready for review January 22, 2026 19:43
*/
get sourceRangeKey(): string {
const components: string[] = [];
const sources = this.inputSegments;
Copy link
Contributor

@ermshiperete ermshiperete Jan 27, 2026

Choose a reason for hiding this comment

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

(GH won't let me put a comment on the function because it didn't change, so I'm putting it here:)
Nothing new, but devin.ai noticed that inputSegments getter has side effects and mutates this.parentNode.inputSegments.

To work around we could replace parentSources.push(this.inputSource); with parentSources = [...parentSources, this.inputSource];

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 don't see any actual side-effects unless a new type with a different implementation of the getter is created (that maintains a single root instance that is reused).

The array is dynamically built on each and every call; it's not re-used in between calls and is built-up recursively. Note the common recursive root return value - a fresh, empty array is the base recursive frame for each call.

If I have two instances of SearchQuotientNode - say, A and B, with A serving as B's parent...

   const bSegments = b.inputSegments;
   const aSegments = a.inputSegments;

will be two separate instances.

Base automatically changed from change/web/rename-inputsource-as-pathinputprops to epic/autocorrect January 28, 2026 23:19
@jahorton jahorton merged commit 6d6ad19 into epic/autocorrect Jan 28, 2026
7 of 8 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Jan 28, 2026
@jahorton jahorton deleted the refactor/web/relocate-source-range-key branch January 28, 2026 23:20
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.

3 participants