fix(web): stop dimming unread in-flight sidebar rows - #7734
Conversation
- Extract shared `sidebarRowNeedsAttention` helper so the receded surface and the in-flight opacity fade agree on which rows stay at full contrast - Unread and woken threads no longer get dimmed while a turn is in flight - Cover the helper with unit tests
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Straightforward UI bug fix that consolidates duplicated dimming logic into a shared, tested helper function. The change is self-contained to visual treatment of sidebar rows with no sensitive implications. You can add or adjust custom eligibility rules. Learn more. |
What Changed
SidebarThreadRowdimmed rows in two independent places, and only one of themexempted unread rows.
shouldRecedecarried!isUnread && !isWoke, whilerowSurfaceClassNameappliedopacity-70to the whole row onisInFlightalone. An unread thread whose session was still working, monitoring, or waiting
on approval/input therefore rendered visibly dimmer than an unread
readythread — two rows that both need the user, shown at different prominence.
Both call sites now read one predicate:
It lives in
Sidebar.logic.tsnext tohasUnseenCompletionand is covered byunit tests. Behaviour changes only for rows that are in flight and unread or
woken; read in-flight rows fade exactly as before, and active/selected rows were
already exempt through their own branches.
Why
The comment above
shouldRecedealready states the rule: prominence is reservedfor rows that need a human — "done (unread), read-but-unsettled, failed, and
freshly woken". The in-flight fade was added separately and never picked up that
guard, so the wrapper opacity silently undid the
text-foregroundthe titleclass had just resolved for unread rows. That is a missing guard rather than a
deliberate counter-rule, so the fix is to stop expressing the same rule twice
instead of adding a fifth term to a second condition.
Related, not fixed here: the status cascade ranks
working/monitoringaboveisUnread, so an unread monitoring row shows "Monitoring" instead of the "Done"pill. #7655 addresses exactly that ordering. With that PR the label carries the
unread signal and this one restores the contrast; together they cover the case.
An always-on unread marker independent of the status slot would be a design
decision and belongs in neither PR.
Surfaces
UI Changes
Verified against a dev build on isolated state with a
ready+ unread row and amonitoring+ unread row visible at once: before the fix the monitoring row'stitle, project and branch render dimmer than the row above it, after the fix
both sit at the same contrast. Screenshots not attached — happy to add them.
Worth knowing when reproducing:
backgroundLivenessis in-memory only(
ThreadBackgroundLiveness.ts), so a monitoring row cannot come from a cloneddatabase. It needs a live monitor task or a temporary local fixture.
Verification
vp test run apps/web/src/components/Sidebar.logic.test.ts— 109 passedvp run --filter @t3tools/web typecheck— cleanChecklist
Made with Claude Opus 5 using Claude Code inside T3 Code.
Note
Low Risk
Client-only sidebar styling with a shared predicate and unit tests; no auth, data, or contract changes.
Overview
Stops unread or woken in-flight sidebar threads from looking dimmer than unread ready threads.
SidebarThreadRowused two independent dimming paths, and only recede exempted unread/woke/active/selected. The in-flightopacity-70fade did not, so working/monitoring/approval/input rows that still needed attention lost contrast.Both paths now share
sidebarRowNeedsAttention. Read in-flight rows still fade; only in-flight and unread/woken rows change.Reviewed by Cursor Bugbot for commit 55bdb9b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Stop dimming unread and woke in-flight sidebar rows
Adds a
sidebarRowNeedsAttentionhelper in Sidebar.logic.ts that returns true when a row is unread, woke, active, or selected. TheSidebarThreadRowcomponent uses this to exempt such rows from receding and opacity dimming, so in-flight or ready rows that are unread or freshly woken stay fully visible.Macroscope summarized 55bdb9b.