Context
While exercising the practical Grid/ComboBox workflow for #7224, a source Store stopped publishing record edits after being passed to a ComboBox. The field's filtering remains isolated, but its private view takes the source Model's notification route. This is a follow-up to the shared-store repair in #18839 / PR #18857; its author independently confirmed the source chain.
The Problem
Reproduced at 80c3f48feb with real Store/Model/ComboBox instances under test/playwright/setup.mjs:
- Create a Store with a Model and custom
keyProperty: 'code'; subscribe to recordChange.
- Edit an existing record: the source emits once (control).
- Create
ComboBox({store, displayField: 'name', valueField: 'code'}).
- Edit the existing record, add another record and edit it.
- Destroy the field and edit the source again.
Observed:
{
"before": {"events":["control"],"owner":"neo-store-1"},
"during": {"events":["control"],"owner":"neo-store-2-all","records":2,"view":2},
"after": {"events":["control"],"owner":"neo-store-2-all","ownerExists":false}
}
Record values change, but their source consumers receive no edit notification. Membership propagation still works, so existing count/filter assertions do not detect the defect.
The Architectural Reality
ComboBox#afterSetStore passes model: value.model to a new sourceId Store. Store#afterSetModel assigns that same instance's storeId; RecordFactory#onRecordChange dispatches through it. A Model has one notification owner.
Design authority: ComboBox's store_ JSDoc promises that a passed/bound Store stays its owner's; Store#onRecordChange and the Tables guide identify the owning Store as the publisher of record changes.
Prescription checked: src/form/field/ComboBox.mjs#afterSetStore owns construction of the private picker projection. Repair that consumer; do not redesign general Store ownership.
The Fix
Give the private view an independent instance of the source Model's class, copying its current fields, keyProperty and trackModifiedFields while preserving calculate/convert functions. The field owns this instance and retires it with the view; the source Model remains untouched. Preserve the original record objects through sourceId, filtering isolation, and field-owned teardown.
Omitting model alone is insufficient: an Integer business key with listConfig: {useInternalId: false} then resolves DOM key '7' as a string and misses numeric map key 7; calculated/nested metadata is also lost. Keep schema behavior without transferring the source's Model instance or storeId.
Contract Ledger
| Surface |
Authority |
Restored behavior |
Fallback / docs |
Evidence |
| Passed/bound Store and Model |
ComboBox store_ JSDoc; Store/RecordFactory routing |
Field/view lifecycle never changes the source Model's notification owner |
Existing inline/config-created Store ownership stays unchanged; owning method JSDoc |
Existing and added record edits before/during/after field lifetime |
| Private picker view |
afterSetStore, listStore, Store#getKeyType |
Shared records; independent filters and Model state; retained typed-key and schema behavior |
No new caller configuration |
Numeric business-key, calculated/nested field and swap/multiple-field controls |
Acceptance Criteria
Out of Scope
General automatic Model cloning in Store, new sourceId APIs, broad recordChange fan-out to projections, and the #7224 guide itself. Do not fold the separate #2797 animation feature into this repair.
Avoided Traps
Do not temporarily restore model.storeId after constructing the view: multiple consumers would still fight over one routing slot. Do not remove schema metadata merely to preserve notifications, or replace shared records with copied row objects.
Related
#7224 requires this fix for its edit workflow. Prior repair #18839 / #18857; adjacent #19669 governs filter ownership and excludes general typeahead composition.
Self-owned repair for the currently exercised backlog workflow; Sophie will implement, Ada has offered cross-family review. Contributor-ready labeling is omitted because implementation begins now.
Live latest-open + closed sweep: latest 20 open and closed/all-state searches for “ComboBox model recordChange” and “shared Model storeId” checked 2026-11-05T23:40Z; #18839 and #19669 scope read, no equivalent open leaf found. Own assignment: #2797's PR is in CI, unrelated. Three problem-framed Memory Core queries found Ada's current confirmation and unrelated history; current source/control probe supplies the evidence. Recent all-state A2A scan found no competing claim; Ada confirmed no newer owner.
Decision Record impact: none.
Origin Session ID: 2127005d-d2e7-46c1-a8f5-9e1575bc6fae
Context
While exercising the practical Grid/ComboBox workflow for #7224, a source Store stopped publishing record edits after being passed to a ComboBox. The field's filtering remains isolated, but its private view takes the source Model's notification route. This is a follow-up to the shared-store repair in #18839 / PR #18857; its author independently confirmed the source chain.
The Problem
Reproduced at
80c3f48febwith real Store/Model/ComboBox instances undertest/playwright/setup.mjs:keyProperty: 'code'; subscribe torecordChange.ComboBox({store, displayField: 'name', valueField: 'code'}).Observed:
{ "before": {"events":["control"],"owner":"neo-store-1"}, "during": {"events":["control"],"owner":"neo-store-2-all","records":2,"view":2}, "after": {"events":["control"],"owner":"neo-store-2-all","ownerExists":false} }Record values change, but their source consumers receive no edit notification. Membership propagation still works, so existing count/filter assertions do not detect the defect.
The Architectural Reality
ComboBox#afterSetStorepassesmodel: value.modelto a newsourceIdStore.Store#afterSetModelassigns that same instance'sstoreId;RecordFactory#onRecordChangedispatches through it. A Model has one notification owner.Design authority: ComboBox's
store_JSDoc promises that a passed/bound Store stays its owner's;Store#onRecordChangeand the Tables guide identify the owning Store as the publisher of record changes.Prescription checked:
src/form/field/ComboBox.mjs#afterSetStoreowns construction of the private picker projection. Repair that consumer; do not redesign general Store ownership.The Fix
Give the private view an independent instance of the source Model's class, copying its current fields, keyProperty and trackModifiedFields while preserving calculate/convert functions. The field owns this instance and retires it with the view; the source Model remains untouched. Preserve the original record objects through
sourceId, filtering isolation, and field-owned teardown.Omitting
modelalone is insufficient: an Integer business key withlistConfig: {useInternalId: false}then resolves DOM key'7'as a string and misses numeric map key7; calculated/nested metadata is also lost. Keep schema behavior without transferring the source's Model instance orstoreId.Contract Ledger
store_JSDoc; Store/RecordFactory routingafterSetStore,listStore,Store#getKeyTypeAcceptance Criteria
recordChangeper edit before, during and after field lifetime; source membership still reaches the picker.useInternalId: false, current calculated/nested schema metadata and Model subclass methods remain correct.ComboBoxSharedStore.spec.mjsfail on the current code and pass with the repair; existing ComboBox unit and browser coverage passes.Out of Scope
General automatic Model cloning in Store, new sourceId APIs, broad recordChange fan-out to projections, and the #7224 guide itself. Do not fold the separate #2797 animation feature into this repair.
Avoided Traps
Do not temporarily restore
model.storeIdafter constructing the view: multiple consumers would still fight over one routing slot. Do not remove schema metadata merely to preserve notifications, or replace shared records with copied row objects.Related
#7224 requires this fix for its edit workflow. Prior repair #18839 / #18857; adjacent #19669 governs filter ownership and excludes general typeahead composition.
Self-owned repair for the currently exercised backlog workflow; Sophie will implement, Ada has offered cross-family review. Contributor-ready labeling is omitted because implementation begins now.
Live latest-open + closed sweep: latest 20 open and closed/all-state searches for “ComboBox model recordChange” and “shared Model storeId” checked 2026-11-05T23:40Z; #18839 and #19669 scope read, no equivalent open leaf found. Own assignment: #2797's PR is in CI, unrelated. Three problem-framed Memory Core queries found Ada's current confirmation and unrelated history; current source/control probe supplies the evidence. Recent all-state A2A scan found no competing claim; Ada confirmed no newer owner.
Decision Record impact: none. Origin Session ID: 2127005d-d2e7-46c1-a8f5-9e1575bc6fae