Skip to content

fix(web): stop dimming unread in-flight sidebar rows - #7734

Open
sti0 wants to merge 1 commit into
pingdotgg:mainfrom
sti0:fix/sidebar-unread-inflight-dim
Open

fix(web): stop dimming unread in-flight sidebar rows#7734
sti0 wants to merge 1 commit into
pingdotgg:mainfrom
sti0:fix/sidebar-unread-inflight-dim

Conversation

@sti0

@sti0 sti0 commented Aug 20, 2026

Copy link
Copy Markdown

What Changed

SidebarThreadRow dimmed rows in two independent places, and only one of them
exempted unread rows. shouldRecede carried !isUnread && !isWoke, while
rowSurfaceClassName applied opacity-70 to the whole row on isInFlight
alone. An unread thread whose session was still working, monitoring, or waiting
on approval/input therefore rendered visibly dimmer than an unread ready
thread — two rows that both need the user, shown at different prominence.

Both call sites now read one predicate:

export function sidebarRowNeedsAttention(input: {
  isUnread: boolean
  isWoke: boolean
  isActive: boolean
  isSelected: boolean
}): boolean {
  return input.isUnread || input.isWoke || input.isActive || input.isSelected
}

It lives in Sidebar.logic.ts next to hasUnseenCompletion and is covered by
unit 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 shouldRecede already states the rule: prominence is reserved
for 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-foreground the title
class 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/monitoring above
isUnread, 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

  • Web + desktop: fixed here; desktop wraps the same component.
  • Mobile: renders its own rows and has no equivalent in-flight opacity.
  • Legacy sidebar: untouched, it has no second dimming path.
  • Contracts: unchanged, this is client-side styling.
  • Performance: one boolean per row render, no new animation.
  • Docs: no user or internals doc describes this dimming.

UI Changes

Verified against a dev build on isolated state with a ready + unread row and a
monitoring + unread row visible at once: before the fix the monitoring row's
title, 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: backgroundLiveness is in-memory only
(ThreadBackgroundLiveness.ts), so a monitoring row cannot come from a cloned
database. It needs a live monitor task or a temporary local fixture.

Verification

  • vp test run apps/web/src/components/Sidebar.logic.test.ts — 109 passed
  • vp run --filter @t3tools/web typecheck — clean
  • targeted lint and format check on the three touched files

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — available on request
  • I included a video for animation/interaction changes — not applicable, nothing animates

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.

SidebarThreadRow used two independent dimming paths, and only recede exempted unread/woke/active/selected. The in-flight opacity-70 fade 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 sidebarRowNeedsAttention helper in Sidebar.logic.ts that returns true when a row is unread, woke, active, or selected. The SidebarThreadRow component 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.

- 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
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a8602bb3-df73-453f-94ed-17da3be0c3a4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 20, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 55bdb9b

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant