Skip to content

fix(github-project): show linked PRs and sub-issue progress - #34185

Merged
brennanb2025 merged 10 commits into
mainfrom
brennanb2025/tp-project-fields
Oct 27, 2026
Merged

brennanb2025 merged 10 commits into
mainfrom
brennanb2025/tp-project-fields

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​666 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​663
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​307 $\color{#cf222e}{\Huge{\mathbf{−}}}$​124 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​183

GitHub Project views offered “Linked pull requests” and “Sub-issues progress” columns, but populated cells stayed blank because the items query, normalization and renderer did not read either value.

Desktop Project cells now show up to ten linked PR numbers plus the remaining count, and completed/total sub-issues with their percentage. Both values arrive through the existing paginated items query, with no per-item request. Missing values and zero sub-issues stay blank. Built-in column sorting/grouping and phone formatting keep their existing behavior.

The existing owner/host capability probe remembers each unsupported optional selection independently. An older server can omit an unsupported relation while keeping the others, and only an unsupported Parent issue selection triggers the existing parent warning. Named Enterprise hosts use the same capability checks. Authentication, quota and network failures retain their existing errors. Intended compatibility behavior: the bounded in-memory cache re-probes after eviction or process reload, as before.

Both relations are optional row content. Older renderers receive no new field-value kind, and newer renderers tolerate older hosts omitting the properties. The nested PR connection remains bounded at ten entries. A schema probe makes at most four first-page attempts, each retry removing a rejected selection.

Table loading preserves nullable field-value nodes and allows independent requests once every optional selection is already known unsupported. The implementation reuses the existing normalization and capability cache, with no new saved state. The final production diff is 346 changed lines.

Validation: 122 named root tests and 30 mobile tests passed locally. Coverage includes actual query → normalization → rendered cells, partial schemas, unrelated failures, null nodes, true older row payloads, local/environment store and cache readers, optimistic patch preservation, RPC pass-through, shared sort/group and mobile schema/projection/display. A 50/500-row contract verifies paginated request counts and linear PR reads. The cross-layer integration suite runs in the existing unit-test program; after relocation, all 41 tests in the three affected files passed. CI is the lint/typecheck gate.

Visual evidence uses the real ProjectCell component fed through production normalization in dark and light fixtures. The QA account lacked the read:project scope, so no live Project or whole-app validation is claimed. The fixture shows populated, complete and absent values; both themes had zero page/console errors. The screenshot and full-loop status are in the review comment.

Full path: optional host/renderer payload and capability failure handling across versions. Main was merged once before final CI; the PR’s production files were unchanged by that merge.

Builds on #12821 by @innocarpe, with contributor authorship preserved.

Tracked in #12649
Tracked in STA-3462

@brennanb2025
brennanb2025 marked this pull request as ready for review October 27, 2026 01:20
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

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: 30d4e51b-c8a8-4bfd-a841-d787f84a0c90
Commits

Reviewing files that changed from the base of the PR and between ab14acb and c6da796.

Files selected for processing: 17
  • mobile/src/tasks/task-project-board-reply-schema.test.ts
  • src/main/github/project-view-field-values.test.ts
  • src/main/github/project-view/project-error-classification.ts
  • src/main/github/project-view/project-view-cache.ts
  • src/main/github/project-view/project-view-field-normalization.ts
  • src/main/github/project-view/project-view-item-normalization.ts
  • src/main/github/project-view/project-view-item-page.ts
  • src/main/github/project-view/project-view-items.ts
  • src/main/github/project-view/project-view-query-fragments.ts
  • src/main/runtime/rpc/methods/github.test.ts
  • src/renderer/src/components/github-project/ProjectCell.test-fixture.tsx
  • src/renderer/src/components/github-project/ProjectCell.tsx
  • src/renderer/src/store/github/project-field-mutations.test.ts
  • src/renderer/src/store/slices/github-project-request-coordination.test.ts
  • src/shared/github/project-relations.test-fixture.ts
  • src/shared/github/project-types.ts
  • tests/e2e/github-project-provider-columns.unit.test.ts
Walkthrough

The project-item query now selects linked pull requests and sub-issue progress, and it omits unsupported optional fields based on cached per-owner capability data. Normalization adds these relation values to project rows, and ProjectCell renders their counts and progress. Tests cover query retries, pagination, rendering, transport, caching, mobile projection, and field mutations.

Priority: Normal

Merge Risk: Moderate · previous review ab14a

The added scale contract test can fail deterministically; clone each row’s nested PR nodes before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surv… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: displaying linked pull requests and sub-issue progress in GitHub Project views.
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.
Description check Passed The description is detailed and covers the user impact, implementation, rationale, linked issues, testing, compatibility, performance, and visual evidence. It does not follow the template headings or …
Full details: Description check

Explanation

The description is detailed and covers the user impact, implementation, rationale, linked issues, testing, compatibility, performance, and visual evidence. It does not follow the template headings or include the checklist items, explicit AI disclosure, or a direct Fixes # reference, but the required information is mostly present.

Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 20 functions across 17 files.

Resolution

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

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Nitpick comments: 1
src/main/github/project-view/project-view-query-fragments.ts: 1

68-75: Trivial · Performance & Scalability · Low value

Drop the unused title and url fields from the linked-PR selection.

pullRequests(first:10) requests title and url for each linked PR. ProjectCell renders only #${pr.number}, and no other reader in src uses those fields. Each fetched item carries payload that the row never displays.

Suggested fix
         pullRequests(first:10) {
           totalCount
-          nodes { number title url }
+          nodes { number }
         }
-  pullRequests: { number: number; title: string; url: string }[]
+  pullRequests: { number: number }[]

Update normalizeLinkedPullRequests in src/main/github/project-view/project-view-field-normalization.ts to stop reading title and url.

Source: Learnings


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: 8bf52a6e-6340-407f-9fbd-15dc60f9c7af
Commits

Reviewing files that changed from the base of the PR and between 8d32eb0 and 07bd34b.

Files selected for processing: 11
  • src/main/github/project-view-field-values.test.ts
  • src/main/github/project-view/project-error-classification.ts
  • src/main/github/project-view/project-view-cache.ts
  • src/main/github/project-view/project-view-field-normalization.ts
  • src/main/github/project-view/project-view-item-normalization.ts
  • src/main/github/project-view/project-view-item-page.ts
  • src/main/github/project-view/project-view-items.ts
  • src/main/github/project-view/project-view-query-fragments.ts
  • src/renderer/src/components/github-project/ProjectCell.test.tsx
  • src/renderer/src/components/github-project/ProjectCell.tsx
  • src/shared/github/project-types.ts

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

@brennanb2025

brennanb2025 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

GitHub Project columns for linked pull requests and sub-issue progress stayed blank because the items query and cell pipeline did not read the values. Desktop cells now show PR numbers with a remaining count and completed/total sub-issues with a percentage. Missing data stays blank, and older schemas keep every relation they support.

The full review loop completed two production review rounds and a fresh KEEP ruling after test-validation fixes. It fixed a legal null field-value node crashing the table and unnecessary waiting when every optional selection was already known unsupported. Safe cuts removed duplicate dispatch, unused query metadata and cache wrappers. No open production findings remain. Existing phone formatting and built-in sorting/grouping are unchanged; those are outside this desktop rendering fix.

Verified: 122 named root tests and 30 mobile tests passed locally, including query → normalization → real cells, independent schema fallback, legacy rows, local/environment store/cache reads, optimistic patches, RPC pass-through and mobile schema/projection/display. The 50/500-row contract checks pagination, 1/5 page requests and linear PR reads. Source readiness passed on 1c6cdc6874620c7d9703f9bb04bdf0cc7c2dee3a. Final CI passed on c6da7969d13bba77beffcb0b8296fb6b1912b211. Both main merges were clean. The first left the PR’s production files unchanged; the CI-fix merge left all 17 files in this PR’s change unchanged. Test-only CI cleanup combines duplicate imports, uses checked payload types, moves cross-layer tests into the existing test program, and removes an unused React binding. The affected named tests pass (41 after the final move).

For Brennan’s review

These are branch screenshots of the real ProjectCell fed through production normalization, using a component fixture. The QA account lacked read:project, so no live Project or whole-app result is claimed. Populated, fully complete and absent values passed in both themes with zero page/console errors.

Populated Project columns — dark

Populated Project columns — light

Judgment spots: independent capability fallback, optional row content and null-safe dispatch, the two cells.

Screenshot head: 07bd34b7d28d0ddd1ce8292c6047726ddd0bc46f. Later 5f5735dbc5147a8e1644d7f90981fa75265a27ed changes the tests-row null-input normalization and unsupported-fetch flows, covered by their regressions, and leaves cell appearance unchanged. 1c6cdc6874620c7d9703f9bb04bdf0cc7c2dee3a adds tests only. Main merge 52957c00768e8fe50223a385232c9749551bc11d and test-only cleanup commits 7a6df0daad0ee67df07201daa4d4677c56eb91ba / fb71713a4a4baf755370dc7252644d7d1f1e8cdc and test-program relocation ab14acb2f2a2bfbaa1cbff8a29f85bdc76d555bb and main CI-fix merge c6da7969d13bba77beffcb0b8296fb6b1912b211 carry this evidence; no required run-row flow changed. The latter merge includes #34202 and resolves the earlier main-branch CI blockers.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Clone the nested PR nodes for each scale-test… · github-project-provider-columns.unit.test.ts:477-525

tests/e2e/github-project-provider-columns.unit.test.ts:477-525
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clone the nested PR nodes for each scale-test row.

normalizeLinkedPullRequests reads node.number twice: once for validation and once for copying. The spy also reads node.number before installing its getter. Because { ...item } shares the nested PR nodes, later rows count that pre-read through the getter. The first case records 20 + (count - 1) * 30 reads instead of count * 20, so the assertion fails.

beforeEach and vi.restoreAllMocks() do not restore the mutated fixture nodes, so sharing can also affect the second parameterized case.

Suggested fix
-      const corpus = Array.from({ length: count }, (_, i) => ({ ...item, id: `item-${i}` }))
+      const corpus = Array.from({ length: count }, (_, i) => ({
+        ...item,
+        id: `item-${i}`,
+        fieldValues: {
+          ...item.fieldValues,
+          nodes: item.fieldValues.nodes.map((fieldValue) => ({
+            ...fieldValue,
+            pullRequests: fieldValue.pullRequests
+              ? {
+                  ...fieldValue.pullRequests,
+                  nodes: fieldValue.pullRequests.nodes?.map((node) => (node ? { ...node } : node))
+                }
+              : fieldValue.pullRequests
+          }))
+        }
+      }))

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: f1066a77-dbd4-4622-ae8c-cec9d7c8afd5
Commits

Reviewing files that changed from the base of the PR and between fb71713 and ab14acb.

Files selected for processing: 2
  • src/renderer/src/components/github-project/ProjectCell.test-fixture.tsx
  • tests/e2e/github-project-provider-columns.unit.test.ts
Files with no reviewable changes: 1
  • src/renderer/src/components/github-project/ProjectCell.test-fixture.tsx

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

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.

2 participants