Skip to content

feat(ui-react): render the host GitHub tools as the ui-kit GitHub components (#3795) - #4146

Merged
schlessera merged 9 commits into
mainfrom
feat/3795-github-tool-components
Nov 17, 2026
Merged

schlessera merged 9 commits into
mainfrom
feat/3795-github-tool-components

Conversation

@schlessera

@schlessera schlessera commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Closes #3795. This is the last open child of epic #3791.

What this does

One bound renderer per #3791 tool maps #3797's payloads onto #3800's ui-kit GitHub components, unchanged. Each renderer is registered for the Pi name, the Claude MCP name and the legacy spelling (packages/ui-react/src/components/chat/renderers/github-tools.tsx).

Tool Result Approval
brain_github_issue_read GitHubIssue + GitHubThread, or GitHubPullRequest with tabs —
brain_github_issue_search GitHubResultList —
brain_github_issue_create W2 posted issue, or W3 GitHubWriteNotice W1: GitHubIssue preview, with As shown / Exact text
brain_github_issue_comment posted chip + target ref, or W3 W4: target + the draft, not posted
  • Refusals are part of the result schema. A refusal renders in the host's own words. Only output that isn't a result envelope falls back to the generic text view.
  • Honest mapping (github-mapping.ts, pure):
    • checks: null → "None reported".
    • No decisions and no review total → "Not reported".
    • A deleted author → @ghost, with no avatar request.
    • Times are anchored to fetched_at.
    • "Brain read" is built from what the result contained.
  • Direct links: every canonical, comment, review, review-comment and commit URL is re-checked with ui-sdk, ui-server: GitHub tool contract, dedicated credential and host read tools #3797's githubDirectUrl against its own object, and the search URL with isGithubSearchUrl. A failure or null passes as absent. Nothing constructs or repairs a URL.
  • Avatars: only ui-server: serve on-demand GitHub detail pages to the chat components, outside the model's context #3796's brain-origin githubAvatarUrl, for logins in this result.
  • On demand: earlier comments, all commits, files, checks and line comments load through fetchGithubDetailPage, only after the reader acts. Files and Checks mount when their tab opens and fetch on press.
    • Typed errors map to S4–S7: rate-limited with the reset time, no_credential, gone (not_found/forbidden), and HTTP status.
    • Loaded pages live in the card's own state; they don't touch the chat store, the socket or the model.
  • Line comments: the payload carries no per-review count, so they are one on-demand section for the pull request rather than "Show n line comments" per review. The missing field is filed as ui-sdk, ui-server, ui-react: per-review line-comment count, so each review gets its own "Show n line comments" #4147, an additive change to ui-sdk, ui-server: GitHub tool contract, dedicated credential and host read tools #3797's contract.
  • Overlap: the detail route pages from the oldest item, so loaded comments and commits leave out the ones the result already shows. Files and Checks load on the tab's first open and stay mounted afterwards. Avatars are requested only for logins the result names.

Acceptance criteria

Criterion Where it is met
Each read result renders through its component on both backends; W1–W4; the fallback; every spelling tests/render/github-tools.test.tsx ("binding", "write views W1–W4")
ui-kit components used unchanged No kit change in this PR
Absent checks, unknown review state and deleted author read as absent "absent is absent", three tests
Valid canonical, comment, review, commit and search URLs link; another host, owner or repo, number, or http: renders no link, and the rest is unchanged "direct links pass #3797's validator or render nowhere", six tests
A hostile body end to end: no interpreted HTML or images, javascript: inert, code block shown, https: only after the interstitial the render test, plus tests/browser/github-tools.layout.tsx (real browser, real click)
No request leaves the brain's origin, avatars and on-demand sections included the browser test: request log with a positive control on the avatar requests
On-demand sections fetch only after the reader acts, show S0–S7 from the route's typed errors, and send nothing to the model the browser test (no detail call before a press; files load; checks → rate-limited with reset time; chat store byte-identical before and after), plus the render test for tab isolation
Mutation: skip the validator re-check Fails "a URL on another owner and repository…" and "a URL on another number…" on "no direct link in any slot". The kit's own host check still blocks other hosts and http:.

Proof

  • Render: bun run test packages/ui-react/tests/render/github-tools.test.tsx: 57 pass. The tests run with a session and a real origin, so the no-fetch and avatar assertions can fail. Every typed route error has its own test: GitHub's own refusals read as S4–S7, and the host's own refusals (not this chat's owner, not in this session, not a pull request, rejected credential, sign-in) read in the host's words with a Try again.
  • Browser: ui-react-layout project, tests/browser/github-tools.layout.tsx: 1/1. It ends with requestLog() after every avatar image settles, because {settle:true} waits for page-wide network idle, which this page never reached within the test timeout.
  • ui-react suite: 2652 pass. The 3 failing tests (7 counted, including hook errors) are api-client-sync.test.ts's "published sync helper", and they fail the same on an unmodified checkout on this host ("Sync fixture did not start").
  • Provider-history guards (ui-backend-claude and ui-backend-pi provider-history.test.ts): they can't run on this host (worker_host_unsupported: no unprivileged user namespaces for bubblewrap) and fail the same on an unmodified checkout. This PR touches no backend, tool or provider-facing code, and hosted unit proof runs them.
  • Mutation receipts (each restored, each failing as expected):
    • Skip the validator re-check: fails the owner/repository and number tests on "no direct link in any slot".
    • Drop the tab key (found while writing the browser test; Files' loaded rows leaked into Checks and crashed GitHubStateChip): fails "a section loaded on one tab does not leak into the next tab's section".
    • Load detail on mount: fails "no detail page before the reader acts".
    • Review rounds (one mutation per guard): skip the search-row validator; map every forbidden/not_found to gone; map a generic upstream_error to a refusal; drop the refusal's Try again; count the page's raw items in "Load more"; stop following an all-duplicate page; read every approval_declined as declined; show a closed restored approval's draft; keep a failure's status across a retry; read a write's http_NNN as W3 unknown; read the client's host_ failures, or no session, as GitHub's; send the route's catch-all, malformed or redirect to S4; name every comment target an issue; keep a re-requested reviewer's stale decision; call an empty page with a next cursor empty; drop loaded rows on a later refusal; plus earlier rounds' dedupe, avatar restriction, auto-load, cancelled→unknown, preview after approval, approval target and pending-review mapping. Each failed its named test and was restored.
  • registration-on-mount.test.tsx now counts the new global pack.
  • Typecheck, lint and check:pr pass.

Contract impact

None. This consumes #3797's tool payloads and validators and #3796's internal route and avatar URL. One field is missing: a per-review line-comment count, filed as #4147 (an additive change to #3797's contract). Until then, line comments are one on-demand section per pull request. The W4 comment preview needs an honest author before it can use GitHubComment preview; that decision is #4154.

Collisions

bun scripts/collisions.ts --json --pr 4146 at head 3bfe8b0: closure reports only (shared ui-react test categories and workspaces) with #3054, #3056, #3059, #3069, #3581, #3622, #4002, #4036, #4151 and #4155. No PR edits the same source files.

{"version":1,"kind":"brain-check-pr-receipt","head":"a3019bc5b25f10bd4c9213ce49ed6d402263675c","base":"origin/main","mode":"focused","startedAt":"2026-11-17T08:50:27.121Z","finishedAt":"2026-11-17T08:51:10.777Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":16055.224418999998},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":132.63274900000033},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":77.19383599999856},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":23.435727999996743},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":27350.061802999997}]}

