Repository navigation
Group the ticket card's pull requests and Trac patches so long lists stay short - #713
Conversation
A ticket with many pull requests pushed the rest of the card down (#709). The list is now two groups, Open and Closed, each heading a button that folds it and says how many it holds. Open starts unfolded, Closed folded. The applied pull request sits above both groups in a tinted box, and the latest one above them too, so folding never hides either.
Both lists now follow one rule (#709). With nothing applied, each shows its newest, the ticket's latest patch whenever that is in the list. With a pull request or a patch applied, only the applied one is shown, in its own list. Everything else is in groups that begin folded, under headings that say what they hold: "Other open PRs", "Closed PRs", "Other attachments". Attachments are listed newest first, as the pull requests are, and an applied attachment is marked and boxed like a checked-out pull request.
The group headings are counted, so they go through _n: a language with more than one plural form needs a form per count, not one form for all. The checkout journey now proves the pull requests' list has no group at all, rather than that one heading it could not have is absent. The newest-first check reads the rows' order instead of the markup's, the docs screenshot opens every group before it is taken, and comments that named only pull requests name both lists.
|
No actionable comments were generated in the recent review.
|
| Objective | Addressed | Explanation |
|---|---|---|
Add a way to show or hide linked pull requests and patches on tickets [#709] |
✅ |
Priority:
Severity of issue fixed: Medium
Merge Risk: 
Minimal · up to 82f37
-
The grouped ticket lists are ready to merge after normal checks. No issue introduced by this change remains identified.
Pre-merge checks: 
1
-
Full details: Description check
-
Explanation
The description follows the required template. It explains why and what changes, provides automated and manual testing steps, risks and limitations, related issue, design decisions, review outcome, implementation notes, and screenshots. It also identifies the known unrelated test failure and deferred filename-matching limitation.
-
- 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.
Comment @coderabbitai help to get the list of available commands.
|
@coderabbitai review |
✅ Action performed
|
|
Looks solid from my end. |
Why
A ticket with many linked pull requests or Trac patches pushed the rest of the ticket card down, often by several screens. #65252 has 48 pull requests and #17817 has 44 patch files. Closes #709.
What changes
The two lists in the ticket card, Linked pull requests and Trac attachments, are now shown the same way:
Deliberately not in this PR: remembering which groups you opened across restarts, and any change to how the Latest patch is picked.
How to test this
Platforms: any. The change is renderer-only, with no paths, spawning or signing involved.
The journeys cover the folding, the labels and the PR-checked-out state:
npm run test:e2e:hidden -- tests/e2e/journeys/ticket-card.spec.js tests/e2e/journeys/pr-checkout.spec.js tests/e2e/journeys/i18n.spec.js. What they cannot reach is a real ticket on Trac and GitHub, and applying a Trac patch, so here are the steps for that.Starting state: a Core site with nothing applied, on the current head of this branch (the Buildkite build for
82f3703, or a local build).What must not have happened:
Risks and limitations
electron-storeholds and needs a migration, so it is left for a follow-up.linked-pull-requests.pngwas not regenerated. The screenshot script now opens every group first, so the caption stays true when it is.Related
Fixes #709
Design decisions and alternatives considered
_nso each language gets the right form for its count.Review outcome (required, see AGENTS.md)
Two passes against
.github/instructions/code-review.instructions.md, each by a separate agent with fresh context, before the PR was opened.First pass, on the PR grouping only: 3 [fix here] · 0 [follow-up]. All 3 fixed:
ui.listGroupToggle).Second pass, on the whole branch: 2 [fix here] · 1 [follow-up]. All 3 earlier findings confirmed resolved.
[fix here], fixed in
82f3703: the counted headings now use_n.[fix here], fixed in
82f3703: apr-checkout.spec.jscheck that could not fail now asserts that exactly one group heading exists.[follow-up], deferred: applied attachments are matched by filename (see Risks). This needs a store migration.
Review: completed. Reviewer: separate agent context. Reviewed head
b4d9925against based6347eb(merge base with trunk; no PR existed yet). Scope:git diff d6347eb...b4d9925, working tree clean. Lint and unit suite green before the review.Since review:
b4d9925 → 82f3703, the commit fixing the two [fix here] findings plus the review's style notes (stale comments, screenshot preparation, an order check written against the markup). Not re-reviewed by an agent. Lint, the unit suite (2223 pass) and the touched journeys were run on82f3703.The journey
i18n.spec.js› "the Logs are fully translatable" fails on this branch and also on trunk's code (a strict-mode clash on.log-pane-note). It is unrelated to this change.Implementation notes
src/renderer/ticket-card.cjs(pinNewest,pullRequestGroups,attachmentGroups), with unit tests intests/unit/ticket-card.test.cjs.pullRequestStateKeyfeeds both the badge and the group, so they cannot disagree.GroupedRows, usingCollapsiblefrom@wordpress/ui. Each group heading is anh4wrapping the trigger button.index.jsxpassesworkApplied={Boolean(pullRequest || appliedPatch)}and, for attachments,appliedLabel(the applied patch's label).ui.listGroupToggle(card, label)intests/e2e/helpers/ui.cjs.Screenshots or recording
Ticket with many patch files, nothing applied (#17817)
Ticket with many pull requests, nothing applied (#65252)
Trac patch applied (#43502)

Pull request applied (#65252)

🤖 Generated with Claude Code