LearnNewsExamplesServices
Frontmatter
id18371
titleThe header settle-signal component arm asserts a DOM bracket a fast repartition never shows, so it reds other PRs'' CI
stateClosed
labels
bugaitestingdashboard
assigneesneo-opus-vega
createdAtSep 5, 2026, 8:35 PM
updatedAtSep 5, 2026, 9:26 PM
githubUrlhttps://github.com/neomjs/neo/issues/18371
authorneo-opus-vega
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 5, 2026, 9:26 PM

The header settle-signal component arm asserts a DOM bracket a fast repartition never shows, so it reds other PRs' CI

Closed v13.2.0/archive-v13-2-0-chunk-19 bugaitestingdashboard
neo-opus-vega
neo-opus-vega commented on Sep 5, 2026, 8:35 PM

Context

test/playwright/component/dashboard/DockOverflowSettleSignal.spec.mjs (landed with #18358) installs a MutationObserver on the dock host and, after a tab activation, asserts that its log toContain(true) — that the neo-dashboard-dock-animating class was seen inside the host during the header repartition. On 2026-09-05 the arm redded the components job of an unrelated PR (#18366, job 101334624069) with log=[false,false,false,false]: four class mutations observed in the subtree, none with the signal present. Locally the arm is green; the difference is timing. Reported by @neo-gpt as CI triage; the arm and the signal path are mine.

The Problem

The arm records presence at observer-callback time (root.querySelector('.neo-dashboard-dock-animating')). The signal enters when the overflow plugin arms a measuring pass and leaves when the pass settles; both are class changes the App Worker sends as vdom updates. When the measurement round-trip returns before the worker flushes the entering update, enter and leave coalesce into one DOM update whose net class delta is empty — the class never reaches the DOM, so there is nothing for the observer to see. The four entries were other class mutations of the activation (tab selection classes). The arm therefore asserts a bracket that is observable only when the pass is slow enough, which is exactly the kind of assertion that is green on a developer machine and red on a loaded runner.

The coalesced case is not a product defect: when enter and leave land in one update, whatever header changes the pass made land in that same update, so there is no window in which a pointer could have hit a detached node. The consumer-relevant contract is narrower than the arm states: the signal is absent at rest and at settle, and a click gated on its absence lands.

The Architectural Reality

  • Producer: src/tab/plugin/Overflow.mjs publishes overflowProjectionStart / overflowProjectionIdle; the dock routes them into src/dashboard/dock/projection/MotionSignal.mjs (enter / leave on the header toolbar) from projection/LayoutAdapter.mjs's header toolbar listeners. The unit arms in DockLayoutAdapter.spec.mjs and Overflow.spec.mjs pin the routing and the one-pair semantics deterministically.
  • The component arm is the L3 receipt for #18356 AC-5 on the dock-maximize fixture: it must keep proving the DOM-level property a consumer relies on, not the timing of one pass.
  • MutationObserver with attributeOldValue: true yields the class value before each change, so a class that was added and removed across two updates is provable from the second record's oldValue even when the callback runs after the removal; it still cannot show a change that never reached the DOM.

The Fix

  1. Read presence from the class value each mutation replaced (attributeOldValue: true) as well as from the live DOM, so a bracket spanning two updates is seen even when the callback runs after it closed.
  2. Drop the unconditional toContain(true). Record whether the bracket was observed as a test.info() annotation (dock-signal-observed), so a run's evidence stays visible without failing on pass timing.
  3. Keep the consumer contract asserted: absent at install (rest), absent once the pass settled, and the lock click gated on absence lands and flips the action.
  4. Reword the spec docblock to state that contract and why presence is recorded rather than required; run the arm in a local battery of at least five.

Acceptance Criteria

  • AC-1 — The arm no longer asserts toContain(true); it asserts absence at rest, absence at settle, and that the gated click lands and flips the lock action.
  • AC-2 — The observer reads presence from oldValue as well as the live DOM, and the run records whether the bracket was observed as a dock-signal-observed annotation.
  • AC-3 — Five consecutive local runs of the spec pass (playwright.config.component.mjs, one worker); the run is quoted in the PR.
  • AC-4 — The unit arms pinning the signal routing and the one-pair semantics are unchanged.

Out of Scope

  • Making the product flush the entering update before the measurement round-trip. The coalesced case has no pointer-visible window; forcing a flush would add a main-thread round-trip to every repartition for a bracket nobody can use.

Related

  • #18356 — the ticket that introduced the arm (merged as #18358)
  • #18366 — the PR whose components job it redded

Live latest-open sweep: latest 20 open issues read at 2026-09-05 18:33Z; no equivalent. A2A claim sweep (latest messages, all read-states): the triage note from @neo-gpt (18:27Z) is the sighting, not a claim.

Origin Session ID: 3711ad57-061d-43fb-b1f1-aa9dc21dedda