Problem
pushInfo always appends a new live card with a unique ID. There's no built-in way for a caller to
say "replace my last hint" — every call creates a permanent new card. For transient or repeatable
feedback (hotkey confirmations, mode toggles, status changes), this means stale cards accumulate in
the scrollback with no path to clean them up.
Proposed change
Allow live.show to replace an existing card when the same id is dispatched again. The reducer
already has mutateCard — the live.show case could check for an existing card with the same id + kind and mutate instead of always appending. Callers that pass a stable id get replace-in-place;
callers using nextId() (unique per call, which is the default today) keep current append behavior
unchanged. Zero breakage, backward-compatible.
Alternatives considered
- Toast notifications (
toast.show) — already in the reducer with auto-dismiss via ttlMs, but
Scrollback doesn't expose pushToast. Adding one would also work, but a toast disappears entirely;
replace-in-place keeps the most recent hint visible until explicitly dismissed.
- Doing nothing — the workaround is to accept the pile-up, which is noisy UX for anything that fires
a hint on a repeatable action.
Motivation
Working on a hotkey-driven feature (Alt+S input stash/recall, #1438) where each press shows a
confirmation hint — Recalled, Stashed, Nothing to stash. Without replace-in-place, rapid use creates a
string of stale cards that never go away.
Scope check
Problem
pushInfoalways appends a newlivecard with a unique ID. There's no built-in way for a caller tosay "replace my last hint" — every call creates a permanent new card. For transient or repeatable
feedback (hotkey confirmations, mode toggles, status changes), this means stale cards accumulate in
the scrollback with no path to clean them up.
Proposed change
Allow
live.showto replace an existing card when the sameidis dispatched again. The reduceralready has
mutateCard— thelive.showcase could check for an existing card with the sameid + kindand mutate instead of always appending. Callers that pass a stableidget replace-in-place;callers using
nextId()(unique per call, which is the default today) keep current append behaviorunchanged. Zero breakage, backward-compatible.
Alternatives considered
toast.show) — already in the reducer with auto-dismiss viattlMs, butScrollbackdoesn't exposepushToast. Adding one would also work, but a toast disappears entirely;replace-in-place keeps the most recent hint visible until explicitly dismissed.
a hint on a repeatable action.
Motivation
Working on a hotkey-driven feature (Alt+S input stash/recall, #1438) where each press shows a
confirmation hint — Recalled, Stashed, Nothing to stash. Without replace-in-place, rapid use creates a
string of stale cards that never go away.
Scope check