From f1f438e7f9ad09977b47528c32a740250f5ddbb8 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Mon, 20 Apr 2026 11:40:12 -0500 Subject: [PATCH] refactor(tui): drop done-in sys line; FaceTicker counter only The transcript line was noisy. Keep the one thing the issue really needs: live elapsed next to the busy verb. --- ui-tui/src/app/useMainApp.ts | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/ui-tui/src/app/useMainApp.ts b/ui-tui/src/app/useMainApp.ts index a3d474027..28b2a26f9 100644 --- a/ui-tui/src/app/useMainApp.ts +++ b/ui-tui/src/app/useMainApp.ts @@ -4,7 +4,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { STARTUP_RESUME_ID } from '../config/env.js' import { MAX_HISTORY, WHEEL_SCROLL_STEP } from '../config/limits.js' -import { fmtDuration, imageTokenMeta } from '../domain/messages.js' +import { imageTokenMeta } from '../domain/messages.js' import { fmtCwdBranch } from '../domain/paths.js' import { type GatewayClient } from '../gatewayClient.js' import type { @@ -284,25 +284,13 @@ export function useMainApp(gw: GatewayClient) { sys }) - // Drive turnStartedAt from the busy edge and emit a one-shot "done in Xs" - // line on the idle edge. Covers agent turns and `!shell` alike — only - // suppresses when the block is under ~1s (too quick to matter). useEffect(() => { - if (ui.busy && turnStartedAt === null) { - setTurnStartedAt(Date.now()) - - return - } - - if (!ui.busy && turnStartedAt !== null) { - const elapsed = Date.now() - turnStartedAt + if (ui.busy) { + setTurnStartedAt(prev => prev ?? Date.now()) + } else { setTurnStartedAt(null) - - if (elapsed >= 1000) { - sys(`done in ${fmtDuration(elapsed)}`) - } } - }, [sys, turnStartedAt, ui.busy]) + }, [ui.busy]) useConfigSync({ gw, setBellOnComplete, setVoiceEnabled, sid: ui.sid })