Skip to content

feat(a2ui): align validation with v0.9 CheckRule spec#97

Merged
blove merged 13 commits into
mainfrom
feat/a2ui-validation
Apr 10, 2026
Merged

feat(a2ui): align validation with v0.9 CheckRule spec#97
blove merged 13 commits into
mainfrom
feat/a2ui-validation

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Apr 10, 2026

Summary

  • Align A2UI validation types with v0.9 spec: replace A2uiCheck with A2uiCheckRule ({ condition: DynamicBoolean, message }) supporting composite conditions via and/or/not
  • Consolidate all 14 built-in functions into a single registry (functions.ts), add array resolution to resolveDynamic(), and replace validateChecks with evaluateCheckRules powered by the recursive resolution engine
  • Pre-compute validationResult in surfaceToSpec() and propagate to all 6 checkable catalog components (TextField, CheckBox, ChoicePicker, Slider, DateTimeInput, Button) with shared A2uiValidationErrorsComponent and CSS custom property theming

Test plan

  • 83 a2ui lib tests passing (types, functions, resolve, validate)
  • 175 chat lib tests passing (surface store, catalog components)
  • Rebased cleanly onto latest main
  • Verify cockpit contact form example renders validation errors correctly
  • Verify CSS custom property theming overrides work

🤖 Generated with Claude Code

blove and others added 13 commits April 10, 2026 09:01
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…stry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Value arrays

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lveDynamic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…idationResult

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… theming

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment Apr 10, 2026 4:03pm

Request Review

@blove blove merged commit 1e0cab1 into main Apr 10, 2026
14 checks passed
@blove blove deleted the feat/a2ui-validation branch April 10, 2026 16:07
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.

1 participant