Repository navigation
Description
Merged checkpoint — 20 September 2026
PR #759 merged this issue to WebScene main at 947e9b7726674d4e15b119a184fbc85a0c575457 from focused source 79ebc6473763f209bca77ccd4d3ee0cfde60e3c3. Property, attribute and first-summary state changes now queue one bounded per-element/context toggle task, preserve synchronous reflection/recascade, coalesce first old/final new state, expose oldState/newState, and clear pending records on navigation/realm teardown without requesting frames.
Focused native and WPT sources are committed. Execution was intentionally deferred under the current implementation-throughput directive; related CI is canceled after merge.
Parent epic: #235
Related details work: #739, #755, #757
Scheduling owner: #242
Proven Code OSS gap
Unchanged Code OSS builds completed-response <details>, sets .open, attaches a toggle listener, and closes it from the next requestAnimationFrame to drive the initial collapse animation. Chat find also opens nested disclosure ancestors programmatically.
WebScene currently reflects .open and recascades correctly, but programmatic property/attribute changes do not queue toggle. Summary activation dispatches toggle synchronously instead of using the HTML details toggle-task lifecycle. Code OSS can therefore miss its persisted disclosure state and ARIA/chevron update after the scheduled close.
Focused implementation
- Queue one bounded details-toggle task for
.open,setAttribute,removeAttribute,toggleAttribute, namespaced-null attribute mutations, and first-summary activation. - Coalesce repeated state changes for the same element/context into one task preserving the first old state and final new state.
- Expose
oldState/newStateon the non-bubbling, non-cancelabletoggleevent. - Dispatch after the current script/event/microtask task and retire queued state on navigation/context teardown.
- Preserve synchronous open reflection, selector recascade, layout, transition admission, summary interactive-descendant isolation, and no idle-frame demand.
Gates
- unchanged Code OSS rAF initial-collapse sequence updates the listener state;
- property and all attribute APIs share one task; rapid open/close/open coalesces deterministically;
- listener reentrancy, detach/reinsert, navigation, and teardown are bounded;
- 4,096 programmatic mutations have fixed queue capacity/work and no frame demand;
- focused native and WPT/browser contract sources.
Implement and merge the source slice under the current throughput directive; cumulative package/visual/performance execution remains in #235/#242/#259.
Activity