Revert "feat: Upgrade A2UI examples to v0.9 schema"#758
Conversation
This reverts commit b698146.
There was a problem hiding this comment.
Code Review
This pull request successfully reverts the A2UI examples and schema usage from v0.9 back to v0.8, as indicated by the PR title and description. The changes correctly update version constants, example paths, and schema property names across multiple agent samples. However, there are a couple of areas that could be improved for maintainability and code quality.
I am having trouble creating individual review comments. Click here to see my feedback.
samples/agent/adk/tests/test_examples_validation.py (1-132)
The removal of test_examples_validation.py means that the automated validation of A2UI examples against their schemas is no longer performed. This increases the risk of introducing invalid examples, which can lead to runtime errors or incorrect UI rendering. It is crucial to maintain tests for example validation, especially when schema versions change. This violates the repository's best practice: "If there are code changes, code should have tests."
samples/agent/adk/contact_multiple_surfaces/prompt_builder.py (94-96)
Hardcoding a large JSON string directly into the Python file significantly reduces readability and maintainability. It would be preferable to load this inline catalog from a separate JSON file, similar to how it was handled before this revert, or to construct it programmatically in a more readable manner. This approach makes it harder to visually inspect and manage the catalog's structure.
client_ui_capabilities = {"inlineCatalogs": [inline_catalog_data]}
# Assuming inline_catalog_data is loaded from a separate JSON file
Reverts #751
The v0.9 renderer won't be ready for a bit. Revert for now.