Skip to content

fix(Form,Range): omit method on nested forms, emit a number for one thumb - #509

Merged
IgorShevchik merged 2 commits into
mainfrom
sync/nuxt-a494a97d
Aug 29, 2026
Merged

fix(Form,Range): omit method on nested forms, emit a number for one thumb#509
IgorShevchik merged 2 commits into
mainfrom
sync/nuxt-a494a97d

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Linked issue

Sync with nuxt/ui@v4 — three contiguous commits (§6 4b): a494a97d (nuxt/ui#6888) · 3d2de0ce (nuxt/ui#6890) · ae243116 (nuxt/ui#6883, skipped). After this the cursor is at upstream HEAD.

Type of change

  • Bug fix (a non-breaking change that fixes an issue)

Description

a494a97dmethod on a nested form

Our root element already renders as a div when nested (:is="parentBus ? 'div' : 'form'"), because a form inside a form is invalid HTML, and :name was already conditional on the same flag. But method="post" was left unconditional, so a nested form emitted <div method="post"> — a form attribute on an element that is not a form.

Upstream's fix is exactly the line we were missing:

-    method="post"
+    :method="parentBus ? undefined : 'post'"

Applies verbatim — same pre-image, and nothing on the line involves ui/b24ui.

3d2de0ce — a single thumb emitted an array, twice

Upstream's Slider is this fork's Range (§1); third commit in that family after #431 and #466.

Passing emits to useForwardProps forwarded SliderRoot's own update:modelValue straight through, in addition to the one the component derives from its defineModel. Two consequences: the event fired twice, and the forwarded copy carried Reka's raw payload — an array — so a single-thumb Range emitted [71] where the caller passed and expects 71.

Our Range.vue:74 carried the identical emits argument, and Range.spec.ts carried the identical pre-image expectation — { 'update:modelValue': [[1], [1]] }, the doubled emit written down as though it were correct.

ae243116 — skipped

Replaces upstream's hand-rolled agent-discovery surface with a nuxt-agent-discovery module, deleting its own .well-known, raw/*, sitemap.*, markdown-negotiation and error-handling implementation — 33 files, +474/−1914.

It refactors infrastructure this fork deliberately does not have: 9ef3ee39, the commit that built that surface, is recorded one entry earlier as a skip on maintainer decision, so a refactor of code we never took has nothing to apply to. Taking it would also delete working code written on purpose — the two .well-known routes it removes are the ones this fork added in #492, and our raw/* and sitemap.* routes are in use (raw/**.md is what the skills reference links to; both sitemaps are prerendered into the static build).

Adopting the module stays a live option, but that is a decision about our own architecture rather than a port.

Verification

Mutation-checked, not assumed. Upstream's two new emits cases plus the corrected expectation were ported and adapted to Range; restoring the emits argument with the tests kept turns all six red — the corrected case and both new ones, across the nuxt and vue projects.

The Form fix moves no snapshot: Form.spec.ts does not render a nested form, so the attribute change is not witnessed by the suite. Stated rather than glossed over — it is correct by inspection of the template, not by a test that would have caught it.

Gate with CI=true: lint · typecheck · test (7472 passed, 6 skipped, 318 files) · docs:generate (1264 routes).

One thing found along the way, not fixed here: pnpm build currently fails on main with 12 TS2883 errors in runtime/plugins/{colors,platform,ui-version}.ts — verified by stashing this branch's changes and building clean main, which fails identically. CI does not run build (it runs dev:prepare, lint, typecheck, test:coverage, test:module), which is why it went unnoticed. Unrelated to this port and left alone rather than folded into a sync PR.

Ledger: cursor → ae243116, three entries with their .sync/log/ journals, parity snapshot refreshed (zero package differences).

Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Generated by Claude Code

claude added 2 commits August 29, 2026 04:38
…humb

Ports two upstream fixes, contiguous in `v4`: `a494a97d` (nuxt/ui #6888) and
`3d2de0ce` (nuxt/ui #6890).

**`Form` — `method` on a nested form.** Our root element already renders as a
`div` when nested (`:is="parentBus ? 'div' : 'form'"`), and `:name` was already
conditional on the same flag — but `method="post"` was left unconditional, so a
nested form emitted `<div method="post">`. Upstream's fix is the line we were
missing: `:method="parentBus ? undefined : 'post'"`.

**`Range` — a single thumb emitted an array, twice.** Upstream's `Slider` is
this fork's `Range` (§1). `useForwardProps` was handed `emits`, so `SliderRoot`'s
own `update:modelValue` was re-emitted alongside the one the component derives —
`[[1], [1]]` in our own test, and an array rather than a number for a single
thumb. Dropping the `emits` argument leaves the component's `defineModel`
handling as the only emitter.

Ported upstream's two new emits cases and the corrected expectation, adapted to
`Range`. Mutation-checked rather than assumed: restoring the `emits` argument
with the tests kept turns **all six** red across both projects.

Verified with `CI=true`: `lint` · `typecheck` · `test` (7472 passed, 6 skipped,
318 files) · `docs:generate` (1264 routes).

Ledger: cursor → `3d2de0ce`, two entries.
Advances the cursor past `ae243116` (nuxt/ui #6883) and adds the journals for
this run's three commits.

`ae243116` replaces upstream's hand-rolled agent-discovery surface with a
`nuxt-agent-discovery` module, deleting its own `.well-known`, `raw/*`,
`sitemap.*`, markdown-negotiation and error-handling implementation in the
process — 33 files, +474/−1914.

Skipped: it refactors infrastructure this fork deliberately does not have.
`9ef3ee39`, the commit that built that surface, is recorded one entry earlier as
a skip on maintainer decision, so a refactor of code we never took has nothing to
apply to. Taking it would also delete working code written on purpose — the two
`.well-known` routes it removes are the ones this fork **added** in #492, and our
`raw/*` and `sitemap.*` routes are in use: `raw/**.md` is what the skills
reference links to, and both sitemaps are prerendered into the static build.

Adopting the module stays a live option, but that is a decision about our own
architecture rather than a port.

Ledger: cursor → `ae243116` (upstream HEAD), parity snapshot refreshed.
@IgorShevchik
IgorShevchik merged commit 7203420 into main Aug 29, 2026
2 checks passed
@IgorShevchik
IgorShevchik deleted the sync/nuxt-a494a97d branch August 29, 2026 04:53
IgorShevchik pushed a commit that referenced this pull request Aug 29, 2026
`a494a97d`, `3d2de0ce` and `ae243116` were written while their port was
still open, so all three carried `pending-merge` in both `pr` and
`b24ui_sha`. #509 squash-merged as `7203420b`; this points them at it.

Bookkeeping only — no ledger entry is added, the cursor does not move,
and no decision changes.
IgorShevchik added a commit that referenced this pull request Aug 29, 2026
…511)

`a494a97d`, `3d2de0ce` and `ae243116` were written while their port was still
open, so all three carried `pending-merge` in both `pr` and `b24ui_sha`. #509
squash-merged as `7203420b`; this points them at it.

Bookkeeping only — no ledger entry is added, the cursor does not move, and no
decision changes.
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.

2 participants