Skip to content

sendDataModel sync + catalog & theme support #8

@23min

Description

@23min

Spec reference

Current behavior

  • We parse sendDataModel from createSurface but do not echo the data model back in client-to-server messages.
  • We do not parse catalogId from createSurface.
  • We do not parse or apply theme properties.

Required behavior

sendDataModel sync: When sendDataModel: true is set on createSurface, the client must include the full data model in the A2A message metadata when sending actions back to the server.

Catalog ID: The createSurface message includes a catalogId field specifying which component catalog the server chose. The renderer should parse and store this value.

Theme support: The createSurface message can include theme parameters (e.g., primaryColor). The renderer should apply these to component styling.

Affected files

  • src/A2UI.Blazor/Services/A2UIStreamClient.cs — include data model in action metadata
  • src/A2UI.Blazor/Services/SurfaceManager.cs — parse catalogId and theme
  • src/A2UI.Blazor/Components/ — apply theme properties to rendered components

SPECIFICATION.md reference

  • Client-to-Server Communication: sendDataModel sync row
  • Protocol Features: Catalog ID in createSurface row
  • Protocol Features: Theme support row

Acceptance criteria

  • Implementation matches spec
  • Tests added (red-green-refactor)
  • SPECIFICATION.md updated (gap → compliant)
  • Sample servers updated if affected (parity)
  • Sample apps updated if affected (parity)

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec-complianceA2UI specification compliance gap

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions