refactor(tui): turn elapsed lives in FaceTicker; emit done-in sys line

Drops `lastUserAt` plumbing and the right-edge idle ticker. Matches the
claude-code / opencode convention: elapsed rides with the busy indicator
(spinner verb), nothing at idle.

- `turnStartedAt` driven by a useEffect on `ui.busy` — stamps on rising
  edge, clears on falling edge. Covers agent turns and !shell alike.
- FaceTicker renders ` · {fmtDuration}` while busy; 1 s clock for the
  counter, existing 2500 ms cycle for face/verb rotation.
- On busy → idle, if the block ran ≥ 1 s, emit a one-shot
  `done in {fmtDuration}` sys line (≡ claude-code's `thought for Ns`).
This commit is contained in:
Brooklyn Nicholson 2026-04-20 11:38:11 -05:00
parent 9910681b85
commit 2de1aad028
8 changed files with 43 additions and 50 deletions

View file

@ -237,7 +237,6 @@ export interface SlashHandlerContext {
newSession: (msg?: string) => void
resetVisibleHistory: (info?: null | SessionInfo) => void
resumeById: (id: string) => void
setLastUserAt: StateSetter<null | number>
setSessionStartedAt: StateSetter<number>
}
slashFlightRef: MutableRefObject<number>
@ -300,11 +299,11 @@ export interface AppLayoutProgressProps {
export interface AppLayoutStatusProps {
cwdLabel: string
goodVibesTick: number
lastUserAt: null | number
sessionStartedAt: null | number
showStickyPrompt: boolean
statusColor: string
stickyPrompt: string
turnStartedAt: null | number
voiceLabel: string
}