feat(composer): production-quality A2UI Composer with AI authoring#1134
feat(composer): production-quality A2UI Composer with AI authoring#1134GeneralJerel wants to merge 8 commits intogoogle:mainfrom
Conversation
…yed-composer Replace the standalone Next.js app in tools/composer/ with the widget-builder from cpk-deployed-composer/apps/widget-builder/. The new source includes v0.9 A2UI support, AI authoring via CopilotKit, custom catalog support, and a local a2ui-v09-renderer. Changes: - Clear old tools/composer/ contents (PR google#987 standalone app) - Port widget-builder source (src, public, config files) - Remove dead workspace dep @copilotkitnext/a2ui-renderer - Add .env.example with required AI provider keys - Add .gitignore for node_modules, .next, .env*, .vercel, .turbo - Security audit: no hardcoded secrets found Co-Authored-By: Jerel <jerel@copilotkit.ai>
Co-Authored-By: Jerel <jerel@copilotkit.ai>
Co-Authored-By: Jerel <jerel@copilotkit.ai>
… props Remove the custom catalog system (CatalogContext, custom-catalog.ts, /catalog route) to keep the PR scope lean. Also fix pre-existing type errors from CopilotKit API changes (feather, inputProps, disclaimer props no longer exist on CopilotChat). Co-Authored-By: Jerel <jerel@copilotkit.ai>
Shift Pretty tab JSON syntax colors from -400 to -700 shades for readable light-mode contrast (standard IDE conventions). Fix card right-side clipping by adding width/overflow constraints to the A2uiSurface root div and theater renderer wrapper. Co-Authored-By: Jerel <jerel@copilotkit.ai>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request upgrades the A2UI Composer tool to a production-quality version, introducing a reactive rendering architecture, AI-assisted widget authoring, and a new gallery and theater for widget management. My review identified a critical regression regarding the removal of the testing infrastructure, which violates the repository's style guide requiring tests for code changes. Additionally, I found a bug in the default widget creation where the wrong prop is passed to the Text component, and I suggested adding user-facing error handling for storage operations to prevent silent data loss.
| "eslint-config-next": "16.0.8", | ||
| "express": "4.22.1", | ||
| "tailwindcss": "^4", | ||
| "tw-animate-css": "^1.4.0", | ||
| "typescript": "5.9.3", | ||
| "typescript-eslint": "^8.40.0", | ||
| "vitest": "^4.0.18", | ||
| "wrangler": "^4.73.0" |
There was a problem hiding this comment.
This pull request introduces a significant amount of new functionality and refactoring, but it also removes the entire testing infrastructure, including vitest and @testing-library. The repository's style guide states, "If there are code changes, code should have tests." Removing tests for a "production-quality" upgrade is a major regression in code quality and maintainability. Please reintroduce a testing setup and add tests for the new features to ensure the composer is robust and prevent future regressions.
References
- The repository style guide requires that code changes should have tests. (link)
| component: "Text", | ||
| value: "Hello World", | ||
| variant: "body", |
There was a problem hiding this comment.
The Text component expects a text prop, but value is being provided here for the default component. This will result in blank widgets created via the "Start Blank" button not displaying the "Hello World" text.
| component: "Text", | |
| value: "Hello World", | |
| variant: "body", | |
| component: "Text", | |
| text: "Hello World", | |
| variant: "body", |
| if (widgetToSave) { | ||
| await saveWidget(widgetToSave).catch(err => console.error('Failed to persist widget:', err)); | ||
| } |
There was a problem hiding this comment.
The updateWidget function performs an optimistic UI update and then saves to storage. If the saveWidget call fails, the error is only logged to the console. The user will not be aware that their changes were not persisted, leading to potential data loss if they refresh the page. Consider adding user-facing error handling, such as a toast notification, to inform the user of the failure and allow them to take action.
Add vitest, @testing-library/react, jsdom and 31 tests covering json-parser, storage, data-panel, editor-header, widget-editor, and widgets-context. Fix default widget Text component using wrong prop name (value → text). Co-Authored-By: Jerel <jerel@copilotkit.ai>
7f4a29d to
9ca87f2
Compare
…ping Cards had width:100% plus 8px horizontal margin, causing the total footprint to exceed the parent and get clipped by overflow:hidden. Flex stretch from parent containers handles the width naturally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Addresses Gemini review feedback — storage operations (save, delete, clear) now show a dismissible error notification instead of only logging to console. Auto-dismisses after 5 seconds. Co-Authored-By: Claude Opus 4.6 (1M context) <jerel@copilotkit.ai>
|
Closing in favor of a new PR from |
Summary
Production-quality upgrade of the A2UI Composer tool (building on #987). Replaces the original prototype with a fully-featured widget editor powered by CopilotKit and the A2UI v0.9 spec.
IconcomponentA2uiSurfaceusesuseSyncExternalStorefor granular re-renders via theSurfaceModelKey Architecture
/api/copilotkitroute)@a2ui/web_corev0.9 —SurfaceModel,ComponentContext,MessageProcessor,CatalogCommits
696b94508a12fb82d2e65c25b76f3112e9b9ca87f2b9723d0f45ac2fTest plan
pnpm install && pnpm build— clean build with zero errorspnpm test— 31 tests passpnpm dev— verify all routes:/,/gallery,/theater,/icons,/components/— verify AI generates valid A2UI v0.9 JSONPre-launch Checklist
🤖 Generated with Claude Code