feat(mobile,ui-native): draw a pull request's conversation inline on iOS

Merged
DA
4d ago
+547-47

What

Step (c) of STAG-3903, Dean's GitHub-app-style PR page. The conversation now runs inline under the Checks and Files changed rows. Before, it was one "N comments ↗" row that opened GitHub.

  • Entry rows (ConversationEntryRow, new in @repo/ui-native/conversation-rows.tsx): each comment or review shows its writer's face and name, where a review left them (its mark), and when. Under that sits a 3-line plain preview of its words. Tapping opens the whole entry in Markdown, and tapping again folds it.
  • Thread rows (ThreadRow): each review thread stands under the review that started it, with its file and lines ("src/invites/expiry.ts L18–20"), Resolved and Outdated, and its comment count. Folded, it previews the first comment; opened, it shows every comment by writer and time, in Markdown. A resolved or outdated thread is muted.
  • Earlier entries: the ones a read left on GitHub are counted first ("2 earlier comments on GitHub ↗"). The Reviews section keeps the reviewers, and its comments row is gone.
  • Performance: a folded entry lays out no Markdown. Its preview is markdownPlainText over its first 600 characters, memoized per entry. Rows are SwiftUI List rows, so they're drawn lazily.
  • Words: each entry draws entry.markdown ?? entry.body. The markdown key comes from #10555 (armed for main). It's cherry-picked here so the stack typechecks, and it drops out when the stack is restacked on main.
  • Shared model: threadLineSpan, threadStateWords/THREAD_STATE_WORDS and PULL_REQUEST_READ_WORDS.earlierCount move from the panel's tab into @repo/features/pull-request-model. The panel now reads them from there.
  • Fixture and flow: the failing fixture PR (#127) gets a longer review and a thread on its expiry check. pull-request.yaml shows the conversation (pull-request-conversation), opens the review and the thread, and shoots pull-request-conversation-open.

Not in this PR:

  • Author names use githubFace. Once #10540 lands, a bot's name drops [bot] and wears BotTag; I'll add the tag to these rows in a follow-up.
  • Timeline events (labels, pushes) aren't on the wire and the desktop doesn't draw them either, so parity is comments, reviews and threads.
  • Replies, resolve and reactions stay on desktop and GitHub for now.

Stacked on #10553 ← #10552 ← #10549.

Checks

  • turbo run typecheck --filter=@repo/mobile --filter=@repo/panel passes.
  • vitest run of agent-pull-request-tab.test.ts and agent-pull-request-tab-comments.test.ts passes (138 tests).
  • fixture-pull-requests.test.ts passes.
  • biome and oxlint are clean on the changed files.
  • No Swift changed. I'll ask the Mac queue for frames.

🤖 Generated with Claude Code