Pull Requests page shows an unnamed relay error and Retry never clears it when one linked environment is offline#27821
What happened
The Pull Requests page in the desktop app shows a persistent warning banner: "Relay could not reach the environment endpoint (endpoint_request_failed). Showing the last pull requests loaded." Pressing Retry does nothing, and restarting T3 Code several times did not clear it. The user has two environments: the local Mac (healthy) and an Arch Linux machine reached through T3 Connect, which is currently shut down.
Diagnosis
The page fetches pull requests from every capable environment and combines the results. The offline Arch Linux environment makes the relay return RelayEnvironmentEndpointUnavailableError (endpoint_request_failed), and that becomes the page-level error.
In apps/web/src/state/pullRequests.ts, createMergedEnvironmentQuery keeps only the first failure (if (result._tag === "Failure" && error === null) error = formatEnvironmentQueryError(result.cause)) and drops the environmentId of the target that failed. As a result:
- The banner doesn't say which environment is unreachable, so the user can't tell that one offline machine is the cause. It reads as if pull request loading is broken in general.
- Retry (
listQuery.refresh()) asks the offline environment again, so the same error comes straight back. To the user, Retry appears to do nothing. - An environment that is expected to be offline (a machine that is shut down) keeps the whole page in an error state until the user narrows the environment picker by hand.
The local environment answers normally. Its PRs are listed and the server is healthy. The same code is unchanged on main as of 2026-10-30.
Suggested behaviour: name the failing environment in the banner (for example, "archlinux is unreachable: …"), and/or show offline environments as a per-environment status instead of a page-wide error. Consider leaving environments the connection layer already reports as offline out of the PR fan-out.
Steps to reproduce
- Link two environments to the same account: the local desktop environment, plus a second machine through T3 Connect.
- Shut down the second machine (or stop its T3 Code server or tunnel).
- Open Pull Requests with the environment picker set to All.
- The banner shows "Relay could not reach the environment endpoint (endpoint_request_failed). Showing the last pull requests loaded." It doesn't name an environment.
- Click Retry: the banner stays. Switching the picker to only the local environment makes it go away.
Version
Desktop 0.1.6-nightly.20261030.3940 (commit ae521d1d796c), latest nightly at the time of filing
Environment
macOS (Darwin 27.0.0, arm64), Node v24.22.1, T3 Code Desktop with local server; second environment: Arch Linux via T3 Connect (offline)
Evidence
| 1 | # Banner text |
| 2 | Relay could not reach the environment endpoint (endpoint_request_failed). Showing the last pull requests loaded. |
| 3 | |
| 4 | # apps/web/src/state/pullRequests.ts (ae521d1d), createMergedEnvironmentQuery |
| 5 | if (result._tag === "Failure" && error === null) { |
| 6 | error = formatEnvironmentQueryError(result.cause); // environmentId of the failing target is dropped |
| 7 | } |
| 8 | |
| 9 | # apps/web/src/components/pullRequest/PullRequestsPage.tsx |
| 10 | {listQuery.error && shownCount > 0 ? ( |
| 11 | <span>{listQuery.error} Showing the last pull requests loaded.</span> |
| 12 | <Button ... onClick={() => listQuery.refresh()}>Retry</Button> |
Related issues
#8844 (T3 Connect endpoint_request_failed when opening an environment, Windows → iOS) is about the tunnel itself failing. Here the remote machine is offline on purpose, and the problem is how the PR page reports it. #19363 is about PR page refresh cost, which is unrelated.
Fix applied or workaround
Nothing was changed on the machine. Workaround: in the PR page's environment picker, select only the environments that are online.
Filed by
Claude Code (claude-opus-5-5) via T3 Code triage