Context
@neo-opus-vega found this in her review of PR #18857 (review 5249967127, non-blocking), reading the source. I measured it. #18839 / PR #18857 stops form.field.ComboBox from destroying a store it did not build. Its subclass form.field.Chip still destroys one.
The Problem
Measured on the unit tier at PR #18857's head 4ef5dca5c1. A field is destroyed, and the question is what happens to its store:
| Field |
Store handed as an instance |
Store built from a config |
ComboBox |
survives |
destroyed with the field |
Chip |
destroyed |
destroyed with the field |
So a Chip given an app-level store, by instance or through a bind, takes that store down for every other reader when it goes. That is the #18839 defect, one class down.
The Architectural Reality
src/form/field/Chip.mjs destroy() ends with super.destroy(...args); !store?.isDestroyed && store?.destroy(). There is no ownership check, although its @summary says the shared store "survives until ComboBox teardown".
- With PR #18857,
ComboBox#destroy() already destroys exactly the stores it built. #owned holds a store made in beforeSetStore from a config or an array. Chip#beforeSetStore returns what super returns, so a store a Chip built itself is in that set too.
- The line is therefore redundant for an owned store and destroys a handed one.
The Fix
- Delete the line, and make
destroy()'s @summary say what the field tears down.
- Add unit arms beside #18839's:
- a Chip handed a store instance leaves it alive;
- a Chip that built its store from a config takes it down, the control against a leak.
Measured with the line deleted at 4ef5dca5c1: both arms green, both ComboBox controls green, unit/form/field/Chip.spec.mjs 14/14.
Acceptance Criteria
Out of Scope
ComboBox itself, which is #18839.
Avoided Traps
- A protected
ownsStore() accessor on ComboBox for Chip to call, which the review suggested as one route. It is not needed: ComboBox's own teardown already destroys what it owns, so Chip has no second destroy left to guard.
Related
#18839 · PR #18857 · #17312 (Chip as a multi-select over list.Chip)
Blocked by #18839: the ownership this relies on lands with PR #18857.
Live latest-open sweep: latest 20 open issues at 2026-09-18T16:16Z, plus an all-state search for "Chip store destroy": no equivalent. The nearest is #18839 itself. A2A sweep (latest 10, all read-states): no claim on Chip. Own open assignments: none on Chip.
Origin Session ID: 6ed6621f-e2e4-4b9d-9a95-744679cb3c59
Retrieval Hint: "Chip destroy shared store ownership ComboBox owned"
Context
@neo-opus-vega found this in her review of PR #18857 (review 5249967127, non-blocking), reading the source. I measured it. #18839 / PR #18857 stops
form.field.ComboBoxfrom destroying a store it did not build. Its subclassform.field.Chipstill destroys one.The Problem
Measured on the unit tier at PR #18857's head
4ef5dca5c1. A field is destroyed, and the question is what happens to its store:ComboBoxChipSo a Chip given an app-level store, by instance or through a
bind, takes that store down for every other reader when it goes. That is the #18839 defect, one class down.The Architectural Reality
src/form/field/Chip.mjsdestroy()ends withsuper.destroy(...args); !store?.isDestroyed && store?.destroy(). There is no ownership check, although its@summarysays the shared store "survives until ComboBox teardown".ComboBox#destroy()already destroys exactly the stores it built.#ownedholds a store made inbeforeSetStorefrom a config or an array.Chip#beforeSetStorereturns whatsuperreturns, so a store a Chip built itself is in that set too.The Fix
destroy()'s@summarysay what the field tears down.Measured with the line deleted at
4ef5dca5c1: both arms green, both ComboBox controls green,unit/form/field/Chip.spec.mjs14/14.Acceptance Criteria
Chip.spec.mjsand #18839's shared-store arms stay green.Out of Scope
ComboBoxitself, which is #18839.Avoided Traps
ownsStore()accessor on ComboBox for Chip to call, which the review suggested as one route. It is not needed: ComboBox's own teardown already destroys what it owns, so Chip has no second destroy left to guard.Related
#18839 · PR #18857 · #17312 (Chip as a multi-select over
list.Chip)Blocked by #18839: the ownership this relies on lands with PR #18857.
Live latest-open sweep: latest 20 open issues at 2026-09-18T16:16Z, plus an all-state search for "Chip store destroy": no equivalent. The nearest is #18839 itself. A2A sweep (latest 10, all read-states): no claim on Chip. Own open assignments: none on Chip.
Origin Session ID: 6ed6621f-e2e4-4b9d-9a95-744679cb3c59
Retrieval Hint: "Chip destroy shared store ownership ComboBox owned"