Skip to content

Send a pull request's failing checks and review comments to the agent #34

Closed

Description

@KieranP

Send a pull request's feedback to the worktree's agent: failing checks and unresolved review comments, from the PR and CI pages (marks-and-pages.md, merge-path.md).

  • Failing checks. Each check's name and link, with its failed log's tail: gh run view --log-failed for Actions, and for CircleCI the failure report the CI page already reads.
  • Review comments. The unresolved threads, each with its path, line, quoted code and text. Posting replies or resolving threads on GitHub can come later.
  • Delivery as Review (Comment on a diff tab's lines and send them to the worktree's agent #6) sends line comments, through AgentHandoff: written to a file and pasted as a mention into the agent pane, no Return. A file rather than the text, since Claude Code folds a long paste to a placeholder.
  • Several agents in the worktree: Review's picker, defaulting to the agent pane focused last. The PR, CI and Review pages share one pick per worktree.

Everything goes through the tool, never its API, so the user's login and Enterprise hosts keep working. gh api graphql counts as the tool: it takes gh's login, and --hostname reaches an Enterprise host. Merging the pull request is #32.

Design

Mockups in the comment below (top row pr-reading, pr-failing, pr-sent; bottom row ci-running, ci-failing, ci-sent), at the panel's 280 pt default in Multishell Light.

The PR page (pr-failing):

  • Failing checks stay under the Checks step, in the host's order. Each failing one gets a checkbox at the row's trailing edge, after Required. A passing row keeps the empty slot, so the Required tags stay in one column.
  • Unresolved review threads list under the review step, which today is a title alone: "Changes requested", "2 unresolved comments", then each thread's author, path and line, and two lines of its first comment, with a checkbox. The title collapses the list as Checks' does, and a click on a thread opens it on GitHub.
  • Where the path has no review step, a review not required, the threads get a step of their own before the merge (pr-reading): "Comments", "2 unresolved", with Review's speech bubble as its glyph, since an unresolved thread neither passes nor fails. A merged or closed pull request lists none.
  • An outdated thread is tagged Outdated and labelled by its original line.
  • The foot is Review's: "Send to [agent] Send", the same picker, no count and no hint. It shows only while there is something to send.
  • A collapsed step holding checked items adds "1 to send" to its line, since Send carries them unseen (pr-reading).
  • Each step with checkboxes, and the CI page's Latest run, has a checkbox of its own on its title row, in the items' column. It is checked when every unsent item is, empty when none is, and mixed (a dash) when some are; a click on a mixed one checks all, as AppKit's mixed state does. A bot reviewer leaving thirty threads is one click to clear. A step with nothing left to send has none.
  • Failing required checks and every unresolved thread start checked. A failing optional check starts unchecked, as danger is in the mockup.

After Send (pr-sent):

  • A sent item's checkbox turns into a green sent bubble, a paper plane on a green disc, its tooltip naming the agent. Review's "Sent to Claude Code" chip was tried and dropped: it took a line per item. The foot says "3 items sent to Claude Code", as Review's receipt does, until something is checked again.
  • A check that runs again drops its bubble, and comes back checked if it fails at the new head. A thread resolved on GitHub leaves the list; one with a new comment comes back checked.
  • A click on a bubble turns it back into a checked box, to send the item again.
  • Sent marks are runtime state, keyed by the check's link and the thread's id, not saved as Review's comments are: a relaunch shows everything unsent, which costs a second send at most.

The CI page (ci-failing):

  • A failed job already shows its part of the run's report under it. It gets the same trailing checkbox, and the page the same foot. Send carries what the page has read: the workflow, the job's name and link, and its part of the report. No new read.
  • Only the latest run's jobs can be sent. Earlier runs are history.
  • A job that failed while its run still goes has no report yet, which is read once the run ends (ci-running). Its checkbox shows anyway, and a line under it says that sent now it goes as its name and link.
  • Report text that names no listed job, shown after the workflows, gets a checkbox of its own and goes as "Run output": it can be the only failure, a config error before any job.
  • A CircleCI job's report text is cut to its last 80 lines, as an Actions log is.
  • After Send (ci-sent), each sent job wears the same green bubble and the foot says "2 jobs sent to Claude Code". A rerun drops the bubbles with the old report.
  • A CircleCI job also listed as a pull request check should be one item, sent from either page and shown sent on both; see Unproven below.

What Send writes is the AgentHandoff file Review writes, a section per item: a check's name, link, the commit it ran on and its log tail; a thread's path, line, quoted hunk and every comment in it. Where the worktree's tip has moved past that commit, the check's section says so, since unpushed commits may already fix it. Its introduction, its name (pr-482-<worktree>.md, ci-<worktree>.md) and the sentence pasted for an agent with no mention prefix are new: Review's say "review comments".

Reads

  • An Actions check's log is read at Send, keeping its last 80 lines. While it reads, the foot says "Reading 1 log" beside the running ring and Send is off (pr-reading), so a second click sends nothing twice.
  • Send still goes to the pane the picker showed, or nowhere. A pane that closed during the read gets nothing, and the foot says so with the items still checked.
  • A log that fails to read is sent anyway, as the check's name and link with gh's words as a caveat: the agent can open the link, and the other items should not wait on one.
  • One job's log: gh run view --job <job> --log-failed, the job's id taken from the check's link (/actions/runs/<run>/job/<job>), with -R for a fork or Enterprise host. --log-failed on a run gives every failed job. Each line's job, step and timestamp columns are stripped.
  • A check from any other provider sends its name and link only.
  • Unresolved threads are read while the PR page shows, at the page's pace, through gh api graphql (reviewThreads with isResolved): gh pr view does not say whether a thread is resolved. Threads and their comments page past the first 100. An outdated thread has no line, so it is labelled by originalLine and marked outdated; a comment on a whole file has no line and is labelled by its path alone.
  • The poll reads only states, not logs or comment bodies.
  • Thread text is kept only for the panel's worktree, as run details are; a return to a row reads it again when due.

Also needed

  • Command line: pr send and ci send beside review send, with the same pane rules. No command prints checks or threads today, so a script has no ids to name: pr send takes --checks and --threads and sends what the page checks by default, and ci send the latest run's failed jobs.
  • Debug services stand-in: threads on a pull request and log on a check, since it refuses keys it does not know. Without them there is no scripted run.
  • Accessibility: the checkbox sits inside a row that is a button opening the link, so it needs its own label ("Send build / test-macos"), and the bubble a spoken "Sent to Claude Code". A step's own checkbox is labelled for its step ("Send all checks") and reports its mixed state.
  • Translation: "Comments", the step checkboxes' labels ("Send all checks"), "Run output", and counted forms for "%d unresolved comments", "%d unresolved", "%d to send", "%d items sent to %@", "%d jobs sent to %@" and "Reading %d logs".
  • Docs: a design file under Docs/design/services/ with its row in DESIGN.md, and marks-and-pages.md updated for the thread read.
  • Tests: what is sendable, the defaults and when a sent mark clears are plain values in MultishellAppCore, tested there.
  • Unproven: counting a CircleCI job and its pull request check as one item needs the check's link matched to the job's id. Until shown, they are two items.

Picking this up

Read CLAUDE.md, then review-comments.md and the two services files linked at the top. Write the new design file before the code.

Order, each a commit that ships on its own:

  1. Rename Review's foot and picker to shared names (below). No behaviour change.
  2. The CI page's Send. It reads nothing new.
  3. The PR page's checks, with the job-log read.
  4. Threads: the read, the Comments step and their place under the review step.
  5. pr send and ci send, and the stand-in's threads and log.

Shared names for Review's foot and picker (owner's choice, 2026-11-19; NEW, not a reversal: git log -S ReviewRecipient shows no rename before). "Handoff" is the word AgentHandoff already uses for what Send writes.

