Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): thread error banner dismiss survives reconnect and rerenders #6123

Mergedmyacoub91(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/6123/headmerged by maria-rcks View on GitHub

The ThreadErrorBanner dismiss did not survive reconnects or rerenders. Because it was keyed only by thread id, switching model or provider reopened it, a component remount restored it, and navigating to another thread wiped the dismissal for the original thread.

Dismissal is now remembered per thread key plus error message in a session-scoped set, mirroring the branch-mismatch banner. It stays masked until a different error message shows on that thread, and it survives route changes, remounts, and navigating between threads. Dismiss also clears the local error shadow for the thread. A genuinely new error on the current thread still appears.

Verified with the ThreadErrorBanner test suite (6 tests passing) plus targeted lint and typecheck.


Note

Low Risk UI-only banner visibility and session-local dismissal state; underlying thread errors are unchanged.

Overview Thread error dismiss now follows the same session-scoped pattern as the branch-mismatch banner: dismissals are stored in a module-level Set keyed by thread route key + error message, so the banner stays hidden after reconnects, ChatView remounts, and switching threads—without clearing session.lastError.

ChatView derives visibleThreadError via shouldShowThreadErrorBanner instead of always showing threadError, and dismiss still clears the local error shadow while recording the session dismissal and bumping a dismiss tick so the UI hides immediately when the banner is driven only by persisted session error. Timeline top spacing uses the visible error, not the raw one.

New unit tests cover per-thread scoping, persistence across navigation with no error, re-show on a new message, and null-error behavior.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eddd66eb4ad16b7fe357914e10ae7a3dba7f5ad1. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Fix thread error banner dismiss to persist across reconnects and rerenders

  • Introduces a module-level Set in ThreadErrorBanner.tsx to track dismissed error banners per thread+message for the duration of the session, surviving ChatView remounts and reconnects.
  • Adds getThreadErrorBannerKey, shouldShowThreadErrorBanner, dismissThreadErrorBannerForSession, and isThreadErrorBannerDismissedForSession utilities to manage visibility state.
  • Updates ChatViewContent to gate banner visibility via shouldShowThreadErrorBanner and use a local tick state to force a rerender on dismiss, so the banner hides immediately.
  • Different errors on the same thread still show a new banner; only the specific dismissed thread+message combination is suppressed.
Macroscope summarized eddd66e.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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: cf046364-a782-4ab0-9c98-e3b7384e4f82

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved eddd66e

      Self-contained UX bug fix that adds session-scoped tracking for dismissed thread error banners. The implementation follows existing patterns (branch-mismatch banner), is limited to display logic, and includes comprehensive unit tests.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 30d1fa9af963e722d728c4f187cf29e0fa757c38. Configure [here](https://www.cursor.com/dashboard/bugbot).
    5. maria-rcks merged this57b1052

    6. maria-rcks closed this

Sign in to join this conversation.