Python a2ui_core: component state models, message processing and rendering#1578
Python a2ui_core: component state models, message processing and rendering#1578nan-yu wants to merge 8 commits into
Conversation
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
jacobsimionato
left a comment
There was a problem hiding this comment.
Some initial feedback!! Overall this looks great, let me take another look tomorrow!
b6dfdc8 to
da119f6
Compare
| self.on_updated.emit(self) | ||
|
|
||
| @property | ||
| def component_tree(self) -> Dict[str, Any]: |
There was a problem hiding this comment.
How is this different to properties above?
There was a problem hiding this comment.
This maps the web-based implementation, https://github.com/a2ui-project/a2ui/blob/main/renderers/web_core/src/v0_9/state/component-model.ts#L68.
comp = ComponentModel("c1", "Button", {"label": "Click"})
assert comp.properties == {"label": "Click"}
assert comp.component_tree == {"id": "c1", "type": "Button", "label": "Click"}| return f"{SPEC_BASE_URL}/{ver.replace('.', '_')}/{file_name}" | ||
|
|
||
|
|
||
| class CatalogValidator: |
There was a problem hiding this comment.
Maybe this could be MessageValidator? I get that it's catalog-specific, but to me, this name implies that it's validating catalog themselves.
There was a problem hiding this comment.
What about CatalogSchemaValidator? Classes like A2uiValidator (or a MessageValidator) operate at a higher protocol level to validate message structures. Since this class specifically validates individual message payloads (components, functions, and themes) against the schema definitions registered in the catalog, CatalogSchemaValidator feels more precise.
… dynamic evaluation
…management via protocol messages
…ort reactive stream subscription and cancellation
…ogic in DataContext
Description
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. For larger changes, raising an issue first helps reduce redundant work.
Pre-launch Checklist
If you need help, consider asking for advice on the discussion board.