Skip to content

fix(web): a merged or closed PR drops the live approvals and checks cards - #669

Merged
PastaPastaPasta merged 2 commits into
masterfrom
fix/merged-pr-merge-box
Nov 23, 2026
Merged

PastaPastaPasta merged 2 commits into
masterfrom
fix/merged-pr-merge-box

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

A merged PR's page still showed the live merge-gate cards under the merge event: "No approvals yet — No maintainer or writer has approved…" (with the enforcement chip) and "No checks reported for …". To a visitor that reads as though the PR is still waiting to merge, and on a phone the two cards sit between "merged this" and the comment box.

Those cards now show only while the PR is open. A merged or closed PR keeps its reviews in the Reviewers rail, and a merged public PR keeps the audit in Branch rules at merge. The open-PR merge box is unchanged.

Before (live, build 3e672fb) and after (local static build of this branch, 92fc0e7), nov-qa-web PR #3 on testnet:

Before After
Desktop before after
Phone (390 px) before after

Test: e2e/collab-copy.spec.ts g17-1, the seeded merged PR, now also asserts that Branch rules at merge is shown and that the Approvals region and checks row are not. tsc and eslint are clean.

This was a remaining gap from UX wave 4 ("A merged PR still shows 'No approvals yet' and the check cards").

🤖 Generated with Claude Code

…ards

A merged PR still showed "No approvals yet" and "No checks reported"
under the merge event, as if it were waiting to merge. Those cards now
show only while the PR is open; the reviewers rail keeps the reviews and
Branch rules at merge keeps the audit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

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 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review 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: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bc5254b1-2650-40ce-b187-012409c466b7
Commits

Reviewing files that changed from the base of the PR and between 4e34b8d and 718a7e6.

Files selected for processing: 2

  • forge-web/components/repo/pull-content.tsx
  • forge-web/e2e/collab-copy.spec.ts
  • 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

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Verdict: approve

Hiding the live Approvals card and ChecksRow on every non-open PR is right. I found no state where a user loses something they need. tsc --noEmit is clean on the PR head, after a fresh pnpm install --frozen-lockfile.

Flows checked

  • Record merge, unverified merge and "Mark as merged" are unaffected. RecordMergeBox and UnverifiedMergeNote render above the changed fragment. Both oids are null unless unrecordedMergeCandidate holds, which needs pull.state.open && !merged (forge-web/lib/view/pull-actions.ts:656-666). "Mark as merged" lives in the open merge box. A PR detected as merged by content but not yet recorded is still open, so it keeps both cards. That's correct: the merge it would record is still judged against them.
  • Closed (unmerged) PRs and reopen decisions: the Reviewers rail is unconditional (forge-web/components/repo/pull-content.tsx:2458) and the Checks tab stays in PR_TABS, so verdicts and runs are still one click away. Reopening brings the cards back.
  • Private merged PRs: these lose the approvals summary and get no Branch rules at merge in its place (pull-content.tsx:2044, public only), so only the Reviewers rail shows verdicts. That's acceptable and no worse than a closed PR. A private audit is a separate gap, not this PR's.

Nits (non-blocking)

  • forge-web/e2e/collab-copy.spec.ts:48: checks-row toHaveCount(0) can pass without the fix. RulesAtMerge renders its <details data-testid="rules-at-merge"> straight away, and the audit is read only when it is opened (components/repo/rules-at-merge.tsx:39-48). So the toBeVisible before it doesn't wait for anything async. Meanwhile ChecksRow returns null until the async readCheckRuns lands (pull-content.tsx:548, 2739). On a pre-fix build the assertion can win that race. Before the negative check, wait for a signal that the checks read has settled, for example the Checks tab's content. The positive rules-at-merge assertion does confirm the fixture repo is public, and the Approvals assertion is sound because thread is loaded by then.
  • pull-content.tsx:2091: {!open ? null : a ? X : b ? Y : null} reads a little backwards next to the {open ? <ChecksRow/> : null} two lines below. One open ? (<>…</>) : null around both would be a touch clearer. The diff is minimal as it stands.

🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.

@PastaPastaPasta
PastaPastaPasta merged commit 83c34e3 into master Nov 23, 2026
20 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