🤖 Generated with Claude Code

…ponents (#3795)

One bound renderer per #3791 tool, registered for every backend spelling,
maps #3797's payloads onto #3800's components unchanged: issue and pull
request reads, search, and the write tools' approval and result views
(W1-W4). Absent fields read as absent; every direct link is re-checked with
#3797's githubDirectUrl or isGithubSearchUrl; avatars come only from
#3796's brain-origin route. On-demand sections load through #3796's client
only after the reader acts, map its typed errors to S4-S7, and never reach
the model. Tab sections are keyed, so one tab's loaded rows cannot leak into
the next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera schlessera added this to the 0.45.0 milestone Nov 17, 2026
@uploads-sh

uploads-sh Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

No uploads on this PR yet

This PR changes UI files (packages/ui-react/src/components/chat/renderers/github-tools.tsx, packages/ui-react/src/components/chat/tool-cards/github-cards.tsx, packages/ui-react/src/components/chat/tool-permission-card.tsx and 3 more). Screenshots help reviewers see what changed.

  • From the CLI: uploads put before.png after.png --pr 4146
  • From an agent: ask it to attach screenshots with uploads.sh
  • By hand: drag images into the PR description and they're imported automatically
Tips for agents

Label each shot so reviewers know what they're seeing. Labels apply to every file in a call, so run one put per shot:

uploads put after.png --pr 4146 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 4146 --app ios --screen "Chat" --state after

No CLI? With the Uploads MCP, call sign_upload_url for files on disk (or put) with repo, pr: 4146 and the same screen, state and caption fields.

This comment updates with each upload, so you don't need to post the images yourself. A shot or two in the PR description is still welcome. Check what's attached with uploads list --pr 4146. More in the github-screenshots skill or the agent docs.

Workspace admins can turn this comment off in Settings → GitHub · docs

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 002a51e against base eb9191c. Reviewer: agent. 12 findings: 0 fixed, 0 filed, 0 rejected, 12 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "002a51e1dd13b094550610488f03266fb46fffac",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:246-256 and 283-293: 'Load N earlier comments' asks #3796's comments part from cursor null. The route (ui-server/src/github/details.ts:280-286) pages from the oldest comment, 30 per page, and the payload already holds the latest 30. For an issue with 40 comments, the first page repeats 20 shown comments and Load more repeats the other 10. The renderer appends pages without removing duplicates, so the thread shows comments twice."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:300-312: 'Show all commits' renders pr.commits.items (the first 30) and then appends the detail page from cursor null, which the route serves from the first commit. All 30 commits already in the result appear a second time under the ones the payload carried."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:316-347,382-385: the issue's scope fixes the §7 trigger as 'Files and Checks on first open'. Here, opening the tab only mounts an idle section and a second press on 'Show files' / 'Show checks' does the fetch. The browser test (tests/browser/github-tools.layout.tsx:125-128) asserts the extra press as intended, so the deviation from the approved trigger is locked in."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:389-398: the scope's §7 trigger is a 'Show n line comments' control on each review. The PR replaces it with one 'Show line comments' section for the whole pull request, shown only when reviews.items is non-empty. If the payload lacks a per-review count, the issue says to add the field to #3797 additively. The PR instead drops the trigger and states 'No field was missing'."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:202-204,434: outcomeUnknown() treats every upstream_error other than malformed/redirect as 'outcome unknown'. The host's pre-send cancellation (ui-server/src/github/host.ts:503, reason 'cancelled', 'nothing was sent') therefore renders W3 'unknown', contradicting a write the host says definitely did not happen."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:341: a check run with state 'skipped' renders the 'none-reported' chip ('None reported'). A reported skipped check then reads as an absent report, which breaks the honest-mapping rule that a real value is never shown as absent and an absent one never as a value."
    },
    {
      "summary": "packages/ui-react/src/components/chat/renderers/github-tools.tsx:49: the W1/W4 preview also renders for status 'approved'. The host's approval row (toolUseId github-<uuid>, ui-server/src/github/host.ts:488) never receives an output, so after approval and a successful post the timeline keeps showing that draft as 'Not posted' / 'Brain's draft · not posted'."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:66-70,219,396: useAvatarFor() builds an avatar-route URL for any login, including authors of comments and line comments loaded on demand later. Scope allows avatarSrc 'only … for a login present in that result; otherwise none, so initials show'. Loaded-detail authors are not in the tool result, but they still get avatar requests."
    },
    {
      "summary": "packages/ui-react/tests/render/github-tools.test.tsx:238-243: 'rendering a PR requests no detail page' cannot fail. render() (lines 35-45) never sets activeSessionId, so useDetail's fetchPage returns before any request even if it ran on mount. The 'load detail on mount' mutation the PR cites can only be caught by the browser test."
    },
    {
      "summary": "packages/ui-react/tests/render/github-tools.test.tsx:117-121: 'a deleted author … asks for no avatar' cannot fail. With no activeSessionId, useAvatarFor returns null for every login, so no <img> renders at all. A mutation in person() (e.g. avatarFor(user.login ?? 'null')) would still pass. The absent-author criterion's 'no avatar request' half is unproven."
    },
    {
      "summary": "packages/ui-react/tests/browser/github-tools.layout.tsx:141-142: the criterion asks for a test that the session's provider history is unchanged after loading details, plus a passing keyless provider-history guard. The test only compares the client chat-store JSON, which is not provider history, and the PR says the guard was not run (worker_host_unsupported). Neither half of that criterion is shown."
    },
    {
      "summary": "packages/ui-react/tests/browser/github-tools.layout.tsx:134-139 and tests/render/github-tools.test.tsx: the criterion asks for the S0–S7 states from #3796's real typed errors. Only rate-limited (S5), loaded and idle are exercised. detailErrorState's no_credential, gone (not_found/forbidden) and http-status error branches (github-cards.tsx:100-103) have no test, so a wrong mapping there would stay green."
    }
  ]
}