Now Becomes
ReviewRecipient HandoffRecipient
ReviewFooter HandoffFooter
ReviewRecipientMenu HandoffRecipientMenu
ReviewSendFooter HandoffSendFooter
pickReviewRecipient, reviewRecipient(s) pickHandoffRecipient, handoffRecipient(s)

They move from Files/Panel/Review/ to Files/Panel/Handoff/, in MultishellAppCore and MultishellAppUI alike, as Review's values mirror its views. The pick moves with them, one per worktree. The strings review.send, review.send-to and review.recipient-* become handoff.*: "Send" and "Send to" are the same act on every page. review.recipient-menu, "Agent to send the review to", becomes "Agent to send to". Callers to update: AppModel+ReviewSend, +ReviewPage, +ReviewComments, +ControlReview, AppModel, ReviewPanelPage, ControlRefusal and its wording, and their tests.

Where the code goes:

  • Reads: PullRequestHost (Sources/MultishellServices/SCM/Core/PullRequestHost.swift) gains the thread read and the job-log read, the GitHub records beside the others in SCM/GitHub/. CIProvider needs nothing: failureReport(of:) already reads the report.
  • The Comments step: a new kind in MergePath.swift, shown where reviewStatus gives no review step.
  • Views: MergePathStepRow, PullRequestCheckRow, CIWorkflowList, CIJobRow, PullRequestPanelPage, CIPanelPage.
  • Send: AgentHandoff and AgentHandoffEntry as they are; the paste through what AppModel+ReviewSend does today.
  • Tests: FakeTool in Tests/MultishellServicesTests for gh output, StandIn/ for the stand-in, the model's decisions in Tests/MultishellAppCoreTests/Services/.

Facts already checked:

The thread read, to be confirmed against a real pull request:

query($owner: String!, $name: String!, $number: Int!, $after: String) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100, after: $after) {
        pageInfo { hasNextPage endCursor }
        nodes {
          id isResolved isOutdated path line originalLine
          comments(first: 50) { nodes { id author { login } body diffHunk url } }
        }
      }
    }
  }
}

The mockups in theme terms (drawn in Multishell Light only):

Mockup Code
Send button Review's attention fill, ThemedButtonStyle
Checkboxes and the step checkbox the system checkbox, its mixed state AppKit's
Sent bubble ui.ci.passed
Reading spinner CIRunGlyph, running
Outdated tag ReviewChipLabel's outdated chip
Comments step glyph SpeechBubbleShape
Checkbox column one UIMetrics value both pages read

The mockups' HTML is not kept. A design change means drawing them again.

Prior art

Activity

  1. KieranP commented on Nov 18, 2026

    @KieranP
    OwnerAuthor
    multishell-mockup-34-pr-reading multishell-mockup-34-pr-failing multishell-mockup-34-pr-sent multishell-mockup-34-ci-running multishell-mockup-34-ci-failing multishell-mockup-34-ci-sent
  2. added 3 commits that reference this issue on Nov 19, 2026
    99b0cb2
    d79712c
    f05e952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions