You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every host maps ConversationPart to components itself: the whole-chat story, the activity stories and the e2e fixtures each carry their own copy. Each copy also re-implements the approval focus handoff: when groupActivity folds a decided call into the run before it, the call's buttons unmount and focus falls to <body> unless the host moves it. The old PartsRenderer only knew the part type that #110 removes.
What
src/ui/message-parts.tsx: MessageParts groups a message's parts with groupActivity and renders each kind with its component: Activity for reasoning and tool runs, ToolApproval for a call waiting on a person, ToolGroup for a batch with a waiting call, MessageContent for text (markdown through a render prop), Attachments tiles for files, GeneratedImages, Sources and ConversationNotice.
A per-kind render override for every part kind, so a host can replace any one of them.
The focus handoff: after a keyboard decision folds a call away, focus moves to the run's ActivityTrigger, or to the next waiting call in a batch, and never to <body>.
Replace the hand-written mappings in the stories and e2e fixtures.
Export in src/index.ts.
Constraints
No new dependency or peer, no optional-peer import, token-only styling.
Markdown only through a render prop.
Done when
Unit tests cover every part kind, the overrides and focus after each decision (Approve, Approve always, Deny), including batches.
A browser spec asserts focus is never on <body> after a keyboard decision.
bun run check, bun run build, bun run test:e2e (with the Storybook axe sweep, known list unchanged) and bun run dep-guard pass.
Activity