- On-demand comments and commits leave out what the result already shows:
  the detail route pages from the oldest item, so its pages overlap.
- Files and Checks load on the tab's first open (§7) and stay mounted after,
  so a revisit keeps what loaded.
- Avatars only for logins the tool result names; detail loaded later keeps
  initials.
- A skipped check run reads 'skipped', not 'None reported'.
- A write cancelled before sending shows the host's words, not 'outcome
  unknown'; the approval row shows its draft only while it waits.
- Render tests run with a session and a real origin, so the no-fetch and
  avatar assertions can fail; every typed route error is covered, and the
  browser test asserts the card makes only GET reads of the detail route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 002a51e against base eb9191c. Reviewer: agent. 12 findings: 11 fixed, 1 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "002a51e1dd13b094550610488f03266fb46fffac",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:246-256 and 283-293: 'Load N earlier comments' asks #3796's comments part from cursor null. The route (ui-server/src/github/details.ts:280-286) pages from the oldest comment, 30 per page, and the payload already holds the latest 30. For an issue with 40 comments, the first page repeats 20 shown comments and Load more repeats the other 10. The renderer appends pages without removing duplicates, so the thread shows comments twice.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:300-312: 'Show all commits' renders pr.commits.items (the first 30) and then appends the detail page from cursor null, which the route serves from the first commit. All 30 commits already in the result appear a second time under the ones the payload carried.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:316-347,382-385: the issue's scope fixes the §7 trigger as 'Files and Checks on first open'. Here, opening the tab only mounts an idle section and a second press on 'Show files' / 'Show checks' does the fetch. The browser test (tests/browser/github-tools.layout.tsx:125-128) asserts the extra press as intended, so the deviation from the approved trigger is locked in.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:389-398: the scope's §7 trigger is a 'Show n line comments' control on each review. The PR replaces it with one 'Show line comments' section for the whole pull request, shown only when reviews.items is non-empty. If the payload lacks a per-review count, the issue says to add the field to #3797 additively. The PR instead drops the trigger and states 'No field was missing'.",
      "disposition": "filed",
      "issue": "schlessera/brain-kit#4147"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:202-204,434: outcomeUnknown() treats every upstream_error other than malformed/redirect as 'outcome unknown'. The host's pre-send cancellation (ui-server/src/github/host.ts:503, reason 'cancelled', 'nothing was sent') therefore renders W3 'unknown', contradicting a write the host says definitely did not happen.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:341: a check run with state 'skipped' renders the 'none-reported' chip ('None reported'). A reported skipped check then reads as an absent report, which breaks the honest-mapping rule that a real value is never shown as absent and an absent one never as a value.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    },
    {
      "summary": "packages/ui-react/src/components/chat/renderers/github-tools.tsx:49: the W1/W4 preview also renders for status 'approved'. The host's approval row (toolUseId github-<uuid>, ui-server/src/github/host.ts:488) never receives an output, so after approval and a successful post the timeline keeps showing that draft as 'Not posted' / 'Brain's draft · not posted'.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:66-70,219,396: useAvatarFor() builds an avatar-route URL for any login, including authors of comments and line comments loaded on demand later. Scope allows avatarSrc 'only … for a login present in that result; otherwise none, so initials show'. Loaded-detail authors are not in the tool result, but they still get avatar requests.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    },
    {
      "summary": "packages/ui-react/tests/render/github-tools.test.tsx:238-243: 'rendering a PR requests no detail page' cannot fail. render() (lines 35-45) never sets activeSessionId, so useDetail's fetchPage returns before any request even if it ran on mount. The 'load detail on mount' mutation the PR cites can only be caught by the browser test.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    },
    {
      "summary": "packages/ui-react/tests/render/github-tools.test.tsx:117-121: 'a deleted author … asks for no avatar' cannot fail. With no activeSessionId, useAvatarFor returns null for every login, so no <img> renders at all. A mutation in person() (e.g. avatarFor(user.login ?? 'null')) would still pass. The absent-author criterion's 'no avatar request' half is unproven.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    },
    {
      "summary": "packages/ui-react/tests/browser/github-tools.layout.tsx:141-142: the criterion asks for a test that the session's provider history is unchanged after loading details, plus a passing keyless provider-history guard. The test only compares the client chat-store JSON, which is not provider history, and the PR says the guard was not run (worker_host_unsupported). Neither half of that criterion is shown.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    },
    {
      "summary": "packages/ui-react/tests/browser/github-tools.layout.tsx:134-139 and tests/render/github-tools.test.tsx: the criterion asks for the S0–S7 states from #3796's real typed errors. Only rate-limited (S5), loaded and idle are exercised. detailErrorState's no_credential, gone (not_found/forbidden) and http-status error branches (github-cards.tsx:100-103) have no test, so a wrong mapping there would stay green.",
      "disposition": "fixed",
      "commit": "d43f1c471dcd594024566a92db9b059b81a5da80"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head d43f1c4 against base eb9191c. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "d43f1c471dcd594024566a92db9b059b81a5da80",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/renderers/github-tools.tsx:73-86 registers the write tools' Input (W1/W4) but adds no approval target the way Apify does (apifyApprovalTarget). tool-permission-card.tsx:36-38 therefore falls back to JSON.stringify(input), so the approval header shows the whole raw draft as one JSON line beside the W1/W4 card. That breaks the brief's 'approve exactly what they will see posted' and the precedent that a review never renders as one JSON line (#3163)."
    },
    {
      "summary": "packages/ui-react/src/components/chat/renderers/github-mapping.ts:110 maps a review in state 'pending' (an unsubmitted draft review; the host returns these in reviews.items, see ui-server/src/github/host.ts:171,182) to 'review-requested'. The thread then states a review request that never happened. The 'mapping is honest' rule needs an unknown or unsupported state to map to null ('Not reported'), not to a different fact."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:452-466 replaces the §7 trigger 'Show n line comments' on each review (GitHubReview's onShowLineComments slot) with one PR-wide 'Show line comments' section and defers the missing field to #4147. The issue's scope says a missing payload field is added to #3797's contract additively (in scope), so this §7 trigger ships unimplemented."
    },
    {
      "summary": "packages/ui-react/tests/render/github-tools.test.tsx:151-178: the non-conforming-URL loop never swaps the search URL, so the search slot is not tested for another host or http:. Lines 173-178 test only another query or repository and null. 'Rest of the component unchanged' is asserted only by one title substring (line 167). The criterion requires each slot, the search URL included, under each non-conforming variant."
    }
  ]
}

…ad a pending review as not reported (#3795)

The approval header names the repository (and issue) with the design's Post
issue / Post comment / Don't post actions instead of the draft as one JSON
line; an unsubmitted draft review reads Not reported rather than a review
request. The non-conforming-URL tests now cover the search slot and compare
the whole card's words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head d43f1c4 against base eb9191c. Reviewer: agent. 4 findings: 3 fixed, 1 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "d43f1c471dcd594024566a92db9b059b81a5da80",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/renderers/github-tools.tsx:73-86 registers the write tools' Input (W1/W4) but adds no approval target the way Apify does (apifyApprovalTarget). tool-permission-card.tsx:36-38 therefore falls back to JSON.stringify(input), so the approval header shows the whole raw draft as one JSON line beside the W1/W4 card. That breaks the brief's 'approve exactly what they will see posted' and the precedent that a review never renders as one JSON line (#3163).",
      "disposition": "fixed",
      "commit": "80cefb2c16e2aee4b5666df0fd5dc9786705b678"
    },
    {
      "summary": "packages/ui-react/src/components/chat/renderers/github-mapping.ts:110 maps a review in state 'pending' (an unsubmitted draft review; the host returns these in reviews.items, see ui-server/src/github/host.ts:171,182) to 'review-requested'. The thread then states a review request that never happened. The 'mapping is honest' rule needs an unknown or unsupported state to map to null ('Not reported'), not to a different fact.",
      "disposition": "fixed",
      "commit": "80cefb2c16e2aee4b5666df0fd5dc9786705b678"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:452-466 replaces the §7 trigger 'Show n line comments' on each review (GitHubReview's onShowLineComments slot) with one PR-wide 'Show line comments' section and defers the missing field to #4147. The issue's scope says a missing payload field is added to #3797's contract additively (in scope), so this §7 trigger ships unimplemented.",
      "disposition": "filed",
      "issue": "schlessera/brain-kit#4147"
    },
    {
      "summary": "packages/ui-react/tests/render/github-tools.test.tsx:151-178: the non-conforming-URL loop never swaps the search URL, so the search slot is not tested for another host or http:. Lines 173-178 test only another query or repository and null. 'Rest of the component unchanged' is asserted only by one title substring (line 167). The criterion requires each slot, the search URL included, under each non-conforming variant.",
      "disposition": "fixed",
      "commit": "80cefb2c16e2aee4b5666df0fd5dc9786705b678"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 80cefb2 against base eb9191c. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "80cefb2c16e2aee4b5666df0fd5dc9786705b678",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:114 maps all not_found and forbidden to S7 gone ('GitHub no longer shows this pull request'), including the host's own refusals forbidden/not_owner and not_found/not_in_session or not_pull_request (packages/ui-server/src/routes/github-details.ts:52-90), so the card blames GitHub for a host-side refusal. packages/ui-react/tests/render/github-tools.test.tsx:326 asserts the wrong mapping."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:115-116: unavailable/credential_rejected (GitHub rejected the host credential, packages/ui-server/src/github/host.ts:255) and the client's unavailable/authentication (a 401, packages/ui-react/src/lib/github-details.ts) fall through to S4 without an errorStatus. The kit then reads 'Couldn't load … GitHub didn't answer.', which is untrue: GitHub or the host did answer, with a typed reason the scope says must map to the S4–S7 states."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:455-462: the issue's scope fixes the §7 trigger as 'Show n line comments' on each review, and says a missing payload field is to be added to #3797's contract additively. The PR ships one PR-wide 'Show line comments' section instead and still closes #3795, leaving the per-review trigger to #4147. #4147 is open with no milestone, so the deferred scope item has no release."
    },
    {
      "summary": "packages/ui-react/tests/render/github-tools.test.tsx:172: the 'another number' case skips the whole search block, because the number swap leaves search_url unchanged. So no test gives a search result row an html_url with another number. With the renderer's validator re-check in resultRow skipped (packages/ui-react/src/components/chat/renderers/github-mapping.ts:227), a row linking to the wrong issue number on github.com would still pass every test; the AC requires each slot to be tested."
    }
  ]
}

A forbidden or not-found answer the host made itself (not this chat's
owner, not in this session, not a pull request), a rejected credential
or a sign-in, read as a callout with the host's message instead of the
kit's "GitHub no longer shows" or "GitHub didn't answer" states, which
blame GitHub. Refusals with a GitHub origin keep S4-S7.

Tests cover each host refusal and a search row whose URL names another
issue number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 80cefb2 against base eb9191c. Reviewer: agent. 4 findings: 3 fixed, 1 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "80cefb2c16e2aee4b5666df0fd5dc9786705b678",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:114 maps all not_found and forbidden to S7 gone ('GitHub no longer shows this pull request'), including the host's own refusals forbidden/not_owner and not_found/not_in_session or not_pull_request (packages/ui-server/src/routes/github-details.ts:52-90), so the card blames GitHub for a host-side refusal. packages/ui-react/tests/render/github-tools.test.tsx:326 asserts the wrong mapping.",
      "disposition": "fixed",
      "commit": "383a077a74f08531c5a1148bcd4daa0ee92d9920"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:115-116: unavailable/credential_rejected (GitHub rejected the host credential, packages/ui-server/src/github/host.ts:255) and the client's unavailable/authentication (a 401, packages/ui-react/src/lib/github-details.ts) fall through to S4 without an errorStatus. The kit then reads 'Couldn't load … GitHub didn't answer.', which is untrue: GitHub or the host did answer, with a typed reason the scope says must map to the S4–S7 states.",
      "disposition": "fixed",
      "commit": "383a077a74f08531c5a1148bcd4daa0ee92d9920"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:455-462: the issue's scope fixes the §7 trigger as 'Show n line comments' on each review, and says a missing payload field is to be added to #3797's contract additively. The PR ships one PR-wide 'Show line comments' section instead and still closes #3795, leaving the per-review trigger to #4147. #4147 is open with no milestone, so the deferred scope item has no release.",
      "disposition": "filed",
      "issue": "schlessera/brain-kit#4147"
    },
    {
      "summary": "packages/ui-react/tests/render/github-tools.test.tsx:172: the 'another number' case skips the whole search block, because the number swap leaves search_url unchanged. So no test gives a search result row an html_url with another number. With the renderer's validator re-check in resultRow skipped (packages/ui-react/src/components/chat/renderers/github-mapping.ts:227), a row linking to the wrong issue number on github.com would still pass every test; the AC requires each slot to be tested.",
      "disposition": "fixed",
      "commit": "383a077a74f08531c5a1148bcd4daa0ee92d9920"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 383a077 against base eb9191c. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "383a077a74f08531c5a1148bcd4daa0ee92d9920",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:513: WriteRefusal renders every approval_declined that is not 'edited' as GitHubWriteNotice 'declined' ('You chose Don't post. Nothing was sent to GitHub.'). The host also returns approval_declined/voice_posture (packages/ui-server/src/github/host.ts:486, 'Voice cannot approve a GitHub write') when the user never saw a card or chose anything. The W3 card then states a choice the user never made, and no test covers voice_posture."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:559-568: the design's W4 is a target row above 'a GitHubComment in preview', and the kit's GitHubComment has a `preview` prop for that (GitHubComment.tsx:24). GithubCommentPreview instead composes GitHubStateChip with a bare UntrustedText and a custom caption ('Brain's draft · not posted'): a new visual composition outside #3800, against 'uses the ui-kit components unchanged; no new visual design'."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:127 with :213: any unmapped detail error becomes `refusal`, and DetailPart replaces GitHubDetailSection with a bare Callout that has no Try again. This covers the route's generic failure (upstream_error/null, ui-server/src/routes/github-details.ts:100), the client's upstream_error/malformed and the 401 'Sign in again'. A transient failure leaves the section dead until the card remounts, instead of S4 with onRetry."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:182-186 with :212: moreLabel counts detail.items, which still includes the pages' duplicates of rows the result already shows, while only the filtered rows render. With 70 comments and the latest 30 shown, page 1 reads 'Load more · 30 of 70 shown' when 60 are on screen, and the last press adds nothing. Commits overlap entirely: the first 'Show all commits' press re-fetches the 30 shown commits and adds no row."
    }
  ]
}

