Skip to content

feat(examples): preserve requested view badges in chat - #7973

Closed
contextablemark wants to merge 2 commits into
tylerslaton/a2ui-playgroundfrom
contextablemark/feat-a2ui-view-request-badges
Closed

contextablemark wants to merge 2 commits into
tylerslaton/a2ui-playgroundfrom
contextablemark/feat-a2ui-view-request-badges

Conversation

@contextablemark

@contextablemark contextablemark commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Based directly on #7965 (tylerslaton/a2ui-playground). This badge feature is independent of #7976 (Express); either follow-up PR can be applied without the other.

A view selected from the composer + menu now leaves its catalog icon across the sent question’s lower-right bubble edge. The selection is captured at submission and persisted as native AG-UI message metadata, so it survives thread reloads. Plain questions and cancelled selections stay unmarked. The bubble reads canonical message updates so metadata-only changes appear immediately despite SDK row memoization.

Validation: scoped Nx format, lint, typecheck, example build, all seven badge association and transport tests on AG-UI client 1.0.2, and live Report/Table/plain-follow-up checks with reload persistence passed for this original badge commit. The independent rebase restores that exact commit and tree; no source changes were introduced. Ordinary hooks and the original Intelligence smoke run passed for that commit.

This PR contains only the badge feature. Express/JSON selection, dependency upgrades, benchmarks, and prompt tuning are separate.

tylerslaton and others added 2 commits October 23, 2026 17:47
…nd Gemini

A research desk at examples/showcases/a2ui. A Google ADK agent on Gemini
answers in prose and, when a view helps, in A2UI from the standard
catalog over the markdown transport, with Intelligence threads. Every
view decompiles into its A2UI; a catalog page shows each standard
component rendered from A2UI; Solarized light and dark follow the system.

Also carries the react-core fixes the demo needs (some are open as
separate PRs): horizontal bar value labels, Table headers for templated
rows, Select padding without an icon, custom chat input layouts that grow
their textarea, the app's error fallback for every failed node, pow() in
calc, and markdown surfaces that show again on a thread revisit.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 1
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@contextablemark
contextablemark changed the base branch from tylerslaton/a2ui-playground to contextablemark/feat-a2ui-playground-express October 24, 2026 23:45
@contextablemark
contextablemark force-pushed the contextablemark/feat-a2ui-view-request-badges branch from d437bb3 to 5e1f7dc Compare October 24, 2026 23:55
@contextablemark
contextablemark changed the base branch from contextablemark/feat-a2ui-playground-express to tylerslaton/a2ui-playground October 24, 2026 23:55
@tylerslaton
tylerslaton force-pushed the tylerslaton/a2ui-playground branch from b15bbfe to 0f6522a Compare October 27, 2026 20:20

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #7965. The requested-view badge feature from 5e1f7dc is incorporated there as 2cf4459, with authorship preserved.

Verification against #7965 head f8b14a7 confirmed the submission metadata, badge rendering, and canonical-message handling remain in source. No separate merge or conflict resolution is needed for this PR. Closing as superseded does not imply #7965 has merged or completed its review and CI.

tylerslaton added a commit that referenced this pull request Nov 19, 2026
…nd Gemini (#7965)

## What this is

**A2UI Playground** (`examples/showcases/a2ui`) is a demo of native
generative UI. It runs a TanStack Start app with a Google ADK agent on
Gemini over AG-UI, CopilotKit Intelligence threads, and the standard
catalog (`standardUI`) over the markdown transport.

- **Answers with views.** The agent answers in prose and draws a view
from the standard catalog when one helps. The prompt never names a
component.
- **Views stream in.** Each component arrives as soon as its JSON
closes. `agent/src/research_desk/fences.py` repairs and streams fence
lines.
- **Decompile.** Every view has an **A2UI** button that pixelates the
view into the A2UI that made it, and back again.
- **Catalog.** A bento gallery of the standard catalog in its seven
groups, at `?catalog`. Each specimen is real A2UI with its own A2UI
button and info panel.
- **Works signed out, sign in to keep it (Clerk).** By default nothing
is kept. Signing in keeps a reader's threads in Intelligence
(`identifyUser` returns the Clerk user) and unlocks Connections. The
runtime route serves a signed-out runtime and a signed-in runtime.
- **Actions in the reader's Google apps (Composio).**
  - Readers connect Gmail, Calendar, Drive, Docs and Sheets.
- The agent loads a short list of tools for each connected app, per
reader. The reader is named by the runtime in a header the agent trusts
over run state.
- Anything that sends, creates, changes or deletes pauses for an in-chat
Confirm card. That uses ADK tool confirmation, which reaches the chat as
an AG-UI interrupt handled by `useInterrupt`.
- **Date and time.** The agent knows the reader's local date and time,
from the browser's time zone.
- **Look.** Solarized light and dark, following the system setting.
- **Also included:** a report sheet, pictures (`find_images`), grounded
research with favicons, a model picker, and the + menu.

### From Mark (folded in from his stacked PRs, with authorship kept)

- **#7973:** a view picked from the + menu leaves its icon as a badge on
the sent question. It's saved as AG-UI message metadata, so it survives
reloads.
- **#7976:** **A2UI Express** as a second authoring format next to JSON.
It's compiled with Google's A2UI SDK, and the server streams validated
JSON fences. Changing format starts a new thread.

## Library changes carried here

| Change | Where | Also in |
| --- | --- | --- |
| Horizontal bar value labels beside the bars | `standard/Chart.tsx` |
#7961 |
| Table header for templated rows | `standard/data.tsx` | #7962 |
| Select padding without an icon | `standard/inputs.tsx` | #7963 |
| `errorBoundary.fallback` covers cyclic refs, unknown components and
invalid props | `boundaries.tsx`, `SurfaceView.tsx` | n/a |
| `pow(x, n)` in `calc`, and the prompt says what calc takes |
`calc.ts`, `shared/.../prompt.ts` | n/a |
| Markdown surfaces show again on a thread revisit (`forgetSurface`) |
`markdown/source.ts`, `surface-manager.ts` | n/a |

The custom chat input textarea fix landed separately in #7964, so it is
no longer carried here.

## Run it

See `examples/showcases/a2ui/README.md`. Keys go in a gitignored `.env`;
`.env.example` lists them, all empty. Clerk and Composio are optional:
without Composio, Connections is off.

## Checks

- react-core and shared tests pass.
- Agent tests pass (117).
- The example type-checks.
- Mark's badge tests pass (7, via `tsx --test`).
- Lint and format are clean.
- A live signed-out run works.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Added an A2UI research desk showcase with web and image research,
generated reports, selectable views and models, and JSON or Express
display formats.
* Browse a component catalog, inspect generated A2UI source, save notes,
manage connected Google apps, and confirm sensitive actions. Stateful
mode adds sign-in and thread history; stateless mode remains available
by default.
  * Added deployment configuration for the showcase.
* **Bug Fixes**
* Improved horizontal chart labels and axis sizing, table headers for
child-based rows, and select-control padding.
  * Corrected how removed surfaces are cleared so they can be recreated.
* **Documentation**
  * Added setup instructions and product and design guides.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

2 participants