LearnNewsExamplesServices
Frontmatter
id19404
titleA fieldset's legend changes are lost when a sibling update makes the cycle sparse
stateClosed
labels
bugaicore
assigneesneo-opus-grace
createdAtOct 5, 2026, 1:33 PM
updatedAtOct 5, 2026, 3:12 PM
githubUrlhttps://github.com/neomjs/neo/issues/19404
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 5, 2026, 3:12 PM
milestonev13.2

A fieldset's legend changes are lost when a sibling update makes the cycle sparse

neo-opus-grace
neo-opus-grace commented on Oct 5, 2026, 1:33 PM

Context

#19402 (PR #19403, merged) fixed this class at Component#hide(). Its Out of Scope named three other owners that raise their own updateDepth before changing children, with no claim about them. At dev 05a161bb9f each has the same shape: it changes children silently (setSilent), raises updateDepth = 2 and leaves denseUpdate unset. Measuring found a red at one of them:

  • form/Fieldset#updateLegend() (src/form/Fieldset.mjs:211–242): red, and this ticket's subject.
  • tab/Container#afterSetTabBarPosition() (src/tab/Container.mjs:250–267): no red reachable today, excluded. The trace is under The Fix.
  • calendar/view/calendars/List (src/calendar/view/calendars/List.mjs:63–82, the item builder): unmeasured, and no claim is made.

Fieldset also carries two defects of its own in the empty-legend branch, present since 2021 (c1bbd220dc):

  • It writes legend.vdom.reomveDom (a typo, in both the set and the delete).
  • It never raises the depth, so an emptied legend cannot leave the DOM even with the spelling fixed.

Red on dev (unit, two arms, test/playwright/unit/form/FieldsetLegend.spec.mjs):

  • title = '' with iconClsChecked: '': legend.vdom.removeDom stays undefined and no removeNode is emitted.
  • Two renames in one pass, then a child's own update: no updateVtext reaches the legend's text node, and only the child's textContent (Close) is sent.

Sweeps at 2026-10-05T11:32Z:

  • Live: the latest 20 open neo issues; none equivalent.
  • Search: reomveDom and fieldset legend; no hits.
  • A2A: my #19402 lane.
  • MC: the 2026-01-20 sparse-tree design, read for #19402.
  • Own: #19402 is the sibling; nothing else on this surface.

The Problem

A fieldset's renamed legend keeps its old text, with no error, whenever a child's own update lands in the same cycle. An emptied legend never leaves the DOM at all.

The Architectural Reality

  • For updateDepth !== 1 with merged children, VdomLifecycle#executeVdomUpdate builds a sparse payload (ids = mergedChildIds). TreeBuilder prunes every other child to a {componentId} reference, on the reading that unmerged children are clean.
  • denseUpdate is the documented exception, "the owner changed descendants silently within its updateDepth". grid.View sets it next to its depth bump, and #19403 adds it to hide().
  • Fieldset#updateLegend() changes its legend silently and does not set it.

The Fix

Fieldset updateLegend():

  • Spell removeDom in both places.
  • Raise updateDepth = 2 in the empty branch too, so the removal is carried.
  • Set denseUpdate = true wherever it raises the depth.

Measured since filing, so no change at the other two sites:

  • tab/Container#afterSetTabBarPosition() is not reachable. Its own me.setSilent({cls}) runs first and sets the container's needsVdomUpdate, so the bar's and the strip's silent updates register as merged children (traced: container<-tab-header-toolbar, container<-tab-strip) and are expanded. A card merging at distance 2 leaves the strip correct on dev and with the fix alike. The site is protected by that ordering, not by denseUpdate. A reorder would expose it, but no red exists today, so no line is added.
  • calendar/view/calendars/List is unmeasured, and no claim is made.

Acceptance Criteria

  • The two Fieldset arms (test/playwright/unit/form/FieldsetLegend.spec.mjs), red on dev first: an emptied legend leaves the DOM, and a renamed legend's updateVtext is sent although a child's update merged into the cycle.
  • TabContainer: no red can be built. The reason is under The Fix.
  • npm run test-unit and npm run test-components stay green.

Out of Scope

  • toolbar/Base and the calendar MainContainer raise to depth −1, which TreeBuilder always builds dense, so they are not affected.
  • Making denseUpdate implicit for every owner-raised depth is an engine design change and is not taken here.

Related

Origin Session ID: 90464c20-910b-4abd-ac1d-d86f8fbccb13 Retrieval Hint: query_raw_memories("denseUpdate sparse payload setSilent updateDepth owner")

tobiu referenced in commit 4f68ceb - "fix(form): a fieldset's legend changes reach the DOM (#19404) (#19405) on Oct 5, 2026, 3:12 PM
tobiu closed this issue on Oct 5, 2026, 3:12 PM