fix(desktop): draw Luke's own GitHub App bot as the GitHub bot it is

Merged
DA
2d ago
+123-315

What was asked

Luke's own GitHub App bot (luke-agent[bot]) shows up as a reviewer, opener, and commit author on GitHub, but the PR views drew it as the agent whose PR it is, or as Luke. The developer asked for that special case to go: Luke should draw the bot as the GitHub App bot it is, the same way it draws devin-ai-integration[bot] or vercel[bot].

What changed

  • Service (github-people.ts): changesPeople and namedOverview no longer call app.appBot(token) on every read, and personOf no longer sets luke. namedOverview no longer needs the token or GitHubApp at all, so I dropped its token parameter, and its caller in coding-agents-app.ts changed to match.
  • Wire (coding-agent-wire.ts): GitHubPerson no longer has luke. writtenAs stays.
  • UI (actor-model.ts): githubActor has no place.agent and no LUKE_ACTOR fallback, and GitHubPlace.agent is gone.
  • Desktop (pull-request-people.tsx): removed PullRequestAgent, the agent card in useNamer, and the agent prop threaded through PersonRef, OpenedBy, ReviewersLine, and PullRequestPeople. The Pull request tab, the Files changed view, and ChangesCard stop building the agent for it. StackFace.card was only used for that agent card, so it's gone too; every face now hangs its actor's own card.
  • "Opened by … as the GitHub App, since …" (from #2976): removed, because only the luke mark could tell the window that the App's bot opened the PR. The developer chose to drop it rather than keep bot detection for it alone.

Goldens

I re-recorded these under LUKE_UPDATE_FIXTURES=1. Each one only loses the luke boolean property from the GitHubPerson definition (42 lines removed in total):

  • coding-agent-view-codingAgentChangesAnswerViewSchema.json
  • coding-agent-view-codingAgentOverviewAnswerViewSchema.json
  • coding-agent-wire-codingAgentChangesAnswerSchema.json
  • coding-agent-wire-codingAgentOverviewAnswerSchema.json

Tests

  • github-people.test.ts and pull-request-overview.test.ts: the App's bot now comes back as a plain bot ({ login, bot: true, avatarUrl }) with no mark.
  • actor-model.test.ts: luke-agent[bot] is a GitHub bot actor like Devin.
  • pull-request-people.test.ts: the opener, a reviewer, and a commit author that are luke-agent[bot] draw as GitHub bots with the GitHub App card. The Opened by line has no "as the GitHub App" words, whatever writtenAs says.
  • The Pull request tab test checks that the opener draws as a GitHub bot. use-coding-agents.test.ts fixtures were updated.

pnpm check:affected: typecheck, lint, knip, discarded-effect, and the host, web, service, and catalog tests passed, as did all 1639 desktop tests. The one failing file was src/main/app-menu.test.ts, which could not load Electron because the sandbox couldn't download its binary (fetch failed). That's a sandbox problem, not this change.

Made with Luke


Summary by cubic

Draws Luke's GitHub App bot (luke-agent[bot]) as the GitHub bot it is, the way the desktop already draws devin-ai-integration[bot] or vercel[bot], instead of as the agent whose pull request it is or as Luke.

  • The service stops calling app.appBot(token) on every read, and the luke flag is gone from GitHubPerson and out of githubActor's placement.
  • The desktop views drop PullRequestAgent, the agent card a face hung in place of the actor's own, and the agent prop threaded through them; every face now hangs its actor's own card.
  • The "Opened by … as the GitHub App, since …" ending is removed, since only the luke mark could tell it; whether to keep bot detection for that sentence alone is still open, which is why this is a draft.