Skip to content

Reopening a PR Guide with many cached diff pages crashes the thread with React error 301 #27534

Open

Description

@AndrewTinyakov

What happened

On T3 Code Desktop for macOS connected to this Mac's local server, a user generated a PR review Guide and subsequently experienced intermittent crashes when opening the associated thread. A failing attempt displayed Minified React error #301 at 2026-10-30T10:01:23.671Z. Other attempts opened normally. The user identified Guide generation as the unusual action preceding the crash.

Diagnosis

The Guide diff loader calls setLoaded during render for each settled diff page. When consecutive pages are already cached, it advances through them with consecutive render-phase state updates. It can exceed React's render limit before reaching the requested file.

An isolated harness running the unchanged release hook with React 19.3.0 reproduces the decoded error with 26 cached pages. Twenty-five pages load successfully. The harness mocks the query cache and patch parser; it does not reproduce the entire desktop UI. The installed desktop bundle contains the same render-phase pagination logic.

Source: useGuideDiffFiles.ts, lines 53–69.

The affected saved Guide has seven stops, including a final stop with 6,063 file references. The server trace records 31 successful diff requests during 09:58 UTC, followed by 62 during 10:01 UTC. This is consistent with cached-page replay, but the trace alone does not prove which component consumed each page. The thread remains readable through the server. The exact desktop component stack was not available.

The reported intermittency is consistent with this failure depending on how many settled pages are available synchronously from the client cache. Cache state at each successful or failing desktop attempt has not been captured, so that connection remains an inference.

Steps to reproduce

Deterministic hook-level reproduction:

  1. Use the release's unchanged useGuideDiffFiles hook and React 19.3.0.
  2. Provide a query cache containing 26 settled pages, each with a distinct, increasing cursor.
  3. Put a requested file on page 26; earlier pages contain other files.
  4. Render a component calling the hook with that requested path.
  5. Rendering throws Too many re-renders. React limits the number of renders to prevent an infinite loop. Repeat with 25 pages and it succeeds.

Reported desktop sequence: use the Guide feature, then open the associated thread. Some attempts succeed and others crash. A candidate full UI reproduction is to generate a Guide for a large PR, load its paginated diff, navigate away, and reopen the thread with its Guide tab selected. The tab selection and exact cache state at failure have not been confirmed, and this full UI sequence has not been independently replayed.

Version

0.1.6-nightly.20261030.3917, desktop and local server. Release commit: 97e35bcf23e4dcf34c2dcffadd37c08db0e01e52.

Environment

macOS, Darwin 25.3.0, arm64. Node v24.22.1. Desktop-managed server. React 19.3.0 per the release dependency catalog.

Evidence

User error time: 2026-10-30T10:01:23.671Z
Guide generatedAt: 2026-10-30T09:58:20.183Z
Guide size: 602,328 bytes; 7 stops; final stop has 6,063 files

1 cached page: PASS
24 cached pages: PASS
25 cached pages: PASS
26 cached pages: Too many re-renders
30 cached pages: Too many re-renders
100 cached pages: Too many re-renders

Stack excerpt:
at rs (t3code://app/assets/dist-DzJ2VPMz.js:34:49463)
at ts (t3code://app/assets/dist-DzJ2VPMz.js:34:49195)
at Jc (t3code://app/assets/dist-DzJ2VPMz.js:34:71871)

Related issues

No matching issue found in searches for the exact decoded error, useGuideDiffFiles, or Guide rendering/crashes. Issue #26033 concerns failed Guide generation and a clipped retry action, not this render loop. The installed build was the newest published release checked; the eight commits then on main did not change the Guide diff loader.

Fix applied or workaround

No live settings, database, or installed source were changed. The user declined a workaround. Temporarily disabling Review guides (beta) was proposed based on the source's fallback to Summary on a fresh panel mount, but has not been applied or verified on the user's UI.

Filed by

Investigated and written by Codex, model gpt-6.1-sol, reasoning effort xhigh, running in T3 Code. Requested label: via-triage.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions