From 0a4146d1897f1ead5031ec392403a7e6c52257a7 Mon Sep 17 00:00:00 2001 From: SkyZeroZx <73321943+SkyZeroZx@users.noreply.github.com> Date: Thu, 23 Jul 2026 12:05:15 -0500 Subject: [PATCH] docs: update signal forms skill to match the current implementation (cherry picked from commit 7e39b4aedb386e5e69a8c317987d4efb71f9756d) --- .agent/skills/reference-signal-forms/SKILL.md | 16 ++++++++-------- .../references/integration.md | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.agent/skills/reference-signal-forms/SKILL.md b/.agent/skills/reference-signal-forms/SKILL.md index b373b201174..752f9655f3c 100644 --- a/.agent/skills/reference-signal-forms/SKILL.md +++ b/.agent/skills/reference-signal-forms/SKILL.md @@ -5,7 +5,7 @@ description: Explains the mental model and architecture of the code under `packa # Signal Forms Architecture -The `packages/forms/signals` directory contains an experimental, signal-based forms API for Angular. +The `packages/forms/signals` directory contains the signal-based forms API for Angular. This system differs significantly from the existing Reactive and Template-driven forms. ## Mental Model @@ -36,27 +36,27 @@ The central internal class representing a single field in the form graph. It agg - `structure`: Manages parent/child relationships and signal slicing. - `validationState`: Computes `valid`, `invalid`, `errors` signals. -- `nodeState`: Tracks `touched`, `dirty`, `pristine`. +- `nodeState`: Tracks `touched`, `dirty`, and derived logical state. - `metadataState`: Stores metadata like `min`, `max`, `required`. - `submitState`: Tracks submission status and server errors. -### 2. `ValidationState` (`src/field/validation.ts`) +### 2. `FieldValidationState` (`src/field/validation.ts`) -Manages the complexity of validation: +Implements `ValidationState` and manages the complexity of validation: - **Synchronous Errors**: Derived from schema rules. - **Asynchronous Errors**: Handled via signals, including 'pending' states. - **Tree Errors**: Errors that bubble up or are targeted at specific fields. - **Submission Errors**: Server-side errors injected imperatively via `submit()`. -### 3. `FormField` Directive (`src/directive/form_field_directive.ts`) +### 3. `FormField` Directive (`src/directive/form_field.ts`) The bridge between the `FieldNode` and the DOM. - Selector: `[formField]` - It supports: - **Native Elements**: ``, `