- Every upstream failure on a detail page is S4 with Try again, whatever
  its reason; a host refusal keeps its own words and gains a Try again.
- "Load more" counts the rows on screen, the result's included, not the
  page's duplicates of them; a page made only of rows already shown is
  followed to the next, so a press always shows something new.
- Only the reader's own Don't post or edit reads as W3 declined or
  changed; a voice turn's refusal keeps the host's words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 383a077 against base eb9191c. Reviewer: agent. 4 findings: 3 fixed, 1 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "383a077a74f08531c5a1148bcd4daa0ee92d9920",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:513: WriteRefusal renders every approval_declined that is not 'edited' as GitHubWriteNotice 'declined' ('You chose Don't post. Nothing was sent to GitHub.'). The host also returns approval_declined/voice_posture (packages/ui-server/src/github/host.ts:486, 'Voice cannot approve a GitHub write') when the user never saw a card or chose anything. The W3 card then states a choice the user never made, and no test covers voice_posture.",
      "disposition": "fixed",
      "commit": "1c47244daada10e1ed7256f0903f8f9230ba98a1"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:559-568: the design's W4 is a target row above 'a GitHubComment in preview', and the kit's GitHubComment has a `preview` prop for that (GitHubComment.tsx:24). GithubCommentPreview instead composes GitHubStateChip with a bare UntrustedText and a custom caption ('Brain's draft · not posted'): a new visual composition outside #3800, against 'uses the ui-kit components unchanged; no new visual design'.",
      "disposition": "filed",
      "issue": "schlessera/brain-kit#4154"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:127 with :213: any unmapped detail error becomes `refusal`, and DetailPart replaces GitHubDetailSection with a bare Callout that has no Try again. This covers the route's generic failure (upstream_error/null, ui-server/src/routes/github-details.ts:100), the client's upstream_error/malformed and the 401 'Sign in again'. A transient failure leaves the section dead until the card remounts, instead of S4 with onRetry.",
      "disposition": "fixed",
      "commit": "1c47244daada10e1ed7256f0903f8f9230ba98a1"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:182-186 with :212: moreLabel counts detail.items, which still includes the pages' duplicates of rows the result already shows, while only the filtered rows render. With 70 comments and the latest 30 shown, page 1 reads 'Load more · 30 of 70 shown' when 60 are on screen, and the last press adds nothing. Commits overlap entirely: the first 'Show all commits' press re-fetches the 30 shown commits and adds no row.",
      "disposition": "fixed",
      "commit": "1c47244daada10e1ed7256f0903f8f9230ba98a1"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 1c47244 against base eb9191c. Reviewer: agent. 4 findings: 0 fixed, 0 filed, 0 rejected, 4 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "1c47244daada10e1ed7256f0903f8f9230ba98a1",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/renderers/github-tools.tsx:47-55: writeInput hides the W1/W4 draft only when status !== 'pending_approval'. A restored card the host closed as 'answered' (maybe approved and posted on another device) keeps status pending_approval with readOnly set. awaitsDecision is then false, so tool-call-timeline.tsx:396 renders Input and the closed row shows the draft as 'Not posted'. No test covers a readOnly card."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:150-153: fetchPage clears only `refusal` when it starts loading, and merges detailErrorState over the previous Detail. errorStatus, resetAt and resetIn from an earlier failure therefore survive. Example: a 502 (\"GitHub answered 502\") followed by a retry that fails with client upstream_error/network still shows \"GitHub answered 502\", and a later rate_limited with no reset_at shows the old reset time."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:262-267: outcomeUnknown maps upstream_error/http_NNN to W3 'unknown', which the kit renders as 'Outcome unknown. GitHub didn't answer.' (ui-kit GitHubIssue.tsx:129). But http_NNN means GitHub did answer with that status (ui-server host.ts:431), so every 5xx or unmapped status gets an untrue card, like the fixed 'blames GitHub' finding. Only network/timeout is tested."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:126-127 with lib/github-details.ts:55: if the host's error body does not parse, the client builds upstream_error/http_<host status> from the host's own HTTP status (proxy 504, host 500), and the kit then says 'GitHub answered 504'. With no session (github-cards.tsx:146-148), S4 says 'GitHub didn't answer' though nothing was sent. Both blame GitHub for a host failure; neither is tested."
    }
  ]
}

