perf(web): defer PR partition reads until armed - #11416
Adamulek123 wants to merge 2 commits into
Conversation
Perf proof (pr-load-perf harness, baseline b1e223e)
|
|
Independent validation of Exercised all 8 wanted/armed/baseline flag combinations with 0–5 environments (48 fixtures). Disabled combinations produced no targets. Enabled combinations retained each environment’s own project IDs, including empty project arrays, with the selected host/state/filter and involvement intact. Inputs were frozen to catch accidental mutation. This validates target generation and isolation; it does not measure browser idle scheduling or actual query counts. Reproduction scripts and recorded results — Model: GPT-6. Harness: Codex. |
c432e47 to
25b0794
Compare
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This production change alters pull-request loading behavior by deferring two environment-wide server reads until idle time or column engagement. It changes both cold-open network usage and the timing of Authored/Reviewing data, so the scheduling gate and its user-visible loading impact merit human review. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughChangesPull-request partition loading
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other Sequence Diagram(s)sequenceDiagram
participant PullRequestsColumn
participant PullRequestsRoute
participant buildPullRequestPartitionTargets
participant PartitionQueries
PullRequestsColumn->>PullRequestsRoute: onPartitionsIntent()
PullRequestsRoute->>buildPullRequestPartitionTargets: build armed targets
buildPullRequestPartitionTargets->>PartitionQueries: authored and reviewing targets
PartitionQueries-->>PullRequestsRoute: partition results
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The deferred partition loads retain their query inputs and warm correctly after interaction or scheduled arming, with no actionable merge risk identified. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description clearly explains the change, motivation, validation, and measured impact, but it does not follow the required template. The Why and Checklist sections are missing, and the interaction change has no required video or explicit UI Changes section.
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Opening the PR tab fires 3 full listings (all plus authored plus reviewing) on cold open, tripling GitHub search cost and per-repo spawns on other hosts. The partitions exist so Authored and Reviewing tabs open instantly, so they cannot just be deleted.
What changed
Authored and reviewing partition reads now wait for a latched partitionsArmed gate (idle callback with timeout, or pointer and focus entering the PR column). Cold open drops to 1 search to first paint and partitions converge shortly after. Steady-state cache keys are unchanged, so tab switches still hit cache. Partition target construction was extracted into buildPullRequestPartitionTargets in pullRequestList logic with no behavior change.
Validation
Measured impact
Compared with main-latest.json from main commit b1e223e, using the focused partition-gating suite:
Partitions converge post-arm and later tab switches still answer from the warmed cache. Coverage: GUARD-ONLY (route wiring hole documented above).
Built with Muse Spark (opencode/muse-spark-1.3) via implement and audit subagent loops with strict branch-audit reviews.
Summary by CodeRabbit
Performance
Bug Fixes