Repository navigation
refactor(web): move the thread's linked pull request out of ChatView - #20308
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR extracts existing linked pull-request resolution and relinking behavior from ChatView into a dedicated hook without introducing a new capability or changing product defaults. The compiler configuration addition only applies existing static checks to the extracted file, while runtime side effects remain bounded to the behavior being moved. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
e66da23 to
9df7d31
Compare
Dismissing prior approval to re-evaluate 9df7d31
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
useThreadLinkedPullRequest resolves which change request a thread is linked to, including replacing a merged or closed one with the branch's newer open one, and owns the effect that relinks it on the server and retargets an open panel. It compiles and joins the compile-required list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9df7d31 to
398f288
Compare
Part of the ChatView split so the React Compiler can compile it.
useThreadLinkedPullRequestnow works out which change request a thread is linked to. When the linked one is merged or closed and the branch has a newer open one, the newer one replaces it. The hook also owns the effect that relinks the thread on the server and moves an open panel to the new PR. ChatView gets backlinked,linkedKeyandhasDetail.The hook drops its manual
useMemo, compiles, and goes on the compile-required lint list (#20292). This also removes the unusedthreadRepositoryvariable.Stack progress
Measured with the native React Compiler (
oxc-transform-react) on each layer'sChatView.tsx. "Crashes" means it hit an internal codegen error and left ChatView uncompiled; "skips" means it reported reasons it could not compile it. Strict files must compile with no bailouts, no manual memoization and no effect-rule violations; lint andreactCompiledFiles.test.tsenforce it.🤖 Generated with Claude Code (Claude Opus 5.5)