- The detail client gives its own failures (no answer, an unreadable
  answer, the host's HTTP status) a host_ reason, and the card shows
  them, and a missing session, in the host's words instead of S4's
  "GitHub answered" or "GitHub didn't answer".
- A new detail request clears the previous failure's status and reset
  time.
- A write GitHub answered with a status keeps the host's words; only
  no answer at all reads as W3 unknown.
- A restored approval the host already closed shows no draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 1c47244 against base eb9191c. Reviewer: agent. 4 findings: 4 fixed, 0 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "1c47244daada10e1ed7256f0903f8f9230ba98a1",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/renderers/github-tools.tsx:47-55: writeInput hides the W1/W4 draft only when status !== 'pending_approval'. A restored card the host closed as 'answered' (maybe approved and posted on another device) keeps status pending_approval with readOnly set. awaitsDecision is then false, so tool-call-timeline.tsx:396 renders Input and the closed row shows the draft as 'Not posted'. No test covers a readOnly card.",
      "disposition": "fixed",
      "commit": "65ac6193ce3f4fbd24b4f8e84810b7066224b184"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:150-153: fetchPage clears only `refusal` when it starts loading, and merges detailErrorState over the previous Detail. errorStatus, resetAt and resetIn from an earlier failure therefore survive. Example: a 502 (\"GitHub answered 502\") followed by a retry that fails with client upstream_error/network still shows \"GitHub answered 502\", and a later rate_limited with no reset_at shows the old reset time.",
      "disposition": "fixed",
      "commit": "65ac6193ce3f4fbd24b4f8e84810b7066224b184"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:262-267: outcomeUnknown maps upstream_error/http_NNN to W3 'unknown', which the kit renders as 'Outcome unknown. GitHub didn't answer.' (ui-kit GitHubIssue.tsx:129). But http_NNN means GitHub did answer with that status (ui-server host.ts:431), so every 5xx or unmapped status gets an untrue card, like the fixed 'blames GitHub' finding. Only network/timeout is tested.",
      "disposition": "fixed",
      "commit": "65ac6193ce3f4fbd24b4f8e84810b7066224b184"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:126-127 with lib/github-details.ts:55: if the host's error body does not parse, the client builds upstream_error/http_<host status> from the host's own HTTP status (proxy 504, host 500), and the kit then says 'GitHub answered 504'. With no session (github-cards.tsx:146-148), S4 says 'GitHub didn't answer' though nothing was sent. Both blame GitHub for a host failure; neither is tested.",
      "disposition": "fixed",
      "commit": "65ac6193ce3f4fbd24b4f8e84810b7066224b184"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 65ac619 against base eb9191c. Reviewer: agent. 5 findings: 0 fixed, 0 filed, 0 rejected, 5 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "65ac6193ce3f4fbd24b4f8e84810b7066224b184",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:592-601: the W4 approval is not the design's W4, a target row above a GitHubComment in preview. The renderer builds its own layout from GitHubStateChip, GitHubRef and a raw UntrustedText, which is the new ui-react visual design the issue rules out. That work is deferred to open #4154, yet the PR says 'Closes #3795', so the W1–W4 and 'ui-kit components unchanged' criteria close unmet."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:494-508: §7's line-comment trigger ('Show n line comments' on each review, GitHubReview's onShowLineComments) is replaced by one PR-wide 'Show line comments' section. The missing per-review count is filed as #4147 instead of being added to #3797's contract, which the issue's scope requires. The issue is still closed."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:579 and :597: GithubCommentCard (W2/W4 result) and GithubCommentPreview always pass GitHubRef kind=\"issue\". brain_github_issue_comment also comments on pull requests, so a comment on PR #412 is labelled 'Issue · ithaca/hall #412', and the link's accessible name says Issue, both on the approval preview and on the posted result."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:129-130: detailErrorState sends every other upstream_error to S4, which reads 'GitHub didn't answer.' with no status. That covers reason null, sent by the detail route's catch-all ('The GitHub read failed.', packages/ui-server/src/routes/github-details.ts), and malformed/redirect, where GitHub did answer: host failures read as GitHub's. The test at github-tools.test.tsx:344 pins a host-worded null-reason error as S4."
    },
    {
      "summary": "packages/ui-react/src/components/chat/renderers/github-mapping.ts:132-137: reviewerRows drops any requested reviewer who already has a review decision. When an author re-requests review after a changes-requested or approval, the row shows only the stale decision and never 'review-requested', so a pending re-review reads as settled."
    }
  ]
}

