From c7177cf4a2f3de68561231fb2274cff4e85cc0fc Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Fri, 23 Jan 2026 11:58:34 -0600 Subject: [PATCH] change(web): remove SearchQuotientNode.inputSequence Build-bot: skip build:web Test-bot: skip --- .../src/main/correction/search-quotient-node.ts | 10 ---------- .../src/main/correction/search-quotient-root.ts | 5 ----- .../src/main/correction/search-quotient-spur.ts | 9 --------- .../correction-search/getBestMatches.tests.ts | 1 - 4 files changed, 25 deletions(-) diff --git a/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-node.ts b/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-node.ts index 8645f476dc7..c8f6241fa4c 100644 --- a/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-node.ts +++ b/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-node.ts @@ -178,16 +178,6 @@ export interface SearchQuotientNode { */ readonly inputCount: number; - /** - * Retrieves the sequence of inputs that led to this SearchSpace. - * - * THIS WILL BE REMOVED SHORTLY in favor of `constituentPaths` below, which - * provides an improved view into the data and models multiple paths to the - * space when they exist. (Once SearchQuotientNode takes on merging & - * splitting) - */ - readonly inputSequence: Distribution[]; - /** * Reports the length in codepoints of corrected text represented by completed * paths from this instance. diff --git a/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-root.ts b/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-root.ts index 6b72ef22316..2b263a4d85b 100644 --- a/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-root.ts +++ b/web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-root.ts @@ -47,11 +47,6 @@ export class SearchQuotientRoot implements SearchQuotientNode { return []; } - // Return a new array each time; avoid aliasing potential! - get inputSequence(): LexicalModelTypes.Distribution[] { - return []; - } - // Return a new instance each time; avoid aliasing potential! get bestExample(): { text: string; p: number; } { return { text: '', p: 1 }; 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 c308bccbcbe..2d827c63261 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 @@ -104,15 +104,6 @@ export abstract class SearchQuotientSpur implements SearchQuotientNode { return this.parentNode.model; } - /** - * Retrieves the sequences of inputs that led to this SearchPath. - */ - public get inputSequence(): Distribution[] { - const parentInputs = this.parentNode?.inputSequence.slice() ?? []; - const localInputs = this.inputs ? [this.inputs.slice()] : []; - return parentInputs.concat(localInputs); - } - get codepointLength(): number { if(this._codepointLength === undefined) { this._codepointLength = this.parentNode.codepointLength + this.insertLength - this.leftDeleteLength; diff --git a/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/getBestMatches.tests.ts b/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/getBestMatches.tests.ts index aa864492d18..b776a3ca45b 100644 --- a/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/getBestMatches.tests.ts +++ b/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/getBestMatches.tests.ts @@ -106,7 +106,6 @@ describe('getBestMatches', () => { // Just one suggestion root should be returned as the first result. assert.equal(result.totalCost, 0); // Gives a perfect match - assert.equal(result.inputSequence.length, 0); // for a state with no input and assert.equal(result.matchString, ''); // an empty match string. assert.isFalse(resultState.done);