Skip to content

Unknown-shape field mode recipe (ADR 056, #74) - #169

Merged
timkindberg merged 1 commit into
mainfrom
feat/74-field-mode-recipe
Sep 3, 2026
Merged

Unknown-shape field mode recipe (ADR 056, #74)#169
timkindberg merged 1 commit into
mainfrom
feat/74-field-mode-recipe

Conversation

@timkindberg

Copy link
Copy Markdown
Owner

Summary

FormFrame does not evaluate rule_schema. Hosts fold into hidden / required / readOnly plus setValues. I think that's the right seam after the #164 spike; a Core runner would just be a third engine.

Copyable recipe is createFieldMode + createAjvValidator(schema, { fieldMode }). Same function drives the gallery field UI and AJV. Schema compiles once. Hidden paths get omitted on a clone, not pushed onto schema.required.

Claude helped with the matcher grind and caught a copy-per-hidden-path blowup (~100x AJV) that we fixed by deleting on the clone.

Layout (SchemaFields layout / ADRs 053–055) is still on the spike branch. Not this PR.

Related to #74 (already closed). Precursor #164. First real consumer is #167.

Test plan

  • npm run gate locally
  • Gallery: Recipe · unknown-shape field mode — driver no hides/clears extra notes; yes requires notes+email and stamps comment read-only
  • npm test -w packages/react -- fieldMode (fold, AJV, gallery, 200-field stress, in-memory render counts)

Made with Cursor

FormFrame does not evaluate rule_schema. Hosts fold into hidden / required /
readOnly plus setValues; AJV compiles once and projects data and errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
@timkindberg
timkindberg merged commit 8c56920 into main Sep 3, 2026
2 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.

1 participant