…ets (#3795)

- A detail failure reads as S4 only when GitHub answered with a status
  or did not answer. The route's catch-all and an unreadable or
  redirected answer read in the host's words, with Try again.
- A posted comment names its target as an issue or a pull request only
  from its validated URL. The approval, which names only a number,
  claims neither.
- A reviewer asked again after a decision reads as review requested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 65ac619 against base eb9191c. Reviewer: agent. 5 findings: 3 fixed, 2 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "65ac6193ce3f4fbd24b4f8e84810b7066224b184",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:592-601: the W4 approval is not the design's W4, a target row above a GitHubComment in preview. The renderer builds its own layout from GitHubStateChip, GitHubRef and a raw UntrustedText, which is the new ui-react visual design the issue rules out. That work is deferred to open #4154, yet the PR says 'Closes #3795', so the W1–W4 and 'ui-kit components unchanged' criteria close unmet.",
      "disposition": "filed",
      "issue": "schlessera/brain-kit#4154"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:494-508: §7's line-comment trigger ('Show n line comments' on each review, GitHubReview's onShowLineComments) is replaced by one PR-wide 'Show line comments' section. The missing per-review count is filed as #4147 instead of being added to #3797's contract, which the issue's scope requires. The issue is still closed.",
      "disposition": "filed",
      "issue": "schlessera/brain-kit#4147"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:579 and :597: GithubCommentCard (W2/W4 result) and GithubCommentPreview always pass GitHubRef kind=\"issue\". brain_github_issue_comment also comments on pull requests, so a comment on PR #412 is labelled 'Issue · ithaca/hall #412', and the link's accessible name says Issue, both on the approval preview and on the posted result.",
      "disposition": "fixed",
      "commit": "52e7f273805f1403b220479be7422c91264309a1"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:129-130: detailErrorState sends every other upstream_error to S4, which reads 'GitHub didn't answer.' with no status. That covers reason null, sent by the detail route's catch-all ('The GitHub read failed.', packages/ui-server/src/routes/github-details.ts), and malformed/redirect, where GitHub did answer: host failures read as GitHub's. The test at github-tools.test.tsx:344 pins a host-worded null-reason error as S4.",
      "disposition": "fixed",
      "commit": "52e7f273805f1403b220479be7422c91264309a1"
    },
    {
      "summary": "packages/ui-react/src/components/chat/renderers/github-mapping.ts:132-137: reviewerRows drops any requested reviewer who already has a review decision. When an author re-requests review after a changes-requested or approval, the row shows only the stale decision and never 'review-requested', so a pending re-review reads as settled.",
      "disposition": "fixed",
      "commit": "52e7f273805f1403b220479be7422c91264309a1"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 52e7f27 against base eb9191c. Reviewer: agent. 2 findings: 0 fixed, 0 filed, 0 rejected, 2 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "52e7f273805f1403b220479be7422c91264309a1",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:165 sets a detail section to \"empty\" whenever a page has no items, ignoring page.next_cursor. The host's checks part (packages/ui-server/src/github/details.ts:320) always answers the last check-runs page with next_cursor \"statuses:1\". So a PR with commit statuses but no check runs opens Checks to \"GitHub returned no checks for this pull request\" with no Load more, and its statuses can never load: an absent-is-absent breach."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:232-238: when a Load more (append) fails with a host refusal (not_owner, not_in_session, a 401 sign-in, host_http_NNN, credential_rejected), DetailPart returns only the refusal Callout and Try again. Every row already loaded in that section disappears until a retry succeeds, whereas GitHubDetailSection keeps loaded rows in its error and rate-limited states."
    }
  ]
}

