Commit 9d4dfc4
* feat(spec): rule and enforce submitBehavior.url — relative-only, declared-field interpolation, URL-escaped (#7496)
`FormView.submitBehavior: { kind: 'redirect' }`'s `url` was an unconstrained
`z.string()`, so `https://example.com`, `//evil.example`, `javascript:alert(1)`
and `''` all parsed. objectui's `FormPage` redirects verbatim on the value, and
objectui#4190 dead-ended asking what the value may be — nothing in this package
had ruled it.
The maintainer ruled the narrowest shape on 2026-08-11 (#7496); this lands the
spec half, documented AND enforced at the schema door:
1. relative paths only — a single leading `/`, with absolute (any `scheme:`),
protocol-relative `//host`, backslash, whitespace/control, document-relative
and empty forms each refused by their own message, naming the rule and
citing the ruling;
2. interpolation only from declared record fields, spelled
`{{record.field_name}}` (the ADR-0032 §3 dialect, narrowed to the `record.`
root and a flat snake_case segment), URL-escaped when the redirect is built;
3. a verbatim redirect on the resolved relative path is the intended
consumption — so `url` stays a plain string on the parsed output.
Field-EXISTENCE validation is deliberately not here: parse time knows the string
and not the object, so it belongs to the reference-integrity family in
`@objectstack/lint`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJkvhk41XD5vUxg1fpoF6H
* chore(changeset): record the ADR-0087 disposition for the submitBehavior.url narrowing (#7496)
The Check Changeset gate requires a declared-breaking changeset to answer the
ADR-0087 question in writing. Answered `not-required
(no-migration-prescription)`: no key is retired — only the accepted VALUE set
narrows — and the replacement path for an absolute URL is a human decision no
codemod can derive, so a ledger entry would promise a rewrite that cannot exist.
The schema rejection is the upgrade channel, and it is more specific than a
ledger line.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CJkvhk41XD5vUxg1fpoF6H
---------
Co-authored-by: os-zhuang <noreply@anthropic.com>
1 parent 6979157 commit 9d4dfc4
7 files changed
Lines changed: 552 additions & 7 deletions
File tree
- .changeset
- content/docs
- references/ui
- ui
- packages/spec/src/ui
- skills/objectstack-ui
- contracts
- references
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
| 382 | + | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
401 | 426 | | |
402 | 427 | | |
403 | 428 | | |
| |||
0 commit comments