Skip to content

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

Closed
serabi wants to merge 1 commit into
pingdotgg:mainfrom
serabi:fix/environment-query-interruption
Closed

fix(web): keep interrupted environment queries pending#6233
serabi wants to merge 1 commit into
pingdotgg:mainfrom
serabi:fix/environment-query-interruption

Conversation

@serabi

@serabi serabi commented Aug 11, 2026

Copy link
Copy Markdown

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.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

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.

@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 Aug 11, 2026
@serabi
serabi marked this pull request as ready for review August 11, 2026 22:16
@macroscopeapp

macroscopeapp Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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.

@t3dotgg

t3dotgg commented Aug 27, 2026

Copy link
Copy Markdown
Member

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.

@t3dotgg t3dotgg closed this Aug 27, 2026
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.

2 participants