Skip to content

Combine PR participants and viewed-file queries - #34842

Merged
OrcaWin merged 5 commits into
mainfrom
OrcaWin/github-detail-context
Oct 29, 2026
Merged

OrcaWin merged 5 commits into
mainfrom
OrcaWin/github-detail-context

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Opening a PR fetched participants and viewed-file state through separate GraphQL requests. Fetch them together to save one GraphQL request and point per complete context read. Body/head/base metadata stays on its existing cached REST path, preserving its freshness relationship with the cached REST file list.

  • Isolate participants and viewed files in separately aliased PR selections, so GraphQL null propagation in one cannot discard the other.
  • Preserve successful partial stdout from nonzero gh exits. Recover unavailable participants with the existing reader; keep failed/incomplete viewed state unavailable.
  • Later pages select only files, retaining the existing 300-file bound. File patches, conversation reads and detailed checks stay on their existing paths. Cached metadata and the combined GraphQL read each own a semaphore permit; nested client reads remain outside those permits.
  • No batching wait, new response cache, longer TTL or change to refresh cadence. Existing account, host, WSL/SSH, folder-workspace and mobile contracts are preserved.

Validation:

  • 28 focused tests passed across detail context, viewed files, file-list handling, concurrent loads and Enterprise/remote routing. Includes real null-propagation envelopes, reverse alias failure, partial stdout, pagination, failure recovery, exhausted REST quota and preservation of the 60-second metadata cache.
  • Live aliased query against fix(github): count gh pr and issue commands against the GraphQL rate limit #28778: no errors, 1 GraphQL point, 2 participants, 6 files and a usable PR id.
  • Replayed four concurrent PR loads against the prior head: the new guard fails with 5 concurrent gh reads despite the four-permit limit. The fix passes with at most 4, returns viewed state, and releases all permits without deadlock.
  • pnpm check:changed --maxWorkers=2: 19/20 checks passed; the broad affected-test phase timed out at 300 seconds. The five focused suites passed separately. Full CI passed on exact head 07677472453a446fd975f75fa58fb642ecef1160 (run 40764835928), including all five unit shards, relay integration and Linux/Windows packaging. No full local pass is claimed.
  • Independent Claude review found no actionable regressions and passed all 28 focused tests on this head.
  • Executed locally on Linux. Native Windows/macOS/WSL/SSH transport checks were not run; execution routing is covered by mocks.

Follow-up to #28778. No UI changes; visual proof is not applicable. No RPC or persisted-data changes.

@OrcaWin
OrcaWin marked this pull request as ready for review October 28, 2026 07:20
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bb0e15e5-e507-46a1-bb8d-e98b61c7bf98
Commits

Reviewing files that changed from the base of the PR and between 8affd2e and 0767747.

Files selected for processing: 7
  • src/main/github/pull-request-detail-context.test.ts
  • src/main/github/pull-request-detail-context.ts
  • src/main/github/work-item-details-concurrency.test.ts
  • src/main/github/work-item-details-enterprise-host.test.ts
  • src/main/github/work-item-details-file-viewed.test.ts
  • src/main/github/work-item-details-pr-files.test.ts
  • src/main/github/work-item-details.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Walkthrough

Pull-request detail loading now retrieves participants and viewed-file states through a combined GraphQL flow. The flow supports paginated file results, partial GraphQL failures, and participant fallback. Metadata and file reads remain separate concurrent operations. Tests cover retrieval, pagination, rate-limit behavior, execution routing, and detail-loading integration.

Priority: Low

Merge Risk: Minimal · up to 07677

No merge-blocking issue is established; complete the normal checks before merging.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description explains the change, rationale, testing, scope, and platform coverage. It does not follow the required template structure and omits several required sections, including ELI5, explicit … Rewrite the description using all template headings. Add a plain-language ELI5 section, explicit before/after and mechanism details, the linked issue in the required format, N/A with a reason under Visual Proof, review and compatibility n…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: combining PR participant and viewed-file GraphQL queries.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 7 functions across 8 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Description check

Explanation

The description explains the change, rationale, testing, scope, and platform coverage. It does not follow the required template structure and omits several required sections, including ELI5, explicit What Changed, Why, Linked Issue with Fixes #, Review, Agent skill upstream boundary, Notes, and Checklist confirmations.

Resolution

Rewrite the description using all template headings. Add a plain-language ELI5 section, explicit before/after and mechanism details, the linked issue in the required format, N/A with a reason under Visual Proof, review and compatibility notes, the Agent skill upstream boundary selection, and completed Checklist items. Preserve the existing testing and validation details.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OrcaWin OrcaWin changed the title perf(github): combine PR detail context reads Combine PR participants and viewed-file queries Oct 28, 2026
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the shared-permit issue is fixed.

Summary

Combines PR participants and viewed-file state in one GraphQL request.

  • Pull request details load participants and viewed files with one query.

Reviews (3) · Last reviewed commit: "Give cached metadata and PR context inde..." · Reviewed by Greptile

@OrcaWin
OrcaWin merged commit 4c42c44 into main Oct 29, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant