Repository navigation
fix(ai): align the tool-call row, steps and approval card across platforms - #37
Conversation
…ith iOS - A declined call's icon follows its status (shimmering hand while still awaiting approval, then the cross) and keeps its duration once finished. - The waiting shimmer draws the icon in the accent with a title-colored band. - Tool row icon 16 with a gap of 8; parts spaced 10 and full width. - Unsupported-step placeholder reads like a tool row. - Approval card spacing 4 / 12 / 8, spinner after the buttons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… what they do Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xsahil03x
left a comment
There was a problem hiding this comment.
Thanks Petar, letting the icon follow the status and keeping a declined call's duration is the right model, and it is what both other SDKs already do. I compared the paddings, sizes, colors and spacing the description names against stream-chat-android-ai-compose and StreamChatAI on develop, and the regenerated CI goldens; apart from the gap below, they match, though I couldn't render either platform side by side. Analyze is clean, the non-golden tests pass, and 12 of the changed tests fail against main's lib, as they should.
Please do these before merging:
- Keep the gap between a tool call's row and its approval card at 8. It comes from
spacing, so it moved to 10 along with the steps, while Swift and Android keep it at 8. - Make the width test fail without the change: with a tight
SizedBoxit already passes onmain.
The rest is optional and inline.
`AIMessagePartsView.spacing` also set the gap between a tool call's row and its approval card, so raising it to 10 moved that gap too. The row and its question now sit a fixed 8 apart, and `spacing` only spaces steps. The running spinner is sized to 12 with a 1.5 stroke at the default icon size, and still scales with it. The width test uses a loose constraint, so it checks that the view fills its width. The CHANGELOG describes these views as added rather than listing changes to them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xsahil03x
left a comment
There was a problem hiding this comment.
Thanks! The question now sits a fixed 8 under its row whatever spacing is, the width test fails against main, and the spinner matches Android at 12 with a 1.5 stroke. Verified each against the new code.
Platform alignment for how an agent's steps look. No public API is added or removed. Some theme defaults change.
Tool-call row (
AIToolCallView)status. While the backend has yet to cancel the call, it shows the shimmering hand; after that, the × in the detail colour. The detail line still says "Declined". The duration now stays once the call has finished.accentColor, and a band in the title's colour sweeps across it. The two colours were swapped before.ToolCallThemeData.iconSize, was 14), with a fixed gap of 8 after it (wasmax(6, iconSize / 2)).Parts view (
AIMessagePartsView)AIUnsupportedPartViewnow reads like a tool-call row: the row's title font in its detail colour, with the same 16 icon and 8 gap. Before, it usedbodySmallwith an icon 1.25× the text size.Approval card (
AIToolApprovalCard)Goldens
CI goldens that change: run
update_goldenson this branch.test/src/parts/goldens/ci/ai_tool_call_view_{light,dark}.pngtest/src/parts/goldens/ci/ai_tool_approval_card_{light,dark}.pngtest/src/parts/goldens/ci/ai_unsupported_part_view.pngtest/src/conversation/goldens/ci/ai_conversation_view_{light,dark}.pngTesting
melos run lint:allpasses.melos run test:allpasses: 1287 tests.CI=true, the failures are only the goldens listed above, plus the voice-view and approval-card CI goldens, which already fail on macOS onmain.Before / after
The demo's refund turn: two approval cards, one approved and one declined. Each image is before on the left, after on the right.
🤖 Generated with Claude Code