From 9bd0afa5a0f52e8e1c283f1f793a2e5b950caf17 Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Wed, 11 Mar 2026 10:43:37 -0500 Subject: [PATCH] change(web): adjsut .edgeKey, .splitClusteringKey for insert-edge handling --- .../src/main/correction/search-quotient-spur.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts b/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts index 079b310478..56945fa2c1 100644 --- a/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts +++ b/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts @@ -530,9 +530,7 @@ export abstract class SearchQuotientSpur extends SearchQuotientNode { * ancestry properly handle quotient-path variance in unit tests. */ get edgeKey(): string { - const inputSrc = this.inputSource; - const segment = inputSrc.segment; - return `E${inputSrc.subsetId}:${segment.start}${segment.end !== undefined ? `-${segment.end}` : ''}`; + return `E${this.inputSource?.subsetId ?? ''}:${this.splitClusteringKey}`; } isSameNode(space: SearchQuotientNode): boolean { @@ -559,11 +557,7 @@ export abstract class SearchQuotientSpur extends SearchQuotientNode { // Used to identify cluster-compatible components of SearchPaths during SearchCluster split operations. get splitClusteringKey(): string { - const pathSrc = this.inputSource; - if(!pathSrc) { - return ''; - } - - return `${pathSrc.segment.start}${pathSrc.segment.end == undefined ? '' : `-${pathSrc.segment.end}`}`; + const spurSeg = this.inputSource?.segment; + return `${spurSeg?.start ?? 0}${spurSeg?.end == undefined ? '' : `-${spurSeg.end}`}`; } }