fix(mobile): draw a pull request's bot authors as the panel does

Merged
DA
4d ago
+139-49

What

On iOS, a pull request page used to show a GitHub App's bot by its raw login (relay-review[bot], coderabbitai[bot]). It now draws the bot the way the panel does:

  • Name: the login without GitHub's [bot] suffix.
  • Avatar: the bot's avatar in a rounded square (this part was already right).
  • Tag: a quiet "bot" tag after the name.

This applies to the bot's row under Reviews and to the "opened" line in the heading when a bot opened the pull request. Checks already name their App by its own name, so they don't change.

How

  • The rule for naming a GitHub account moves out of @repo/ui's actor model into a new module, @repo/features/github-login. It holds isBotLogin, githubLoginName and BOT_TAG_WORDS. @repo/ui-native can't import @repo/ui, so this lets both share the rule. These now read it:
    • @repo/ui's actorName
    • openerOf in link-standing-model
    • the panel's BotBadge
    • iOS's githubFace
  • @repo/ui-native:
    • githubFace names the account through githubLoginName and sets the new Face.bot field.
    • New BotTag component.
    • MarkRow draws the tag after the title, using a new after slot on RowHead, and says "bot" in the row's VoiceOver value.
    • OpenedLine draws the tag after a bot opener's name.
  • Any later place on iOS that names a GitHub author should use githubFace(person) for the face and name, and BotTag after the name where face.bot is set.

Tests

  • Ran pnpm exec vitest run packages/ui/src/actor-model.test.ts packages/features/src/link-standing-model.test.ts: both files pass.
  • tsc -b passes for ui-native, ui, panel and mobile, and pnpm oxlint reports no errors.
  • apps/mobile/maestro/pull-request.yaml now asserts the fixture's review bot is shown as relay-review (the old relay-review[bot] label fails that match) and takes a pull-request-reviewers frame. A simulator run on the Mac is pending. The rest is left to CI.

šŸ¤– Generated with Claude Code