Why
The Work sidebar accumulates finished/idle chats with no way to auto-quiet them. Competitor t3code shipped a "settled" thread lifecycle: finished threads auto-quiet into a paged tail but stay in the live list (distinct from archive); auto-settle on PR merge/close or N-day idle; auto-unsettle on new activity. We already have the visual for this — the SessionCard "stale" badge — but it is purely cosmetic today (it does not re-bucket, quiet, or page the row).
Approach (mostly derivation, not a new subsystem)
- Add a
settled classifier as a sibling of the running/awaiting/ended bucket in lib/terminalAttention.ts (:188), split out where buckets are built in useWorkSessions.ts (:1291-1308). Derived every render → auto-unsettle-on-activity is free.
- Settle triggers from fields we already have: N-day idle via
lastActivityAt (generalize STALE_RUNNING_CLI_SESSION_MS, lib/sessions.ts:44, from CLI-only to all tool types) + PR merged/closed via selectPrimaryLanePr(lane, prsByLaneId).
- Render in the live list (not archive): a 4th "Settled" section below "Ended" in Status grouping (
SessionListPane.tsx:757-790) and/or a collapsed paged tail per lane/time group.
- Filter: a "Show settled" toggle chip in the funnel panel next to the Lane combobox (
SessionListPane.tsx:1012-1035), backed by a new boolean in WorkProjectViewState (appStore.ts:145-184).
- Reuse the existing stale visual (outlined/muted + Clock glyph,
SessionCard.tsx:164-186).
- Ordering is already
startedAt DESC (creation order), so no row jitter — matches t3code's "activity never reorders rows" rule for free.
Optional (cross-device manual override)
Add settledAt? to TerminalSessionSummary + a terminal_sessions.settled_at column (mirror archive pattern: kvDb.ts:1867, sessionService.ts:1115-1136). Only needed if manual settle/unsettle must sync phone↔desktop.
Acceptance
- Finished/idle + PR-merged/closed chats collapse into a Settled tier but remain openable in-stream.
- New activity instantly un-settles; no reordering/jitter.
- "Show settled" toggle in the filter panel.
Source
t3code Sidebar v2 / settled lifecycle (PRs #4026/#4243/#4280); ADE slot-in analysis this session.
Why
The Work sidebar accumulates finished/idle chats with no way to auto-quiet them. Competitor t3code shipped a "settled" thread lifecycle: finished threads auto-quiet into a paged tail but stay in the live list (distinct from archive); auto-settle on PR merge/close or N-day idle; auto-unsettle on new activity. We already have the visual for this — the
SessionCard"stale" badge — but it is purely cosmetic today (it does not re-bucket, quiet, or page the row).Approach (mostly derivation, not a new subsystem)
settledclassifier as a sibling of the running/awaiting/ended bucket inlib/terminalAttention.ts(:188), split out where buckets are built in:1291-1308). Derived every render → auto-unsettle-on-activity is free.useWorkSessions.ts(lastActivityAt(generalizeSTALE_RUNNING_CLI_SESSION_MS,lib/sessions.ts:44, from CLI-only to all tool types) + PR merged/closed viaselectPrimaryLanePr(lane, prsByLaneId).SessionListPane.tsx:757-790) and/or a collapsed paged tail per lane/time group.SessionListPane.tsx:1012-1035), backed by a new boolean inWorkProjectViewState(appStore.ts:145-184).SessionCard.tsx:164-186).startedAt DESC(creation order), so no row jitter — matches t3code's "activity never reorders rows" rule for free.Optional (cross-device manual override)
Add
settledAt?toTerminalSessionSummary+ aterminal_sessions.settled_atcolumn (mirror archive pattern:kvDb.ts:1867,sessionService.ts:1115-1136). Only needed if manual settle/unsettle must sync phone↔desktop.Acceptance
Source
t3code Sidebar v2 / settled lifecycle (PRs #4026/#4243/#4280); ADE slot-in analysis this session.