From 13a2350c8d2d9c1777bbf372acbaaa70e4766ad8 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Mon, 1 Jun 2026 21:02:32 -0500 Subject: [PATCH] fix(tui): pass indicatorStyle into FaceTicker so render matches reservation FaceTicker now takes the indicator style as a prop (same value used by busyIndicatorWidth) instead of reading the store independently, so the rendered busy indicator and its reserved width can't desync on /indicator changes. --- ui-tui/src/components/appChrome.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ui-tui/src/components/appChrome.tsx b/ui-tui/src/components/appChrome.tsx index a42e3e0e957..01f9595e62c 100644 --- a/ui-tui/src/components/appChrome.tsx +++ b/ui-tui/src/components/appChrome.tsx @@ -6,7 +6,6 @@ import unicodeSpinners from 'unicode-animations' import { $delegationState } from '../app/delegationStore.js' import type { IndicatorStyle } from '../app/interfaces.js' import { useTurnSelector } from '../app/turnStore.js' -import { $uiState } from '../app/uiStore.js' import { FACES } from '../content/faces.js' import { VERBS } from '../content/verbs.js' import { fmtDuration } from '../domain/messages.js' @@ -116,9 +115,7 @@ export const busyIndicatorWidth = (style: IndicatorStyle, hasDuration: boolean): return indicatorFrameWidth(style) + verb + duration } -function FaceTicker({ color, startedAt }: { color: string; startedAt?: null | number }) { - const ui = useStore($uiState) - const style = ui.indicatorStyle +function FaceTicker({ color, startedAt, style }: { color: string; startedAt?: null | number; style: IndicatorStyle }) { const [tick, setTick] = useState(() => Math.floor(Math.random() * 1000)) const [verbTick, setVerbTick] = useState(() => Math.floor(Math.random() * VERBS.length)) const [now, setNow] = useState(() => Date.now()) @@ -468,7 +465,7 @@ export function StatusRule({ {'─ '} {busy ? ( - + ) : ( {status}