Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): add dismiss button to thread error banner #588

Mergedbinbandit(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/588/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Summary

Adds a dismiss button to the thread error banner so users can clear errors that would otherwise persist indefinitely.

Closes #496

Problem

ThreadErrorBanner rendered an Alert with no close button. The only way to clear an error was to send a new message (which resets the error to null). If the thread was in a broken state (e.g. missing gh CLI during PR creation), the user was stuck with a persistent, undismissable error banner.

Changes

apps/web/src/components/ChatView.tsx

  • Added onDismiss prop to ThreadErrorBanner, rendering an AlertAction with a close button (XIcon) that clears the thread error.
  • Imported the existing AlertAction component from ./ui/alert (was exported but unused).
  • Wired the dismiss callback at the call site: () => setThreadError(activeThread.id, null).

Single file changed. No store or contract changes.

Testing

  • bun lint — 0 errors
  • bun typecheck — 0 errors
  • bun run test — no regressions

Note

Add a dismiss button to the chat thread error banner in ChatView.tsx to clear the active thread error

Introduce an optional onDismiss prop to ThreadErrorBanner and wire it in ChatView to call setThreadError(activeThread.id, null); render an AlertAction with an XIcon button when the callback is provided.

📍Where to Start

Start with the ThreadErrorBanner prop changes and dismiss handling in ChatView.tsx.

Macroscope summarized 2b8c294.
    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

      Run ID: 3e991338-8bd3-48b5-9563-1bae7a00eb1c

      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
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment

      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 and usage tips.
    2. t3dotgg(GitHub profile, opens in a new tab) approved these changes

    3. binbandit(GitHub profile, opens in a new tab) changed the title

    4. @t3dotgg Possible to run the Vercel workflow, so then we can merge this? Thanks

    5. Vercel workflow isn't necessary (and should not have triggered on this PR, I changed settings after you filed it)

      Will merge momentarily after actions run

Sign in to join this conversation.