Repository navigation
feat(forms,store,form-records): name off-page field errors; clear optional fields on edit; per-user list page (#739, #738) - #743
Merged
Conversation
A 422 whose error map held a key the page does not render (a crafted POST
with an undeclared field, or a declared field outside an only() handle)
showed only "Correct the highlighted fields.", with nothing highlighted.
The shared page renderer now lists such errors in the page alert: a
declared field the page does not render by its label ("Name cannot be
changed on this form."), and any undeclared key as the fixed "This form
received a field it does not accept.", never echoing the key or a
submitted value. It applies to forms-served flows and exported flows,
including form-records' create and edit pages.
Admission's error map now has no prototype, so an undeclared field named
__proto__ is refused like any other instead of being silently dropped.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
…al per-user list page (#738) Store: a partial update may set an optional field to null to remove it, through both the JSON API's PATCH and the records export's update. null for a required field is 400 invalid_record with "is required and cannot be cleared" (an increment field is refused too); ownership, If-Match/412 and validation of the other fields apply as before, and PUT is unchanged. null was previously refused as the wrong type, so no accepted request changes meaning. The records export gains list(principal, {limit, cursor}): one page of the principal's scope in creation order with total and next/previous cursors, capped at the collection's pageSize. form-records: an editable field emptied on the edit page is sent as null and removed from the record (previously saved as empty text, or refused for a number); a required collection field refuses the clear with a 422 field error. A record flow may declare list: {title?, columns}; exactly <mount>/ then lists the caller's own records, 20 per page at most, with View/Edit links and Previous/Next page links from the store's cursors, every value escaped and served no-store. Columns must be form fields (checked at activation). Without list nothing changes. form-records now requires ui, which renders the list page, and declares it an optional peer. Docs: docs/STORE.md (clearing a field, the export's list), store and form-records README/CHANGELOG/SECURITY/llms.txt, FRAMEWORK.md, EXTENSIONS.md, regenerated urlcode.json and llms-full.txt. The store's packed-size budget rises from 40 to 42 KiB (42040 bytes measured). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and change
__proto__field was previously dropped silently and the submission accepted; it now gets 422 like any undeclared field.PATCHandStoreRecords.updateacceptnullto remove an optional field.nullon a required field gives 400invalid_record("is required and cannot be cleared"), andnullon anincrementsfield is refused too.nullwas previously always a 400, so no request that used to succeed changes meaning.StoreRecords.list(principal, {limit?, cursor?})returns{items, total, next?, previous?}, scoped to the principal. Export contract v1 is unchanged; this only adds a method.list: {title?, columns}adds a per-user list page at the exact path<mount>/(GET/HEAD).?cursor=. Values are escaped and the page is servedno-store.list: behaviour is exactly as before.requiresuias well (for the list page).uiis an optional peer inpackage.json;npm install --package-lock-onlyreproduces the committed lockfile./^\d{1,9}$/. The lineartrimTrailingSlashes()from feat(form-records): new add-on saving a declared form into an owned store collection, with typed forms/store exports (#529) #740 is kept.Verification
Run on Node v26.10.0 on this branch (latest
main+ these two commits):npm run verify: exit 0. Root 876 tests; workspaces 34, 97, 240, 35 (forms), 68 (store) and 66; form-records 17;test:addons4. All 0 failures, includingbuild-addon-manifest --checkandaudit:packages.npm run test:package: exit 0 (704181 packed, 2867347 unpacked bytes).build:addonsanddocs:llmsproduced no further changes.__proto__, and exportedonly()handles.null(clear, 412, required, increments, undeclared, PUT unchanged); records export clear andlist(ownership, pagination,pageSizecap, 401, bad cursor).Compatibility and security
Additive:
nullin PATCH was previously always rejected.form-records
requiresui: projects installing form-records now also need ui. The CLI installs required add-ons together.Not an independent security review.
Changes match the documented portable contract; docs/examples are updated where needed.
Relevant tests and package checks pass, or limitations are explained above.
No credentials, customer data or private project material are included.
Runtime/starter changes remain aligned where applicable.
🤖 Generated with Claude Code
https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
Generated by Claude Code