Draft
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive and well-architected SwiftUI renderer for A2UI. The use of modern SwiftUI features like @Observable and the Layout protocol is excellent, and the extensive test suite provides great coverage. I've identified a few critical issues related to error handling where errors are silently ignored, which could make debugging difficult. I've also suggested refactoring a particularly complex function to improve its maintainability and efficiency. Addressing these points will significantly enhance the robustness of the new renderer. Additionally, please note that the PR description template should be filled out as per the repository's contributing guidelines.
renderers/swiftui/Sources/A2UISwiftUI/Processing/JSONLStreamParser.swift
Show resolved
Hide resolved
renderers/swiftui/Sources/A2UISwiftUI/Models/ComponentTypes.swift
Outdated
Show resolved
Hide resolved
renderers/swiftui/Sources/A2UISwiftUI/Processing/SurfaceViewModel.swift
Outdated
Show resolved
Hide resolved
544281f to
a10fea0
Compare
Implements a complete native SwiftUI renderer covering the full A2UI v0.8 protocol: JSONL stream parsing, surface management, data binding with path resolution, template expansion, action handling, and all 18 standard component types. Includes 71 unit tests, a demo app with catalog/samples/live-agent modes, an A2A networking client, and full Apple platform support (iOS, macOS, tvOS, watchOS, visionOS) with conditional compilation.
f3e04e6 to
73f0426
Compare
0220bf2 to
0193e32
Compare
0193e32 to
1a2ea60
Compare
- Add ChecksEvaluator with 8 standard functions: required, email, regex, length, numeric, and, or, not (with nested composition) - Integrate checks into all input components (TextField, CheckBox, Slider, DateTimeInput, ChoicePicker) with error message display - Add Button checks support for auto-disable when validation fails - Add contact_form.json sample based on official v0.9 spec test case - Remove Live Agent tab (previously deleted feature) - Add swiftui-component-review and swiftui-demo-roadmap docs Made-with: Cursor
Made-with: Cursor
- Switch Contact Lookup to AgentChatPage for conversational interface - Merge Live Agent Card/Chat sections into single Live Agent section - Fix SSE parser to handle single-line events without empty line separators - Support both JSON-RPC wrapped and bare A2A event formats in streaming - Add artifact.parts path to extractParts for streaming artifact events - Auto-send initialQuery after connection in AgentChatPage
- Add CatalogFunctionEvaluator with formatString, formatNumber, formatCurrency, formatDate, pluralize, and openUrl - Support FunctionCall in DynamicString/DynamicNumber/DynamicBoolean resolution (StringValue, NumberValue, BooleanValue) - Add Button functionCall action for client-side execution (e.g. openUrl) - Add accessibility attributes (label/description) parsing and rendering - Add Icon custom SVG path support via SVGPathShape - Support v0.10 ChildList template `path` key alongside v0.8 `dataBinding`
IconNameValue decoder incorrectly treated v0.8 {"literalString":"home"}
dictionaries as empty StringValue, causing all 59 standard icons to
show as questionmark.diamond fallback. Now delegates dictionary
decoding to StringValue and only treats {"path":"M..."} as SVG when
the value starts with an SVG move command.
Also updates AgentCardPage with hero/loading/result flow, fixes A2A
action payload structure, and adds SurfaceManager.clearAll().
- Add `.custom(String)` case to `ComponentType` for unknown component types - Implement `CustomComponentRegistry` with environment-based renderer injection - Handle flat dotted/bracket keys in `dataModelUpdate` (e.g. `chart.items[0].label`) - Auto-create/extend arrays in `setValue` for nested data paths - Remove throw on unknown components; resolve custom children from properties - Fix A2A catalog negotiation: correct standard catalog ID and prefer custom catalogs - Add `RizzchartChartView` (Swift Charts doughnut with drill-down) - Add `RizzchartMapView` (MapKit with markers) - Add `RizzchartsPage` static demo and live agent integration - Add Chart/Map entries to CatalogPage - Support `customRenderer` in `AgentChatPage` and `AgentCardPage` Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Description
Add a native SwiftUI renderer for the A2UI protocol, enabling all Apple platforms (iOS 17+, macOS 14+, tvOS 17+, watchOS 10+, visionOS 1+) to render agent-generated UI from A2UI JSON payloads into native SwiftUI views..
#680
Pre-launch Checklist
If you need help, consider asking for advice on the discussion board.