Skip to content

feat: add bounded generative UI registry#57

Merged
SebastianBoehler merged 2 commits into
mainfrom
agent/49-generative-ui-registry
Jul 9, 2026
Merged

feat: add bounded generative UI registry#57
SebastianBoehler merged 2 commits into
mainfrom
agent/49-generative-ui-registry

Conversation

@SebastianBoehler

Copy link
Copy Markdown
Contributor

Summary

  • Adds a typed generative UI registry for next_action, schedule_summary, route_hint, deadline_card, and quick_reply payloads.
  • Validates payload type, required fields, and per-component arguments before rendering.
  • Adds a Home preview section backed by static fixture payloads so the team can switch through generated component examples without an LLM.

Stacked after #56. Closes #49

Validation

  • git diff --check
  • flutter test test/generative_ui_registry_test.dart test/navigation_test.dart could not run in this runtime because flutter is not installed (command not found).

@SebastianBoehler SebastianBoehler force-pushed the agent/49-generative-ui-registry branch 2 times, most recently from 943bca6 to 9822e8e Compare July 9, 2026 08:25
@SebastianBoehler SebastianBoehler force-pushed the agent/49-generative-ui-registry branch from 9822e8e to 950e7b7 Compare July 9, 2026 09:00
@SebastianBoehler SebastianBoehler changed the base branch from agent/48-proactive-home-feed to main July 9, 2026 09:19
@SebastianBoehler SebastianBoehler marked this pull request as ready for review July 9, 2026 09:19
@SebastianBoehler SebastianBoehler merged commit 474a3e2 into main Jul 9, 2026
7 checks passed
@SebastianBoehler

Copy link
Copy Markdown
Contributor Author

Post-merge review pass: the intent looks solid for #49: a bounded component registry, fixture-backed preview, and tests around supported/unsupported component kinds. The main risk area I would tighten next is schema strictness for model-produced JSON.

One concrete follow-up: GenerativeUiRegistry._string currently uses value?.toString().trim(), so non-string values such as 123, true, or dates/objects with a string representation can pass fields that are reported as string-only. That weakens the “strict schemas” gate from #49 and could let malformed LLM payloads render as valid components instead of failing explicitly. Smallest fix: make _string return non-null only when value is String && value.trim().isNotEmpty, then add a focused test for numeric/bool type, title, body, and required arguments.

Other useful review angles for the next iteration:

  • Wire this registry to the actual assistant/action layer only after generated actions are mapped through existing app permissions/navigation, not directly from payload arguments.
  • Keep fixture payloads minimal and non-sensitive; they are currently static and safe.
  • Run flutter test test/generative_ui_registry_test.dart test/navigation_test.dart in a Flutter-enabled environment, since this runtime still cannot execute Flutter tests.

Concrete next step: open a small follow-up PR that makes string validation type-strict and adds the malformed-value tests.

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.

feat: bounded generative UI component registry

1 participant