…3795)

- A detail page with no items is empty only when nothing is left to
  load. Checks with no runs but commit statuses now load the statuses,
  instead of reading "no checks".
- A later page refused in the host's words keeps the rows already
  loaded, with the refusal and Try again after them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 52e7f27 against base eb9191c. Reviewer: agent. 2 findings: 2 fixed, 0 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "52e7f273805f1403b220479be7422c91264309a1",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:165 sets a detail section to \"empty\" whenever a page has no items, ignoring page.next_cursor. The host's checks part (packages/ui-server/src/github/details.ts:320) always answers the last check-runs page with next_cursor \"statuses:1\". So a PR with commit statuses but no check runs opens Checks to \"GitHub returned no checks for this pull request\" with no Load more, and its statuses can never load: an absent-is-absent breach.",
      "disposition": "fixed",
      "commit": "3bfe8b0815232a265e05cafef5682f96b44073ee"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:232-238: when a Load more (append) fails with a host refusal (not_owner, not_in_session, a 401 sign-in, host_http_NNN, credential_rejected), DetailPart returns only the refusal Callout and Try again. Every row already loaded in that section disappears until a retry succeeds, whereas GitHubDetailSection keeps loaded rows in its error and rate-limited states.",
      "disposition": "fixed",
      "commit": "3bfe8b0815232a265e05cafef5682f96b44073ee"
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 3bfe8b0 against base eb9191c. Reviewer: agent. 2 findings: 0 fixed, 0 filed, 0 rejected, 2 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "3bfe8b0815232a265e05cafef5682f96b44073ee",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:514-525: issue #3795's scope and §7 put a \"Show n line comments\" trigger on each review; the PR gives one PR-wide \"Show line comments\" section, with rows not tied to any review, and mounts it only when pr.reviews.items.length > 0, so a PR whose result carries no review items cannot load line comments at all. The missing per-review count is deferred to open #4147, yet the PR closes #3795."
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:623-633: W4 (the comment approval) misses the approved design (\"a compact target row (state, ref, title, GitHub link) above a GitHubComment in preview\", AC1 \"render W1–W4\"). It shows a hand-styled `owner/repo #n` span (Target, lines 607-613), with no ref kind, title or link, and a bare UntrustedText instead of GitHubComment preview. This is deferred to open #4154 while the PR closes #3795."
    }
  ]
}

