Skip to content

fix(web_core,angular): remove non-spec @path ChildList template fallbacks - #4274

Merged
gspencergoog merged 2 commits into
a2ui-project:mainfrom
gspencergoog:fix/remove-childlist-at-path-fallbacks
Nov 18, 2026
Merged

gspencergoog merged 2 commits into
a2ui-project:mainfrom
gspencergoog:fix/remove-childlist-at-path-fallbacks

Conversation

@gspencergoog

Copy link
Copy Markdown
Collaborator

Summary

Removes non-specification '@path' fallbacks from ChildList template handling in @a2ui/web_core and @a2ui/angular. Also adds v1.0 conformance coverage verifying that ChildList templates require plain "path" and reject "@path".

In protocol v1.0, DataBinding moved to "@path", while ChildList template objects kept plain "path" ({"componentId": "...", "path": "..."} with additionalProperties: false in specification/v1_0/json/common_types.json). Removing these fallbacks aligns TypeScript and Angular runtime binding and reference extraction with the protocol specification and with Dart, Swift, and Python.

Changes

  • Remove '@path' fallback from GenericBinder.bindStructuralTemplate in typescript/core/web_core/src/resolution/generic-binder.ts.
  • Remove '@path' template-shape checks from isTemplateRefObject in typescript/core/web_core/src/resolution/ref-fields.ts, analyzeJsonChildRefProperty in typescript/core/web_core/src/catalog/reference-map.ts, and extractPointers in typescript/core/web_core/src/validation/integrity-checker.ts.
  • Remove '@path' fallback from ComponentBinder.extractNodeTemplate and isChildListTemplateObject in typescript/renderers/angular/src/core/component-binder.service.ts, and document the change in typescript/renderers/angular/CHANGELOG.md.
  • Add test_v10_child_list_is_ids_or_template in conformance/core/common_types.yaml and test_v10_child_list_template_rejects_at_path_error in conformance/core/validator_v1_0.yaml.
  • Update typescript/core/web_core/src/validation/integrity-checker.test.ts and add unit tests in typescript/core/web_core/src/resolution/generic-binder.test.ts and typescript/renderers/angular/src/core/component-binder.service.spec.ts.

Impact & Risks

  • In @a2ui/angular, ComponentBinder.bindNode no longer populates BoundProperty.template from unvalidated {componentId, '@path'} objects (BREAKING CHANGE noted in typescript/renderers/angular/CHANGELOG.md). Standard schema validation already rejected {componentId, '@path'} against specification/v1_0/json/common_types.json.
  • In @a2ui/web_core, the '@path' template fallbacks were added after 0.15.0 and have not been published in a release.

Testing

  • Built, linted, and ran unit and conformance tests in @a2ui/web_core: yarn workspace @a2ui/web_core build && yarn workspace @a2ui/web_core lint && yarn workspace @a2ui/web_core test && node typescript/core/web_core/tests/conformance/conformance_test.mjs.
  • Built, linted, and ran tests in @a2ui/angular: yarn workspace @a2ui/angular build && yarn workspace @a2ui/angular lint && yarn workspace @a2ui/angular test.
  • Verified conformance YAML schema and Python common_types and validator_v1_0 runners via pytest conformance/tests/test_conformance_yaml.py python/a2ui_core/tests/test_conformance.py.
  • Verified formatting and license headers with Prettier and ./scripts/fix_licenses.py --check.

…acks

Remove '@path' fallbacks from ChildList template handling across GenericBinder,
isTemplateRefObject, analyzeJsonChildRefProperty, and Angular's ComponentBinder
so template resolution and reference extraction require plain 'path' as defined
in specification/v1_0/json/common_types.json.

Add v1.0 ChildList template conformance cases in common_types.yaml and
validator_v1_0.yaml rejecting '@path' on template objects.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enforces strict compliance with the v1.0 specification by restricting ChildList template properties to use only the plain path key (e.g., {componentId, path}) and removing support for the non-standard @path key. This breaking change is implemented across schema validation, reference mapping, binder logic, integrity checks, and the Angular renderer, with comprehensive conformance and unit tests added to verify the new behavior. I have no additional feedback to provide as there are no review comments.

@gspencergoog
gspencergoog marked this pull request as ready for review November 17, 2026 18:32

@josemontespg josemontespg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Checked against specification/v1_0/json/common_types.json, the Angular CHANGELOG breaking-change entry, and the unit and conformance tests.

@gspencergoog
gspencergoog merged commit 4610c34 into a2ui-project:main Nov 18, 2026
56 checks passed
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