fix(web): hide ineffective mark unread actions during active runs#25060
Problem
With the beta Working section enabled, a running thread offers “Mark unread” even though its latest run has no completion to mark unread. Clicking it has no visible effect. Reproduced in the real web app on current main with a Codex thread running sleep 120.
Change
Hide the action during active runs in sidebar and thread-header menus, including the legacy sidebar. Bulk menus omit it when all selected threads are active and count and target only eligible threads in mixed selections. Finished threads and idle monitoring threads retain the action.
Scope and approval
Fixes https://github.com/pingdotgg/t3code/issues/24934
Triaged bug via the automated issue flow. GitCafe: #24934.
Verification
- Failing regression test first for active-thread menu availability; focused tests pass after the fix. Bulk active-only and mixed-selection tests also failed before their fix.
vp run check:changedpassed: format, lint, knip, affected-package typechecks and adjacent tests. Independent reviews passed 71 tests across three focused files and 65 tests across two focused files; both reviewers returned MERGE after the bulk fix.- Real-app reproduction and after check: active menu offered the action on the base and omitted it on the fix. Reproduction notes.
Evidence
Fixture matrix, recordings, full before/after tables, diffs and environment details, all artifacts and fixture drivers.
Matched projection fixtures in the real Chromium web app cover current/legacy single and bulk menus and header click/context menus at 1440×900 and 390×844, light and dark. DPR 2; desktop PNGs are downscaled by T3 preview. Fixed clock, motion/grain suppressed, identical sidebar width and collapsed details panel. These fixtures prove presentation; the original reproduction used a real provider turn.
| Viewport/theme | Before | After | Diff 0 ×8 | Diff 16/255 |
|---|---|---|---|---|
| 1440×900 light | base-1440-light-current-active.png | head-1440-light-current-active.png | diff-1440-light-current-active-threshold0-x8.png | diff-1440-light-current-active-threshold16.png |
| Revision | e3592efe7f | 3027afd797 | Same pair | Same pair |
Intended visible changes are the removed active-thread item, resulting menu size/position, and eligible bulk count. Wide comparisons also have small differences outside the menu and are not literally omission-only pixel comparisons. Finished controls retain the item. The narrow recordings show menu behavior, but their full-page diffs also contain an incidental chat/composer layout mismatch and are qualified, not omission-only proof.
Unverified proof rows: W1 positive mutation is partial (dispatch targets verified; legacy control was not reset to read); W3/W4 clean full-page comparison is incomplete; I1 keyboard/real run-transition recording is missing. D1 native Electron menus could not be checked because this VM lacks headless-desktop. Native mobile has no Mark unread action and is unaffected. Native reduced-motion media emulation was not verified; CSS motion suppression was used. The full evidence matrix is not claimed complete. Independent proof audit: INSUFFICIENT for the complete matrix; rebuilt endpoint differs by 387 pixels (0.0378%) across the frame, with a pixel-identical menu interior.
Model and harness: GPT-6.1-Sol and Claude Opus 5.5 through the Codex/Claude harnesses in T3 Code.
Checks
Added 3 commits
Approvability
Verdict: Approved at 3027afd
Macroscope's review found this PR approvable — This is a small, self-contained web bug fix that hides an ineffective unread action during active runs and filters mixed bulk selections accordingly. The behavior is localized to existing menus and is covered by focused tests.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review.
External image Recent review info
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: fix/issue-24934
- File: .coderabbit.config.ts
- Commit: 3027afd
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Team
- Run ID:
6d12f662-ed93-4188-b950-4051c0c8740f
External image Commits
Reviewing files that changed from the base of the PR and between 725ada6eaa32d4a32c361ee42a1717a3e65568d1 and 3027afd79720618974d965e7076e77e8aac1d38b.
External image Files selected for processing: 7
apps/web/src/components/LegacySidebar.tsxapps/web/src/components/Sidebar.logic.test.tsapps/web/src/components/Sidebar.logic.tsapps/web/src/components/Sidebar.tsxapps/web/src/components/threadActionMenu.logic.test.tsapps/web/src/components/threadActionMenu.logic.tsapps/web/src/hooks/useThreadActionMenu.ts
Limit details: You’ve used all 10 included reviews currently available.
Walkthrough
Sidebar menus now omit “Mark unread” for active threads. Bulk menus count and target only eligible threads. Archive and delete actions remain available for the full selection.
Changes: Mark-unread menus
Layer / File(s) Summary Eligibility and bulk menu logic
apps/web/src/components/Sidebar.logic.ts,apps/web/src/components/Sidebar.logic.test.tsThe eligibility predicate excludes active threads. Bulk menu items use the eligible-thread count and are omitted when no threads are eligible. Tests cover active and mixed selections. Sidebar menu wiring
apps/web/src/components/threadActionMenu.logic.ts,apps/web/src/components/threadActionMenu.logic.test.ts,apps/web/src/hooks/useThreadActionMenu.ts,apps/web/src/components/Sidebar.tsx,apps/web/src/components/LegacySidebar.tsxBoth sidebars omit the individual action for active threads. Bulk actions target only eligible threads. Tests cover active-run menu visibility. Priority: External image Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Severity of issue fixed: Low
Possibly related issues
- pingdotgg/t3code#24136: The issue describes mark-unread rejection during an active scheduled run; this change hides the action for active threads in the UI.
Possibly related PRs
- pingdotgg/t3code#24157: This PR also handles mark-unread during active runs, but defers the action until completion instead of hiding it in client menus.
Suggested reviewers:
t3dotgg
Merge Risk: External image Minimal · up to 3027a
Mark unread is hidden or limited for active threads while remaining available for eligible threads. The change is mergeable after normal checks.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title clearly and concisely describes the main change: hiding ineffective Mark unread actions during active runs. Description check Passed The description includes all required sections, explains the problem and scope, links the issue, describes the implementation, and provides focused verification results with explicit limitations and e… Linked Issues check Passed Issue #24934requires no ineffective “Mark unread” action for a thread in the Working section. The change omits the action whenthreadRuntimeIsActive(thread.runtime)is true in the current sidebar, …Out of Scope Changes check Passed The broader menu coverage remains connected to issue #24934. The legacy sidebar, thread-header menu, and bulk menu are additional surfaces for the same ineffective action. The added helpers and tests …Full details: Description check
Explanation
The description includes all required sections, explains the problem and scope, links the issue, describes the implementation, and provides focused verification results with explicit limitations and evidence.
Full details: Linked Issues check
Explanation
Issue
#24934requires no ineffective “Mark unread” action for a thread in the Working section. The change omits the action whenthreadRuntimeIsActive(thread.runtime)is true in the current sidebar, legacy sidebar, and thread-header menu. Bulk menus omit the item when no selected thread is eligible and mark only eligible threads in mixed selections. Regression tests cover active single-thread menus, active-only bulk selections, and mixed selections.
Full details: Out of Scope Changes check
Explanation
The broader menu coverage remains connected to issue
#24934. The legacy sidebar, thread-header menu, and bulk menu are additional surfaces for the same ineffective action. The added helpers and tests support the active-run eligibility rule. No unrelated behavior appears in the reviewed diff.
Finishing Touches
📝 Generate docstrings
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
- Mode: Continue automatically
- Reviewed files: 7
- Charged: $1.75
- View usage details
Note
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
Comment @coderabbitai help to get the list of available commands.