From cdf7167b26c8b874dfa02fd847f5bda131821c00 Mon Sep 17 00:00:00 2001 From: jnjpng Date: Thu, 5 Mar 2026 17:12:20 -0800 Subject: [PATCH] chore: restore null! placeholders for forward-reference pattern (#1284) Co-authored-by: Letta Code --- src/cli/App.tsx | 4 ++-- src/cli/commands/runner.ts | 13 ++++--------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/cli/App.tsx b/src/cli/App.tsx index 95fce78..9f157c3 100644 --- a/src/cli/App.tsx +++ b/src/cli/App.tsx @@ -3686,7 +3686,7 @@ export default function App({ // removed. Git-backed memory uses standard git merge conflict resolution via the agent. // Core streaming function - iterative loop that processes conversation turns - // biome-ignore lint/correctness/useExhaustiveDependencies: refs read .current dynamically, complex callback with intentional deps + // biome-ignore lint/correctness/useExhaustiveDependencies: blanket suppression — this callback has ~16 omitted deps (refs, stable functions, etc.). Refs are safe (read .current dynamically), but the blanket ignore also hides any genuinely missing reactive deps. If stale-closure bugs appear in processConversation, audit the dep array here first. const processConversation = useCallback( async ( initialInput: Array, @@ -6733,7 +6733,7 @@ export default function App({ queueApprovalResults, ]); - // biome-ignore lint/correctness/useExhaustiveDependencies: refs read .current dynamically, complex callback with intentional deps + // biome-ignore lint/correctness/useExhaustiveDependencies: blanket suppression — same caveat as processConversation above. Omitted deps are mostly refs and stable callbacks, but this hides any genuinely missing reactive deps too. const onSubmit = useCallback( async (message?: string): Promise<{ submitted: boolean }> => { const msg = message?.trim() ?? ""; diff --git a/src/cli/commands/runner.ts b/src/cli/commands/runner.ts index c271443..7c13512 100644 --- a/src/cli/commands/runner.ts +++ b/src/cli/commands/runner.ts @@ -73,18 +73,13 @@ export function createCommandRunner({ onCommandFinished, }: RunnerDeps) { function getHandle(id: string, input: string): CommandHandle { + // biome-ignore lint/style/noNonNullAssertion: forward-reference pattern — overwritten synchronously below. null! preferred over no-ops to crash loudly if invariant breaks. const handle: CommandHandle = { id, input, - // Placeholders are overwritten below before the handle is returned. - update: (_update: CommandUpdate) => {}, - finish: ( - _output: string, - _success?: boolean, - _dimOutput?: boolean, - _preformatted?: boolean, - ) => {}, - fail: (_output: string) => {}, + update: null!, + finish: null!, + fail: null!, }; const update = (updateData: CommandUpdate) => {