fix(web): handle GitLab approval notes in review actions#21571
GitLab approval and withdrawal rows come from system notes, which cannot receive emoji awards. Once those rows are retained by #21570, their reaction pickers must be hidden.
A shared comment permission helper gates reaction controls in Summary and Timeline, including conversation and verdict cards. Ordinary GitLab comments and GitHub reviews retain reactions when supported. Mobile currently has no reaction UI; Electron shares these web components.
Rebuilt from @juliusmarminge's #9858 against the moved adapter. This layer contains every original reaction restriction; it also covers review rows that enter the timeline conversation-card path.
Verification on headless Linux at a30d4fb:
- Four parameterized original cases consolidated into one behavior regression in the existing reaction suite: 13 baseline tests pass; a capability-only implementation fails because GitLab reviews remain reactable.
- After: 14/14 reaction tests, and 169/169 across reaction/detail/editing logic suites. Web scoped typecheck, targeted lint, formatting, and whitespace checks pass. Lint retains one existing array-index-key warning outside the changed lines.
- The isolated web app paired and booted. In the built-in Browser panel, the actual exported Timeline component rendered a synthetic approval/withdrawal/ordinary-comment fixture. Before this UI layer it displayed three reaction pickers; after it displays only the ordinary comment's picker. No host mutation was made. Same fixture, viewport, and expansion state; Summary wiring was inspected in source.
Before — actual baseline Timeline component with synthetic GitLab rows:
Before: approval, withdrawal and ordinary comment all expose reaction pickers
After — current Timeline component, with only the ordinary comment picker:
After: approval and withdrawal pickers are absent; ordinary comment remains reactable
Review round 1 found that retained approval and withdrawal bodies entered the Fix findings handoff. A new regression failed before the correction; the handoff now receives the provider and excludes GitLab system verdicts before applying the finding limit, preserving authored GitHub remarks. All 169 focused web tests and the web typecheck pass. A browser import of the current production helper also returns the empty-findings message for approval-only history. Both independent reviewers completed full-stack round 2 with no remaining code blockers. The reaction screenshots remain accurate because the handoff correction does not change that UI.
These are component-fixture captures, not a live GitLab provider-to-client flow. Live GitLab account behavior, full Summary interaction, macOS, Windows, iOS, Android, and Electron desktop remain unverified. Two full-stack Opus/Sol review rounds are complete. All current-head CI jobs that ran and commit statuses, including CodeRabbit, passed. The lower layer remains blocked by the unrelated required web CI failure after one rerun; the stack is not ready to merge. Nothing is merged.
Tests: Codex GPT-6-Astra (high). Implementation: Codex GPT-6.1-Sol (high). Review: Claude Opus 5.5 and Codex GPT-6-Sol. Maintainer integration: GPT-6.1-Sol through the Codex harness in T3 Code.
Checks
Added 2 commits
Approvability
Verdict: Approved at a30d4fb
Macroscope's review found this PR approvable — This is a narrowly scoped GitLab bug fix that hides unsupported reactions on approval system notes while preserving reactions for normal comments and review comments. It also removes non-actionable approval history from the findings handoff, with targeted tests covering both changes.
You can add or adjust custom eligibility rules. Learn more.
Added 1 commit
- test(web): keep GitLab approval history out of findingse5efc68
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
941405f5-d216-4fd0-ac14-4b3313c70cd3
📥 Commits
Reviewing files that changed from the base of the PR and between b276973609a1e9294342a66194668cabf77eb48c and a30d4fb512930e1df2537ecc1d277028d6b3385a.
📒 Files selected for processing: 3
apps/web/src/components/pullRequest/PullRequestDetailPanel.tsxapps/web/src/components/pullRequest/pullRequestDetail.logic.test.tsapps/web/src/components/pullRequest/pullRequestDetail.logic.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
Reaction availability now depends on each comment’s kind and provider. The findings handoff now receives the pull-request provider and excludes GitLab approval and dismissal history from unattached review remarks.
Changes: Comment reaction eligibility
Layer / File(s) Summary Define and test reaction eligibility
apps/web/src/components/pullRequest/pullRequestReactions.logic.ts,apps/web/src/components/pullRequest/pullRequestReactions.logic.test.tsAdds and tests canReactPullRequestComment. It returns true when reactions are enabled, except for GitLab review comments.Apply eligibility in summary and timeline views
apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx,apps/web/src/components/pullRequest/PullRequestTimelineTab.tsxThe summary view uses the helper for comment reaction bars. The timeline view classifies events as reviews or issue comments and uses event-specific eligibility to control reaction bars. Findings handoff filtering
Layer / File(s) Summary Filter GitLab approval and dismissal history
apps/web/src/components/pullRequest/pullRequestDetail.logic.ts,apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx,apps/web/src/components/pullRequest/pullRequestDetail.logic.test.tsThe findings handoff accepts the pull-request provider and excludes unattached GitLab review comments with approved or dismissed outcomes. Tests verify that GitHub authored approval text remains included. Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
maria-rcks
Merge Risk: ⚪ Minimal · up to a30d4
GitLab approval and withdrawal rows no longer offer reaction pickers, while ordinary comments retain them. No actionable issue was identified before merge.
Pre-merge checks: Passed 4
Check name Status Explanation 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. Title check Passed The title is concise, conventional, and related to the GitLab approval-note handling change. It does not mention reaction controls explicitly, but it still describes a real part of the change. Description check Passed The description covers the problem, implementation, scope, verification results, screenshots, limitations, and agent usage. The Scope and approval section does not clearly provide an explicit maintain… Full details: Description check
Explanation
The description covers the problem, implementation, scope, verification results, screenshots, limitations, and agent usage. The Scope and approval section does not clearly provide an explicit maintainer approval comment or explain why the fix qualifies for the small focused-fix exemption, but the overall description is complete and directly relevant.
✨ Finishing Touches
📝 Generate docstrings
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Added 1 commit
- fix(web): exclude GitLab approval history from findingsa30d4fb