Repository navigation
✨ feat(bots): SOUL and TEAM approvals show a diff, and approval cards fit on mobile - #386
Open
diegojohnsonl wants to merge 3 commits into
Open
diegojohnsonl wants to merge 3 commits into
diegojohnsonl wants to merge 3 commits into
Conversation
A Bot SOUL or TEAM change asked the user to approve the whole new text, so nothing showed what was removed or reworded. The approval now carries a unified diff from the saved text, with one line of context, and web and mobile draw its added and removed lines in color. The approval is bound to the saved documents it was drawn from, so a change to them asks again. Approval text that overflows its box now fades and offers Show all / Show less in place of the "Scroll to read all of it." note, and the status row gets room from the text above it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A long approval filled the subagent panel, which was capped at 320pt, so Cancel, Decline and Approve sat below a small scroll window. The floating "Subagent needs approval" pill sat on the panel's top edge, and the title showed the raw request kind "mcp-elicitation". - Approval text shows eight lines, fades into the card, and opens in place with Show all / Show less, like the web card. - The buttons sit in one row, each sized to its label. - The subagent panel gets the available height, minus the floating control's strip, instead of 320pt. - The pill no longer points at approvals the panel already shows. - Web and mobile share readable approval titles from client-runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The approval card showed each hunk's "@@ -2,18 +2,3 @@" header, line numbers a reader has no use for. Web and mobile now leave the header out and show only the removed, added and unchanged lines. The server still sends it, since it marks where the diff starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diegojohnsonl
force-pushed
the
feat/bot-soul-diff
branch
from
December 5, 2026 00:56
418b530 to
5efd4a5
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a Bot changed a SOUL or the TEAM rules, the approval showed the whole new text. You could not see what was removed or reworded. The web card also ended with a "Scroll to read all of it." note jammed between the text and the buttons.
On mobile, a long approval from a subagent pushed Cancel, Decline and Approve out of reach. The panel was capped at 320pt, and the card scrolled inside it. Three full-width buttons stacked vertically took most of that room. The title showed the raw request kind "mcp-elicitation".
What changed
bots/handlers.ts): the approval now says "Change the SOUL of …" and carries a unified diff from the saved text, with one line of context. jsdiff's "No newline at end of file" marker shows only when the trailing line break is the change itself. The approval state now also covers the saved SOUL and TEAM, so if either changes before the user answers, the user is asked again.client-runtime):approvalDiffLinessplits approval text into lines and marks hunk headers, added lines and removed lines. Text without an@@ -a,b +c,d @@header is left alone, so command approvals look the same as before.APPROVAL_KIND_LABELholds readable titles such as "App access approval", used by both web and mobile.Before / after
Web before:

Web after, collapsed (the first change is visible without expanding):

Web after, expanded (taken before context was cut from 3 lines to 1):

Mobile (Android), a subagent's SOUL approval: collapsed, expanded, and expanded scrolled to the buttons:
Verification
bot_updateon a test Bot twice: once for a full rewrite and once for an edit. Both approvals rendered as diffs on web, and approving them saved the change.threadRequests.test.ts,threadShell.test.ts,bots/handlers.test.ts, and the approval cases inMessagesTimeline.browser.test.tsxpass. Typecheck passes for client-runtime, server, web and mobile. Lint, format andi18n:checkpass.🤖 Generated with Claude Code (Claude Opus 5.5, in T3 Code)