@schlessera

Copy link
Copy Markdown
Owner Author

Independent review

Reviewed head 3bfe8b0 against base eb9191c. Reviewer: agent. 2 findings: 0 fixed, 2 filed, 0 rejected, 0 without a disposition.

{
  "version": 1,
  "kind": "brain-review-receipt",
  "pr": 4146,
  "head": "3bfe8b0815232a265e05cafef5682f96b44073ee",
  "base": "eb9191c4bf523bbadefe52a0c727a4f0df2388eb",
  "reviewer": "agent",
  "outcome": "findings",
  "findings": [
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:514-525: issue #3795's scope and §7 put a \"Show n line comments\" trigger on each review; the PR gives one PR-wide \"Show line comments\" section, with rows not tied to any review, and mounts it only when pr.reviews.items.length > 0, so a PR whose result carries no review items cannot load line comments at all. The missing per-review count is deferred to open #4147, yet the PR closes #3795.",
      "disposition": "filed",
      "issue": "schlessera/brain-kit#4147"
    },
    {
      "summary": "packages/ui-react/src/components/chat/tool-cards/github-cards.tsx:623-633: W4 (the comment approval) misses the approved design (\"a compact target row (state, ref, title, GitHub link) above a GitHubComment in preview\", AC1 \"render W1–W4\"). It shows a hand-styled `owner/repo #n` span (Target, lines 607-613), with no ref kind, title or link, and a bare UntrustedText instead of GitHubComment preview. This is deferred to open #4154 while the PR closes #3795.",
      "disposition": "filed",
      "issue": "schlessera/brain-kit#4154"
    }
  ]
}

@schlessera
schlessera marked this pull request as ready for review November 17, 2026 08:52
@schlessera
schlessera merged commit 8da7182 into main Nov 17, 2026
56 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui-react, ui-kit: render GitHub tool results as dedicated issue, PR, review, commit and merge components

1 participant