Skip to content

Add sendDataModel sync, catalog ID, and theme support (#8)#18

Merged
23min merged 1 commit intomainfrom
feature/send-data-model-theme
Feb 11, 2026
Merged

Add sendDataModel sync, catalog ID, and theme support (#8)#18
23min merged 1 commit intomainfrom
feature/send-data-model-theme

Conversation

@23min
Copy link
Owner

@23min 23min commented Feb 11, 2026

Summary

  • sendDataModel sync: When sendDataModel: true on a surface, the client now echoes the data model in the A2UIClientMessage envelope with every action POST. The dataModel field is omitted when the flag is false or data is null (JsonIgnoreCondition.WhenWritingDefault).
  • Theme pass-through: The theme property from createSurface messages is now threaded through MessageDispatcherSurfaceManagerA2UISurfaceState (was silently dropped before). Server-side SurfaceBuilder and A2UIStreamWriter also support theme.
  • catalogId: Already parsed and stored — no code changes needed, just spec acknowledgment.

Test plan

  • SendActionAsync_IncludesDataModel_WhenSendDataModelTrue — verifies data model in envelope
  • SendActionAsync_OmitsDataModel_WhenSendDataModelFalse — verifies omission
  • CreateSurface_StoresTheme — verifies theme stored on surface state
  • CreateSurface_NullTheme_StoresNull — verifies null theme handling
  • Dispatch_CreateSurface_PassesTheme — verifies dispatcher threads theme through
  • Existing Envelope_HasExactlyTwoTopLevelProperties still passes (dataModel omitted when null)
  • 201/201 tests pass, 0 warnings

🤖 Generated with Claude Code

Echo the surface data model in client→server envelopes when
sendDataModel is true, thread theme from createSurface through
to surface state, and acknowledge catalogId storage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@23min 23min merged commit 1cab036 into main Feb 11, 2026
2 checks passed
@23min 23min deleted the feature/send-data-model-theme branch February 11, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant