The Promise: Agent-Streamed UI Without Manual DOM Wrangling
When evaluating a2ui-project/a2ui for a conversational dashboard rebuild, the pitch was clean: backend agents stream JSON layout descriptors, and the React adapter hydrates them into live components. No manual createElement chains, no brittle template strings. The repository ships adapters for React, Angular, Lit, Flutter, SwiftUI, and Jetpack Compose—universal generative UI.
The reality hit during our first modal implementation. a2ui's layout schema handles flat component trees elegantly, but once you introduce nested modals with focus trapping and portal rendering , the abstraction starts bleeding through the seams.
The Failure Surface: Portal Boundaries and TailwindCSS Context Loss
Test Case: Agent-Driven Confirmation Dialog
Our agent streams this layout descriptor:
{ "type" : "modal" , "id" : "confirm-delete" , "backdrop" : true , "children" : [ { "type" : "box" , "className" : "bg-white rounded-lg shadow-xl p-6 max-w-md" , "children" : […