Skip to content

[FEATURE]: Delete v0.8 React framework adapter #4109

Open

Description

@jacobsimionato

We aren't planning to support v0.8 going forward, so let's delete it for React.

We need to:

  • Make sure that nothing outside of React v0.8 depends on it. If it does, we should probably inline it elsewhere or move stuff to v0.9
  • Consider which sample apps might use React v0.8. They should be refactored to only use v0.9, or deleted.
  • Avoid changing v0.9 (i.e. shared) code paths.

Please post a detailed plan for my review before implementing, detailing the exact changes that are necessary, audit of dependencies of v0.8 code etc.

Activity

  1. jacobsimionato commented on Nov 10, 2026

    @jacobsimionato
    CollaboratorAuthor

    Hey! I've kicked off an automated agent in my local workspace to explore this and prepare a draft PR/fix. I'll review whatever it comes up with before submitting it for team review.

  2. jacobsimionato commented on Nov 10, 2026

    @jacobsimionato
    CollaboratorAuthor

    🤖 Autonomous Agent Implementation Plan

    I audited the repository at c69ed0dc5 to find every internal and external consumer of @a2ui/react's v0.8 code before making any edits.

    Audit of v0.8 dependencies

    1. Shared v0.9 and v1.0 runtime in typescript/renderers/react/src/ (no v0.8 dependencies).
      None of the shared runtime files (src/index.ts, src/v0_9/index.ts, A2uiSurface.tsx, adapter.tsx, node-view.tsx, host_registry.ts, markdown-context.tsx, markdown_hosts.tsx, react_component_implementation.ts, use_sync_external_store.ts, web_component_node.tsx, and src/catalog/*) import anything from src/v0_8/, src/styles/, or src/types.ts. All shared and ./v0_9 code paths can stay completely untouched.

    2. Legacy secondary entry point @a2ui/react/styles and orphan src/types.ts.
      src/styles/index.ts is export * from '../v0_8/styles/index', which injects Light DOM CSS rules (.a2ui-surface .a2ui-*) replicating Lit v0.8 styles for the v0.8 React components. Nothing in v0.9 or v1.0 uses it because the shared basic catalogs render Shadow DOM Custom Elements from @a2ui/web_core. Likewise, src/types.ts is export * from './v0_8/types' and has zero importers anywhere in the repository.

    3. Package-only dependencies used exclusively by src/v0_8/.
      In typescript/renderers/react/package.json, clsx (imported only in src/v0_8/lib/utils.ts) and markdown-it + @types/markdown-it (imported only in src/v0_8/components/content/Text.tsx) are used only by v0.8. @a2ui/markdown-it is also listed in @a2ui/react's dependencies, even though @a2ui/react never imports it (a2ui_explorer and samples/client/react/shell declare their own @a2ui/markdown-it dependencies).

    4. Visual parity workspace (typescript/renderers/react/visual-parity, @a2ui/visual-parity).
      This standalone workspace (visual-parity/package.json) is a manual Playwright pixel-diff suite comparing @a2ui/react/v0_8 + @a2ui/react/styles against @a2ui/lit's v0.8 components (visual-parity/react/src/main.tsx, FixturePage.tsx). It is not run in CI (build and test are no-ops).

    5. React Explorer (typescript/renderers/react/a2ui_explorer, @a2ui/react-explorer).
      Already uses @a2ui/react and @a2ui/react/v0_9 exclusively (supporting v0.9 and v1.0). Its only v0.8 references are unused bundler aliases for @a2ui/react/v0_8 and @a2ui/react/styles in karma.conf.cjs and vite.config.ts.

    6. Sample apps (samples/).

      1. samples/client/react/shell (@a2ui/react-shell, tested in ci-samples): Already migrated to @a2ui/react/v0_9 and @a2ui/web_core/v0_9! Its only v0.8 references are dead code left behind from that migration: an unimported 436-line src/theme/default-theme.ts and an unused theme?: Theme property in src/configs/types.ts.
      2. samples/community/macros/client: Already uses @a2ui/react/v0_9 only (no v0.8 imports).
      3. No other sample in samples/ imports @a2ui/react.
    7. Composer tool (tools/composer, widget-builder, built and tested in ci-tools).
      This is the only runtime consumer of @a2ui/react/v0_8 outside typescript/renderers/react:

      1. tools/composer/src/lib/a2ui.tsx imports A2UIViewer from @a2ui/react/v0_8. When specVersion === '0.9' it renders V09Viewer (which uses @a2ui/react/v0_9); when specVersion === '0.8' (or omitted) it renders BaseA2UIViewer from @a2ui/react/v0_8 with viewerTheme.
      2. Composer already has v0.9 counterparts for its gallery (V09_GALLERY_WIDGETS), component docs (COMPONENTS_DATA_V09), CopilotKit prompt (a2ui-prompt-v09.ts), and default version (DEFAULT_VERSION = '0.9' in spec-version-context.tsx). However, it still exposes a v0.8 / v0.9 toggle in version-selector.tsx, and /theater plays 4 curated v0.8 scenario JSON streams through useA2UISurface into <A2UIViewer />.

    Decisions to confirm before implementation

    1. How should we handle tools/composer?

      1. Option 1A (recommended, minimal scope in tools/composer) keeps changes confined to its adapter boundary (tools/composer/src/lib/a2ui.tsx). Replace the @a2ui/react/v0_8 BaseA2UIViewer import with a small v0.8-to-v0.9 component normalizer ({id, component: {Type: props}} to v0.9 component shape, converting explicitList/template, literalString/literalNumber/literalBoolean, usageHint to variant, and MultipleChoice to ChoicePicker) and render all widgets and /theater surfaces through V09Viewer (@a2ui/react/v0_9), deleting unused viewerTheme.ts. This keeps the PR focused on @a2ui/react without unrelated UI churn in tools/composer.
      2. Option 1B removes v0.8 mode across tools/composer (either here or in a stacked prerequisite PR): narrow SpecVersion to '0.9', remove VersionSelector, a2ui-prompt-v08.ts, COMPONENTS_DATA, V08_GALLERY_WIDGETS in sync-gallery.mjs, viewerTheme.ts, and transpileToV0_8, and convert the 4 /theater scenario JSONs (or useA2UISurface) to v0.9.
    2. How should we handle samples/client/react/shell?

      1. Option 2A (recommended) deletes unused samples/client/react/shell/src/theme/default-theme.ts and removes import type {Theme} from '@a2ui/react/v0_8' plus theme?: Theme from samples/client/react/shell/src/configs/types.ts. The sample already runs on @a2ui/react/v0_9, and broader legacy sample retirement is tracked separately in Delete legacy example apps from the mono repo #3988.
      2. Option 2B deletes samples/client/react/shell outright in this PR (and updates root package.json, samples/README.md, and samples/agent/node/restaurant_finder/README.md).
    3. Confirm deleting ./styles (@a2ui/react/styles) and visual-parity/ alongside ./v0_8?
      Both exist solely for the v0.8 Light DOM components. Removing ./styles lets us delete src/styles/, scripts/postbuild.mjs, and the second tsup build target.


    Exact planned changes (assuming Options 1A, 2A, and 3)

    1. Delete v0.8 source, styles, visual-parity suite, and v0.8 tests in typescript/renderers/react/:

      1. Delete typescript/renderers/react/src/v0_8/ (38 files).
      2. Delete typescript/renderers/react/src/styles/ (index.ts, index.d.ts), typescript/renderers/react/src/types.ts, and typescript/renderers/react/scripts/postbuild.mjs.
      3. Delete typescript/renderers/react/tests/v0_8/ (30 files).
      4. Delete typescript/renderers/react/visual-parity/ (38 files) and update yarn.lock.
    2. Update @a2ui/react package, build, lint, and test configs (leaving all shared src/*.ts(x) and src/v0_9/index.ts files untouched):

      1. typescript/renderers/react/package.json: Remove "./v0_8" and "./styles" from exports; remove clsx, markdown-it, and @a2ui/markdown-it from dependencies and @types/markdown-it from devDependencies; change wireit.build.command from "tsup && node scripts/postbuild.mjs" to "tsup" and remove "../markdown-it:build" from wireit.build.dependencies.
      2. typescript/renderers/react/tsup.config.ts: Remove 'v0_8/index' from entry, remove 'markdown-it' from external, and delete the second styles config entry.
      3. typescript/renderers/react/tsconfig.json and vitest.config.ts: Remove @a2ui/react/v0_8, @a2ui/react/styles, dist/v0_8, dist/styles, and @ (src/v0_8) path aliases.
      4. typescript/renderers/react/eslint.config.mjs: Remove src/v0_8/** and visual-parity/** patterns (keeping eslint.boundary.mjs untouched so scripts/adapter_boundary_allowlist.test.mjs continues to pass).
      5. typescript/renderers/react/tests/setup.ts: Remove initializeDefaultCatalog() setup.
      6. typescript/renderers/react/tests/package_exports.test.ts: Remove the dist/v0_8/index.js import and v0.8 isolation test while keeping the root/v0_9 export identity test.
      7. typescript/renderers/react/scripts/test-react17.sh: Remove @a2ui/react/v0_8, @a2ui/react/styles, and V08Harness checks while keeping ESM/CJS resolution, SSR renderToString, and client DOM + reactive update checks against @a2ui/react and @a2ui/react/v0_9.
      8. typescript/renderers/react/a2ui_explorer/karma.conf.cjs and vite.config.ts: Remove the stale @a2ui/react/v0_8 and @a2ui/react/styles aliases.
    3. Clean up external consumers (samples/client/react/shell and tools/composer):

      1. Delete samples/client/react/shell/src/theme/default-theme.ts and remove Theme from samples/client/react/shell/src/configs/types.ts.
      2. Update tools/composer/src/lib/a2ui.tsx (and delete tools/composer/src/lib/viewerTheme.ts) per Option 1A or 1B above so tools/composer no longer imports @a2ui/react/v0_8.
    4. Update documentation and changelog:

      1. typescript/renderers/react/CHANGELOG.md: Record breaking removal of @a2ui/react/v0_8 and @a2ui/react/styles under ## Unreleased.
      2. typescript/renderers/react/README.md: Remove the @a2ui/react/v0_8 note, the ## Legacy Support (v0.8) section (L342-L391), the outdated v0.8 TestWrapper snippet (L441-L457), and ## Visual Parity Testing (L459-L501).
      3. docs/site/src/content/docs/concepts/sdks.mdx, docs/public/guides/client-setup.md, and docs/public/reference/renderers.md: Update @a2ui/react's supported protocol versions to v0.9.1, v1.0 and note that deprecated v0.8 renderer support applies only to Lit and Angular (until [FEATURE]: Delete the Lit v0.8 framework adapter #2952 lands).

    Complexity, risks, and verification strategy

    1. Estimated effort: Medium (mostly deletions, with careful attention to tools/composer, React 17/18 matrix scripts, and yarn.lock / syncpack consistency).
    2. Key risks:
      1. Modifying package.json and yarn.lock triggers ci-renderers, ci-tools, ci-samples, and ci-other in .github/workflows/web_ci.yml, plus yarn lint:deps (syncpack list-mismatches).
      2. A2UI_TEST_DIST=1 in test-react17.sh runs unit tests against dist/ exports; vitest.config.ts aliases must stay matched to dist/index.js and dist/v0_9/index.js.
    3. Local verification commands before opening the PR:
      1. yarn install && yarn lint:deps
      2. yarn workspace @a2ui/react build && yarn workspace @a2ui/react test && yarn workspace @a2ui/react lint && yarn workspace @a2ui/react typecheck
      3. yarn workspace @a2ui/react run test:react17 && yarn workspace @a2ui/react run test:react18
      4. yarn workspace @a2ui/react-shell build && yarn workspace @a2ui/react-shell lint && yarn workspace @a2ui/react-shell test
      5. yarn workspace widget-builder build && yarn workspace widget-builder lint && yarn workspace widget-builder test
      6. node --test scripts/adapter_boundary_allowlist.test.mjs typescript/scripts/publish_npm.test.mjs typescript/scripts/upload_manifest.test.mjs
      7. yarn format:check:all

    I have paused execution so that @jacobsimionato can review this plan. Please re-add the coding-agent-ready tag with any notes when ready.

    🤖 Agent-generated

  3. jacobsimionato commented on Nov 10, 2026

    @jacobsimionato
    CollaboratorAuthor

    Opened #4142 to delete tools/composer and remove all remaining external workspace dependents of @a2ui/react/v0_8 and @a2ui/react/styles (samples/client/react/shell and typescript/renderers/react/a2ui_explorer), keeping @a2ui/react internal v0.8 exports intact until after the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2The team intends to work on this in the near future, or at a lower priority.component: react adapterReact framework adapter

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions