Context
@neo-opus-vega spotted this by reading, as the twin of the cellEditing race @neo-gpt-emmy found in #18964, fixed by #18967. I measured it on 2026-09-19 at dev@4802862b73.
The Problem
component.Base#afterSetResponsive checks getPlugin('responsive'), then awaits the plugin's import(), then appends a plugin config. Two responsive values set before that import settles both pass the check, so both continuations append.
Measured with a unit probe that shadows the instance's plugins config, so no plugin is built and only admission counts. responsive = {small: {cls: ['a']}} followed in the same tick by responsive = {small: {cls: ['b']}} assigns plugins twice, and the last assignment carries two Responsive entries. Each of those plugins wires its own viewport resize listener and applies the owner's responsive config on every resize. Measured again with real plugin instances: neo-plugin-responsive-1 and -2.
Found while fixing it: a component that turns responsive off throws on its next resize. The plugin stays when responsive becomes null. Its onResize then runs Object.entries(null): Cannot convert undefined or null to object, measured by calling onResize with a landscape rect after responsive = null. The premise below, one plugin serving every later value, holds only once null is a value that plugin serves too, so it is fixed here.
The Architectural Reality
src/component/Base.mjs#afterSetResponsive: the lookup runs before await me.trap(import('../../src/plugin/Responsive.mjs')).
src/plugin/Responsive.mjs#onResize reads owner.responsive live, so one plugin serves every later value, and the plugin takes no value at creation. It is the plugin's only reader of responsive.
- #18967 settled the same shape in
grid.Container#afterSetCellEditing by deciding admission once the import settles. A lookup made before the import cannot reserve the slot.
The Fix
Decide admission once the import settles: after the await, a continuation that finds a Responsive plugin already present returns without appending. onResize returns early while responsive is off, so the plugin idles until the next value arrives.
Acceptance Criteria
Out of Scope
- Turning
responsive off does not remove the plugin; it idles. Removing it would be a separate decision.
- Other
afterSet* hooks that import a plugin: a sweep of getPlugin + import in afterSet bodies belongs to a separate census if one is wanted.
Related
#18964 / #18967 (the grid twin, and the pattern this follows).
Live latest-open sweep: the latest 20 open issues at 2026-09-19T15:12Z, plus an all-state search for afterSetResponsive / "responsive plugin": only #5638 and #5649, both closed and unrelated (Portal responsive behaviour).
Origin Session ID: 6ecb7b5f-dc26-48a3-8e49-7232159377c1
Retrieval Hint: "afterSetResponsive duplicate Responsive plugin admission race import settles getPlugin"
Context
@neo-opus-vega spotted this by reading, as the twin of the
cellEditingrace @neo-gpt-emmy found in #18964, fixed by #18967. I measured it on 2026-09-19 atdev@4802862b73.The Problem
component.Base#afterSetResponsivechecksgetPlugin('responsive'), then awaits the plugin'simport(), then appends a plugin config. Tworesponsivevalues set before that import settles both pass the check, so both continuations append.Measured with a unit probe that shadows the instance's
pluginsconfig, so no plugin is built and only admission counts.responsive = {small: {cls: ['a']}}followed in the same tick byresponsive = {small: {cls: ['b']}}assignspluginstwice, and the last assignment carries two Responsive entries. Each of those plugins wires its own viewport resize listener and applies the owner'sresponsiveconfig on every resize. Measured again with real plugin instances:neo-plugin-responsive-1and-2.Found while fixing it: a component that turns
responsiveoff throws on its next resize. The plugin stays whenresponsivebecomesnull. ItsonResizethen runsObject.entries(null):Cannot convert undefined or null to object, measured by callingonResizewith a landscape rect afterresponsive = null. The premise below, one plugin serving every later value, holds only oncenullis a value that plugin serves too, so it is fixed here.The Architectural Reality
src/component/Base.mjs#afterSetResponsive: the lookup runs beforeawait me.trap(import('../../src/plugin/Responsive.mjs')).src/plugin/Responsive.mjs#onResizereadsowner.responsivelive, so one plugin serves every later value, and the plugin takes no value at creation. It is the plugin's only reader ofresponsive.grid.Container#afterSetCellEditingby deciding admission once the import settles. A lookup made before the import cannot reserve the slot.The Fix
Decide admission once the import settles: after the
await, a continuation that finds a Responsive plugin already present returns without appending.onResizereturns early whileresponsiveis off, so the plugin idles until the next value arrives.Acceptance Criteria
responsivevalues set in one tick leave the component with one Responsive plugin. The arm is red ondev.responsiveturned off, a resize does not throw, and the next value is applied by the same plugin.getPlugin()is what they exercise, with the plugin's viewport wiring given a stand-in. They do not use the admission-count probe above, which cannot seegetPlugin().Out of Scope
responsiveoff does not remove the plugin; it idles. Removing it would be a separate decision.afterSet*hooks that import a plugin: a sweep ofgetPlugin+importinafterSetbodies belongs to a separate census if one is wanted.Related
#18964 / #18967 (the grid twin, and the pattern this follows).
Live latest-open sweep: the latest 20 open issues at 2026-09-19T15:12Z, plus an all-state search for
afterSetResponsive/ "responsive plugin": only #5638 and #5649, both closed and unrelated (Portal responsive behaviour).Origin Session ID: 6ecb7b5f-dc26-48a3-8e49-7232159377c1 Retrieval Hint: "afterSetResponsive duplicate Responsive plugin admission race import settles getPlugin"