feat(web-react)!: ChatComposer delegates to canonical AgentComposer#157
Merged
Merged
Conversation
Retire the bespoke ChatComposer implementation — it's now a thin wrapper over AgentComposer from @tangle-network/sandbox-ui, so every agent-app surface and sandbox-ui render the one shared input box. The wrapper preserves ChatComposer's API (controlled/uncontrolled value, onSend, attachments, streaming Stop, controls slot, Cmd/Ctrl+L focus); ~400 lines of duplicate composer logic deleted. Theme bridge: AgentComposer is authored against brand MD3 surface tokens. Add the md3 → shadcn mapping to agent-app's own theme (tokens.css md3-outline-variant / accent-surface-soft / accent-text / status-error / radius-md; tailwind-preset surface-container ladder), so the shared composer renders on-palette in any agent-app shell that uses @tangle-network/agent-app/styles — light + dark via the referenced triples' cascade. This also makes agent-app a first-class host for sandbox-ui components generally. BREAKING CHANGE: ChatComposer now renders via sandbox-ui's AgentComposer. Consumers of the web-react UI must provide the (optional) peers @tangle-network/sandbox-ui >=0.60, @tangle-network/brand >=0.6, @xyflow/react >=12, and have their Tailwind scan sandbox-ui's dist so the composer's classes generate. The send control is now an icon button (accessible name 'Send', was 'Send message'); controlsPlacement no longer moves controls above the input. web-react suite 31/31; ESM + DTS build green.
tangletools
approved these changes
Jun 30, 2026
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — 62818813
This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: drewstone_author · 2026-06-30T01:47:19Z
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.
What
Retire agent-app's bespoke
ChatComposer— it's now a thin wrapper over the canonicalAgentComposer(@tangle-network/sandbox-ui), so every agent-app surface and sandbox-ui render the one shared input box. ~400 lines of duplicate composer logic deleted; the wrapper preserves ChatComposer's full API (controlled/uncontrolledvalue,onSend, attachments, streaming Stop,controlsslot, Cmd/Ctrl+L focus).This is the last leg of composer unification: sandbox-ui owns the one design (0.60, now a superset incl. attachments + streaming + a controls slot), the marketing hero + tuner consume it, agent-app re-exports it via
/composer, and now agent-app's ownweb-reactcomposer is it.Theme bridge (makes agent-app a first-class host for sandbox-ui components)
AgentComposeris authored against the brand MD3 surface tokens; agent-app's theme is shadcn. Added the md3 → shadcn mapping to agent-app's own theme so the shared composer renders on-palette in any shell using@tangle-network/agent-app/styles:tokens.css:--md3-outline-variant/--accent-surface-soft/--accent-text/--status-error/--radius-md→ the shadcn triples (light + dark via cascade).tailwind-preset:surface-container/-high/-highest→card/popover/secondary.^0.42)Consumers of the
web-reactUI must:@tangle-network/sandbox-ui >=0.60,@tangle-network/brand >=0.6,@xyflow/react >=12.content/@sourceso the composer's classes generate (see the playground config change).controlsPlacementno longer moves controls above the input.Proof
tsc; ESM + DTS build green.file:..consumer): ChatComposer renders fully styled via AgentComposer in agent-app's light theme — bridge resolves surface/border/primary correctly,controlsslot (the playground's model pill) intact.Not in scope
The other duplicate pickers (
AgentSessionControls/ModelPicker/EffortPicker/ProviderLogoin web-react) still exist and keep their flat APIs — a separate follow-up (andProviderLogowould first need exporting from sandbox-ui).