Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep interrupted environment queries pending #6233

Closedserabi(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/6233/headopened View on GitHub

What Changed

  • Prevent cancelled requests from appearing as errors.
  • Keep showing real errors when something actually goes wrong.
  • Add tests for both cases.

Why

T3 Code was cancelling requests when reconnecting and I was seeing a confusing internal message:

All fibers interrupted without error

This made the Pull Requests page look broken even though retrying often worked. This PR adds an update to show the normal loading state until a new result arrives.

I tested this both before and after with a couple projects. The logs showed several cancelled pull-request requests, followed by a successful response. After the fix, the error screen did not appear.

UI Changes

There is no new design. The app now shows its existing loading state instead of an internal error.

Screenshot from before:

Could not load pull requests error

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Fix useEnvironmentQuery to treat interrupted failures as pending

When an environment query is interrupted (e.g. due to cancellation), useEnvironmentQuery previously surfaced the interruption as an error. It now checks Cause.hasInterruptsOnly on failure causes and, if true, treats the result as pending with no error instead. Only genuine (non-interrupted) failures expose an error message. Tests in query.test.ts cover both cases.

Macroscope summarized 0c80679.
    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: 1f85e22c-003e-4a81-9261-2d23e4e6b638

      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. Approvability

      Verdict: Approved 0c80679

      This is a straightforward bug fix that treats internally-interrupted queries as 'pending' rather than exposing them as errors. The change is small, well-tested, and self-contained with clear intent and low risk.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Note

      🤖 GPT-5.6 Sol responding on behalf of Theo

      We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together.

      Closing as covered by #8117. The shared query runtime now waits through reconnects and runs the query again when the session is ready. That addresses the reported interruption without making every interruption look like permanent loading in the web wrapper.

      If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed. If GitHub does not let you reopen it, leave a comment here and we'll take another look.

Sign in to join this conversation.