fix(mobile): allow submitting a PR review with no comments - #4785
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the mobile PR-review-submit changes (block-reason gating, Overview entry point) and found no security, correctness, or breaking-change issues in the diff. Files Reviewed (4 files)
Reviewed by claude-sonnet-5 · Input: 20 · Output: 4.2K · Cached: 420.3K Review guidance: REVIEW.md from base branch |
|
(bot) Standin review (Kilobot is out of service — this is the review of record for head A fresh Verdict: No findings. Verified against the review contract, among others: GitHub's rule mirrored exactly ( Residual risks noted by the reviewer that are not defects: on-device E2E (AC1–AC4) is running separately and covers the sheet wiring; the keyboard-visible hint-slot layout at half-detent is validated by that E2E. |
Problem
On the mobile PR-review surface a user could not submit a review carrying no comments, so approving a PR outright was impossible. The gate was unreachability, not validation: the review-submit sheet's only entrance was the floating
Finish reviewbutton over the Files-tab diff, rendered only when the pending-comment queue was non-empty. The sheet, the input mapper, the tRPC schema/procedure, and the GitHub params builder all already permitted an empty body and zero comments.Fix
Reviewentry point. The Overview tab now has aReviewsection (a11yReview pull request) above the merge section that opens the review-submit sheet unconditionally, mirroring the merge CTA idiom. The Files-tabFinish reviewshortcut is unchanged.APPROVEsubmits with an empty summary and zero comments.REQUEST_CHANGES/COMMENTwith neither a summary nor a comment now disables the submit CTA and explains the requirement in place — in the existing hint slot, replacing the empty-queue hint so the two never contradict — instead of round-tripping to a GitHub 422. Typing a summary or queuing a comment re-enables it.No backend change: all three backend layers already permit an empty body and zero comments.
Testing
reviewSubmitBlockReasoncovering both blockable events on both allow paths.pnpm format && pnpm typecheck && pnpm lint && pnpm check:unusedand fullpnpm testpass inapps/mobile.200 APPROVED); blocked state shows the hint and disabled CTA; the pre-existing queued-commentFinish reviewpath is unchanged; retryable (stub down) and non-retryable (403) failure states behave per the existing classification.