Repository navigation
fix(web): clear failed badges when threads are opened - #28616
BilalIrfanContact wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — Opened failures now clear their sidebar badges and folder dots without changing underlying failure state. The reported timestamp issue can restore misleading badges and remains subject to the separate correctness gate. Needs human approval because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Failure visibility and folder status apps/web/src/components/Sidebar.logic.ts |
Failure visibility accounts for failed latest runs and runtime-only failures, and compares valid timestamps with the last visit. Folder-dot status and unread-completion checks use the row-resolved status. |
Sidebar row and validation apps/web/src/components/sidebar/SidebarThreadRow.tsx, apps/web/src/components/Sidebar.logic.test.ts |
Sidebar rows pass the resolved visit time to the row-status resolver. Tests cover failures before and after a visit, missing completion times, missing latest-run data, and folder-dot status. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers: t3dotgg, juliusmarminge
Merge Risk: 
Low · up to 13889
-
Opening a thread does not clear its Failed badge or folder dot when the failure has no completion time or occurs before a run. This bounded gap should be accepted explicitly or fixed before merging.
Pre-merge checks: 
3 · 
1
-
Failed checks: 1 warning Passed checks: 3 passed-
Full details: Out of Scope Changes check
-
Explanation
The changed files remain within issue
#25470scope.Sidebar.logic.tsadds visit-aware failed status resolution and applies it to closed-folder dots.SidebarThreadRow.tsxuses that row status for the Failed badge.Sidebar.logic.test.tsadds coverage for badge acknowledgment, later failures, undated failures, and folder dots. These changes support the sidebar requirement and do not modify unrelated features.
-
Full details: Linked Issues check
-
Explanation
Issue
#25470requires an opened failed session to clear its Failed badge. The change satisfies this for a failed latest run with a validcompletedAtlater thanlastVisitedAt. However,hasUnseenFailurereturnstruewhenlatestRun.completedAtisnullor when the runtime is failed without a failed latest run.resolveSidebarRowStatustherefore keeps the Failed badge after the thread is opened in these cases. This does not satisfy the issue requirement for failed sessions without a completion time, which identifiesruntime.updatedAtas the fallback timestamp.Resolution
Update the failure acknowledgment logic required by
#25470so a failed run withoutcompletedAtuses the appropriateruntime.updatedAttimestamp. Add or update tests that open this failure and verify that the Failed badge clears, while a later failure remains visible.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
…dy saw Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening a finished thread clears its Done badge, but opening a failed thread leaves the red Failed badge in the sidebar. An acknowledged failure keeps looking like it needs attention.
Fixes #25470. This replaces #25663, which was closed for missing before/after evidence.
Fix
A sidebar row's Failed badge now clears once you've opened the thread after it failed, the same way Done does. A later failure shows the badge again. Only the failed run's completion time dates the failure. A failure without one, such as a session failing before any run, stays unseen as on
main, so renaming a thread or changing its branch can't bring an already-seen failure back. Closed folder dots follow the same rule. New-failure notifications still use the raw status, so they're unchanged.This changes the web sidebar and the desktop app, which uses it. The native mobile sidebar is separate and unchanged.
Before / after
Same dev server and same threads: one finished Replay thread and one failed Replay thread, made with an unknown scenario. I opened each thread once, then went back to a new thread. For the "before" shot, I swapped the two changed web files back to
mainand Vite reloaded them.Before (
main): Done cleared, but the opened failed thread still shows Failed.After (this PR): both badges clear once their threads are opened.
Recording from #25663, showing the interaction with the fix:
t3code.25470.mp4
Verification
Sidebar.logic.test.ts: opening clears Failed without showing Done, a later failure shows it again, an undated failure stays unseen, and closed folder dots ignore opened failures. These 3 fail onmainand all 94 pass with the fix.vp run check:changed upstream/mainpassed format, lint, knip, typecheck, the React compiler check, and the unit tests. The neighboringSidebar.logic.browser.test.tsx(snooze clock and jump hints, not changed here) couldn't run locally because Playwright has no headless Chromium for Ubuntu 26.04. CI runs it.🤖 Generated with Claude Code