Skip to content

fix(web): keep Windows thread notifications clickable until handled - #22520

Open
AKolenda wants to merge 2 commits into
pingdotgg:mainfrom
AKolenda:fix/notification-click-opens-thread
Open

AKolenda wants to merge 2 commits into
pingdotgg:mainfrom
AKolenda:fix/notification-click-opens-thread

Conversation

@AKolenda

@AKolenda AKolenda commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On Windows, clicking a "Thread completed" notification often does nothing: T3 Code doesn't come forward and the thread doesn't open.

This happens when the click lands on an entry in Notification Center rather than on the live banner. Windows moves a toast there after about 7 seconds. At that point Electron fires the web close event and drops its notification object. A later click on the Notification Center entry reaches Electron's toast activator with empty arguments and no live object to dispatch to, so it is discarded and the renderer never gets click. Every alert you weren't watching when it popped up is a dead entry, and I had around 20 of them stacked under T3 Code (Nightly).

Repro (Windows 11, Electron 44.4.5, a minimal app with the same notification options and click handler as ThreadNotificationCoordinator):

  1. Start a thread and switch away so the completion alert is sent as a system notification.
  2. Wait for the banner to slide away (about 7s).
  3. Open Notification Center and click the entry. Nothing happens.

Clicking the banner while it is still on screen works.

Change

On Windows, "Thread completed" notifications are now created with requireInteraction, reusing the existing isWindowsPlatform helper. Electron then shows the toast as a reminder that stays on screen with a Dismiss button until it is clicked or dismissed, so the click still goes to the live notification and the existing handler opens the thread.

Alerts won't pile up while you're in the app: the coordinator already closes pending notifications when the window regains focus, and a newer alert for the same thread replaces the old one by tag. Attention alerts (input, approval, failed, usage limit) keep the normal timeout, because another client can resolve them while this window stays unfocused, and a sticky banner would then advertise an action that no longer exists. Other platforms are unchanged.

Scope and approval

This is a small, focused fix for an obvious bug, so there's no prior issue. It finishes the click-to-open behaviour from #12567, which raised the window on click for #12500 (Linux), for the case where the Windows click never reaches that handler.

The trade-off is that Windows completion alerts now stay on screen until handled instead of timing out. Attention alerts can still lose their click after timing out, since closing them when they're resolved elsewhere needs extra plumbing that would also change the badge count. Fixing clicks on timed-out entries would need Electron-side changes, because the activation carries no data that identifies the thread. Entries that already landed in Notification Center before this change are unaffected.

Verification

  • vp test run src/components/ThreadNotificationCoordinator.browser.test.tsx src/components/ThreadNotificationCoordinator.badge.browser.test.tsx: 37/37 pass.
    • New tests: a Windows completion gets requireInteraction: true, and a Windows "Input needed" alert gets false. Each fails when the matching half of the condition is removed.
    • The existing exact-option assertions expect false. setup() now pins navigator.platform so the suite doesn't depend on the host OS.
  • vp lint, vp fmt --check and tsc --noEmit are clean for apps/web.
  • Manual check on Windows 11 with Electron 44.4.5 and the minimal app above:
    • Before: close fired at about 7s, the banner left the screen, and clicking the Notification Center entry produced no click.
    • After: the toast was still on screen at 15s; clicking it fired click, which revealed and focused the window.

Not checked: a full T3 Code desktop build on Windows. I also left out screenshots because my Notification Center showed unrelated private notifications.

Written by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running inside T3 Code. Independently reviewed before filing by GPT-6.1-Sol (gpt-6.1-sol, reasoning effort medium, fast service tier) via a T3 Code delegated task. Verdict: approve after three rounds. Round one flagged that the exact-option tests depended on the host OS. Round three covered the follow-up that keeps attention alerts on the normal timeout. Both are fixed.

Windows moves a timed-out toast into Notification Center, and Electron drops clicks on those entries because the notification object is already gone. Keep thread alerts on screen with requireInteraction on Windows so the click still opens the thread.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T21:55:43.162138Z bafedad PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

macroscopeapp Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — This focused fix makes Windows background thread notifications remain visible until handled, with browser coverage for Windows and non-Windows behavior. Because it changes the default user-facing behavior of Windows system notifications, it requires human review under the applicable policy.

You can add or adjust custom eligibility rules. Learn more.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bafedade96

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/ThreadNotificationCoordinator.tsx Outdated
Approval and input alerts can be resolved from another client while this window stays unfocused, so only completions stay on screen.
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 13695742-203e-4a31-acef-8808893861de
📥 Commits

Reviewing files that changed from the base of the PR and between bafedad and 7da6f5b.

📒 Files selected for processing: 2
  • apps/web/src/components/ThreadNotificationCoordinator.browser.test.tsx
  • apps/web/src/components/ThreadNotificationCoordinator.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

Desktop completion notifications require interaction on Windows. Other attention notifications retain timeout behavior. Browser tests cover Windows and default-platform behavior.

Changes: Platform-specific notification behavior

Layer / File(s) Summary
Notification policy and browser coverage
apps/web/src/components/ThreadNotificationCoordinator.tsx, apps/web/src/components/ThreadNotificationCoordinator.browser.test.tsx
The coordinator sets requireInteraction for completion notifications on Windows. Other attention notifications set it to false. Tests mock Navigator.platform and verify both platform behaviors.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 7da6f

The intended Windows completion notification behavior is implemented and covered by the supplied tests.

Security architecture risk: 🔵 Low · up to 7da6f

The change preserves existing notification permissions, environment-specific routing and click actions. Completion notifications intentionally keep thread titles visible longer on Windows. No new privilege or access path was identified, but actual Windows dismissal and cleanup behavior remains unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed policy affects Windows completion alerts across environments already configured in the current client. Its direct exposure is the local desktop display and the existing window-reveal/thread-navigation action, not a newly introduced service or datastore capability.

Trust Boundaries and Controls

  • inferred — Thread-derived content reaches the existing operating-system notification surface through unchanged permission and notification-mode gates. Click handling uses captured environment/thread identity rather than an activation-supplied destination. The change extends interaction lifetime without adding a new command, approval action or authority-bearing parameter.

Resilience and Maintainability Implications

  • inferred — Focus clearing and environment removal provide explicit containment for retained notifications. Dismissal without focus can leave coordinator bookkeeping until another cleanup trigger; this predates the PR and does not establish a new authorization failure. Actual Windows close/focus behavior remains unverified.
Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: keeping Windows thread notifications clickable until handled.
Description check Passed The description includes all required sections. It explains the problem, change, scope justification, targeted verification, manual Windows results, and limitations. Screenshots are omitted with an ex…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes all required sections. It explains the problem, change, scope justification, targeted verification, manual Windows results, and limitations. Screenshots are omitted with an explicit reason, but the description remains complete and relevant.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

This branch has not been deployed

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

Labels

size:XS 0-9 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