Repository navigation
Conversation
Each sidebar row called useServerConfigs() through two hooks to read one boolean for its own environment. That subscribed every row to the whole server-config Map, so each config change re-rendered all rows during startup. The two hooks now read per-environment boolean atoms derived from the Map. A row only re-renders when its own environment's flag changes. Rows still re-render when an environment's config appears or its issues capability changes. Measured on a production build with 300 threads, headless Chromium, 12 loads per side: the base commit had 600 Map-attributed row renders in 5 of 12 loads; this change has zero in all 12. Model and harness: implementation by Claude Opus 5.5 and review by GPT-6.1 Sol, orchestrated from Claude Haiku 5.5 in T3 Code via Claude Code. Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Thread transfer impact
This comment will update automatically after the next completed run. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Thanks for this. #40019 makes the same change and is the one being kept. #40019 makes the same per-environment subscription change and also keeps rows without linked issues unsubscribed from issues-capability changes. That additional isolation, covered through the actual React hooks, makes it the more complete version to keep. Your measurements independently support removing the broad Map subscriptions. They are useful confirmation of the rendering improvement, even though the Windows timing improvement remains unverified here. Closing as a duplicate. |
Refs #39934
Each sidebar thread row called
useServerConfigs()through two hooks to read one boolean for its own environment. That subscribed every row to the whole server-config Map, so each config change during startup re-rendered all rows. The two hooks now read per-environment boolean atoms derived from the Map, so a row re-renders only when its own environment's flag changes. Rows still re-render when an environment's config appears or its issues capability changes.Render count. Row renders attributed to the server-config Map, production web build, 300 threads, headless Chromium, 12 loads per side, run back to back. Two runs per side.
Tests and checks.
vp run check:changedagainst the base commit: format, lint, knip, typecheck, the 3 affected test files, and the React compiler step all pass.apps/web/src/state/presentation.test.ts("notifies a row only when its own environment's flag changes"). It fails when the subscription is to the Map itself, which is how the sidebar read it on the base commit.useServerConfigsnow mockuseSupportsMultiplePullRequestsinstead. They pass with the same behaviour.Not shown:
ThreadDetailsIssueRowsstill reads the Map while its hover tooltip is open. It mounts only on hover.Unproven:
test-t3-apppass). This change has no visible UI difference. The production build was rendered with 300 threads in Chromium as described above.Implemented by Claude Opus 5.5 and reviewed by GPT-6.1 Sol, orchestrated by Claude Haiku 5.5 in T3 Code via Claude Code.
🤖 Generated with Claude Code