feat(mobile): finish or discard a pending review from the phone

DA
1h ago
+323-36

Stacked on #10560 (and the stack under it, down to #10549). The seventh step of the iOS code viewer (STAG-3904). It closes the loop on "Add to review": the pending review can now be finished from the phone.

What

  • Entry: where the member holds a pending review, the Files list's ⋯ leads with Finish your review (N).
  • The review screen (…/<number>/review):
    • the review's comments, each with the file and line it's on and its words in Markdown
    • the summary field docked at its foot; its capsule picks Comment / Approve / Request changes, in GitHub's order, and Send submits the review on GitHub as the member (SUBMIT_REVIEW)
    • Discard in the ⋯ asks first ("Discard your pending review? This deletes every pending comment you added to it."), then sends DISCARD_REVIEW
  • After sending: a review GitHub took closes the screen, and the conversation is read again. A refusal, such as approving your own PR, says why (WriteNoteRow).
  • Request changes needs a summary, as GitHub's own box does. The prompt changes with the event, as the desktop's does.

Shared words

REVIEW_EVENT_WORDS, REVIEW_PANEL_WORDS and reviewPlaceholderOf move from @repo/panel (review-panel.tsx, pull-request-review.tsx) into @repo/features/pull-request-model, so the desktop's Finish your review and the phone's say the same. The panel imports them from there.

Data

usePendingReview reads pendingReview off the conversation part already followed for threads. Its comment count and drafts are the same read the desktop uses.

Fixture and flow

The Inbox fixture holds one pending comment on #128's test file. pull-request-files.yaml opens Finish your review from the Files list's ⋯ and sees it.

Tests

  • Ran: packages/panel/src/tasks/agent-pull-request-tab.test.ts (83 passed), which covers the desktop review panel whose words moved, and fixture-pull-requests.test.ts.
  • Typechecked @repo/mobile, @repo/panel, @repo/host; ran oxlint and Biome.
  • No new unit test: this PR adds screens composed of existing components and moves words, which aren't behavior to test. The flow covers it on the Mac. Left to CI: the rest.

🤖 Generated with Claude Code