Context
#18731's three arms were reddened by three causes. The clamp is fixed, the teardown class is fixed by #18743, and @neo-opus-ada attributed the third: tab/plugin/Overflow#onOwnerMounted registers seven listeners — activeIndexChange, insert, remove, actionsChange, actionGeometryChange, actionVisibilityChange, moveTo — and the measured errors are those seven kinds, name for name, once per remount. Nothing un-registers them.
This leaf exists because the repair is in src/plugin/Base.mjs, not in #18731's dock surface, and because #18731 cannot close on it: that ticket's AC-2 and AC-4 are Neural-Link arms needing re-measurement after this lands.
Live sweeps 2026-09-15T16:5xZ: no equivalent open; #18741 and #18743 cover the teardown class, not this.
The Problem
src/plugin/Base.mjs answers the same question twice and answers it differently:
owner.on('constructed', () => { me.onOwnerConstructed() }, me, {once: true})
owner.on('mounted', me.onOwnerMounted, me) The contract is not "repeatable" — it is a coin flip on construction order. Each half has an already-true fast path:
if (owner.mounted) { me.onOwnerMounted() }
else { owner.on('mounted', …) } So a plugin constructed after its owner mounted never re-runs, and one constructed before re-runs forever. There is no designed re-apply behaviour to preserve — which is what decides the fix direction.
Both overrides in the tree are written as one-time setup, which corroborates it: Overflow registers listeners, list/plugin/Animate adds a resize observer and reads geometry.
Tear-out and popup-over-popup remount constantly, which is why #18731's specs surface this and ordinary specs do not.
The Fix
{once: true} on the mounted subscription, matching constructed six lines above.
The base rather than the overrides: idempotency would fix one override, would have to be written twice today, and leaves the trap for every future one. The asymmetry lives in the base.
Acceptance Criteria
Out of Scope
- Closing
#18731. Its AC-2/AC-4 are Neural-Link arms that need re-running after this lands; this leaf removes their last known cause and nothing more.
- Un-registering
Overflow's seven listeners on unmount. With the subscription bounded they are registered once, so there is nothing to de-duplicate; a teardown-time un() is a different question about plugin lifetime.
- The
owner.mounted fast paths themselves. They are now consistent with the subscriptions; collapsing the four branches into two is a readability change with its own blast radius.
Avoided Traps
- Do not make the override idempotent instead. It fixes one call site, is already needed twice, and the next override inherits the trap.
- Do not assume
{once: true} strands Animate. Measured: ResizeObserver.register de-dupes by componentId and observe() is a no-op on a known node, and addResizeObserver(false) runs only from destroy() — so the observer survives a remount. I asserted the opposite to a peer before checking; the check is one read of src/main/addon/ResizeObserver.mjs:361.
- Do not read the two already-green arms as filler. They are the evidence that the after-mount branch already answered once, which is the whole argument for why this removes no guarantee.
Decision Record impact
none.
Related
#18731 (the ticket whose arms this reds) · #18743 / #18741 (the teardown class, the second cause) · #18554
Origin Session ID: 148d12cc-9777-46e4-bfb9-a422479153a5
Retrieval Hint: query_raw_memories("plugin Base mounted unbounded constructed once coin flip construction order")
Context
#18731's three arms were reddened by three causes. The clamp is fixed, the teardown class is fixed by #18743, and @neo-opus-ada attributed the third:tab/plugin/Overflow#onOwnerMountedregisters seven listeners —activeIndexChange,insert,remove,actionsChange,actionGeometryChange,actionVisibilityChange,moveTo— and the measured errors are those seven kinds, name for name, once per remount. Nothing un-registers them.This leaf exists because the repair is in
src/plugin/Base.mjs, not in#18731's dock surface, and because#18731cannot close on it: that ticket's AC-2 and AC-4 are Neural-Link arms needing re-measurement after this lands.Live sweeps 2026-09-15T16:5xZ: no equivalent open;
#18741and#18743cover the teardown class, not this.The Problem
src/plugin/Base.mjsanswers the same question twice and answers it differently:owner.on('constructed', () => { me.onOwnerConstructed() }, me, {once: true}) // bounded owner.on('mounted', me.onOwnerMounted, me) // NOT boundedThe contract is not "repeatable" — it is a coin flip on construction order. Each half has an already-true fast path:
if (owner.mounted) { me.onOwnerMounted() } // built AFTER the mount → runs once, NO subscription else { owner.on('mounted', …) } // built BEFORE → re-enters on EVERY remountSo a plugin constructed after its owner mounted never re-runs, and one constructed before re-runs forever. There is no designed re-apply behaviour to preserve — which is what decides the fix direction.
Both overrides in the tree are written as one-time setup, which corroborates it:
Overflowregisters listeners,list/plugin/Animateadds a resize observer and reads geometry.Tear-out and popup-over-popup remount constantly, which is why
#18731's specs surface this and ordinary specs do not.The Fix
{once: true}on themountedsubscription, matchingconstructedsix lines above.The base rather than the overrides: idempotency would fix one override, would have to be written twice today, and leaves the trap for every future one. The asymmetry lives in the base.
Acceptance Criteria
onOwnerMountedonce across a mount → unmount → mount cycle. Red before the change.onOwnerConstructedstays bounded; this must not widen the other half.list/plugin/Animateis checked, not assumed: its observer must survive a remount under the new contract, or the fix strands it.Out of Scope
#18731. Its AC-2/AC-4 are Neural-Link arms that need re-running after this lands; this leaf removes their last known cause and nothing more.Overflow's seven listeners on unmount. With the subscription bounded they are registered once, so there is nothing to de-duplicate; a teardown-timeun()is a different question about plugin lifetime.owner.mountedfast paths themselves. They are now consistent with the subscriptions; collapsing the four branches into two is a readability change with its own blast radius.Avoided Traps
{once: true}strandsAnimate. Measured:ResizeObserver.registerde-dupes bycomponentIdandobserve()is a no-op on a known node, andaddResizeObserver(false)runs only fromdestroy()— so the observer survives a remount. I asserted the opposite to a peer before checking; the check is one read ofsrc/main/addon/ResizeObserver.mjs:361.Decision Record impact
none.
Related
#18731(the ticket whose arms this reds) · #18743 /#18741(the teardown class, the second cause) ·#18554Origin Session ID: 148d12cc-9777-46e4-bfb9-a422479153a5
Retrieval Hint:
query_raw_memories("plugin Base mounted unbounded constructed once coin flip construction order")