You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mobile): outdated pull request approvals are labeled, not shown as current - #36868
On mobile, a pull request whose only approval came before its newest commit contradicts itself. The collapsed review row reads "Request a review · None assigned", but expanding it lists the reviewer with a green approved check. Seen on #34380: macroscopeapp approved ca98bdec on Nov 11, then bc19f85f was pushed on Nov 14.
Change
pullRequestReviewSummary already ignores approvals that predate the newest commit when picking the summary. It now flags those reviews as outdated, and the expanded list draws them with a muted check, an "Outdated" label, and an "Approved before the latest commit" accessibility label. The summary rule is unchanged.
Scope
Small fix for an obvious display bug in one screen, so no issue. The pull request list row still uses the server's reviewDecision, which doesn't apply the outdated-approval rule. That is a separate question for web and server, so it is left alone here.
Verification
Extended the existing stale-approval case in pullRequestStatus.test.ts. It fails on main (expected [ undefined ] to deeply equal [ true ]) and passes with the fix.
Reviewing files that changed from the base of the PR and between 5108dd4 and 34453b9.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Review summaries now flag approvals made before the newest commit as outdated and exclude them from approved-review counts. Reviewer rows show the outdated status with distinct text and tint.
Each review now includes an outdated flag for approvals created before the newest commit. The approved-review count excludes outdated approvals.
Display and test outdated status apps/mobile/src/features/pull-requests/PullRequestStatusRows.tsx, apps/mobile/src/features/pull-requests/pullRequestStatus.test.ts
Reviewer rows show an “Outdated” label, use distinct accessibility text, and apply the fallback tint to outdated approvals. The test checks the outdated flag.
Pull request approvals made before the latest commit are now labeled as outdated instead of looking current. The change is small and low-risk, and nothing blocks merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: outdated pull request approvals on mobile are now labeled instead of being shown as current. It follows the conventional commit form and matches the summary, which fla…
Description check
The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section states the expected and observed behavior with a reproduction case (#3438…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: outdated pull request approvals on mobile are now labeled instead of being shown as current. It follows the conventional commit form and matches the summary, which flags outdated approvals in pullRequestReviewSummary and renders them with an Outdated label.
Full details: Description check
Explanation
The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section states the expected and observed behavior with a reproduction case (#34380). The Change section explains the flag and display update. Scope explains why no issue is linked and why the list row is out of scope. Verification lists a failing-then-passing test, the changed-files check, a manual Android emulator check, before/after screenshots, and notes that iOS was not checked. The template asks for the model and harness used, and the description does not state them. This is a minor gap.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).takeover:needs-juliusTakeover done; route gate says Julius decidesvouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On mobile, a pull request whose only approval came before its newest commit contradicts itself. The collapsed review row reads "Request a review · None assigned", but expanding it lists the reviewer with a green approved check. Seen on #34380: macroscopeapp approved
ca98bdecon Nov 11, thenbc19f85fwas pushed on Nov 14.Change
pullRequestReviewSummaryalready ignores approvals that predate the newest commit when picking the summary. It now flags those reviews asoutdated, and the expanded list draws them with a muted check, an "Outdated" label, and an "Approved before the latest commit" accessibility label. The summary rule is unchanged.Scope
Small fix for an obvious display bug in one screen, so no issue. The pull request list row still uses the server's
reviewDecision, which doesn't apply the outdated-approval rule. That is a separate question for web and server, so it is left alone here.Verification
pullRequestStatus.test.ts. It fails onmain(expected [ undefined ] to deeply equal [ true ]) and passes with the fix.vp run check:changedpasses.Not checked on iOS. The changed screen has no platform-specific code.