Conversation
|
Claude finished @oidacra's task in 1m 23s —— View job PR Review
The fix is correct and minimal. Removing A few things worth a second look:
this.store.setData(this.store.data());This calls
Isolation tests reset TestBed mid-test const injector1 = TestBed.configureTestingModule({ ... });
const store1 = injector1.inject(RelationshipFieldStore);
TestBed.resetTestingModule(); // store1's injector is now torn down
store1.setData(dataA); // called on a destroyed injectorThis works in practice because Cosmetic nit — return `${identifiers}`;Wrapping a string in a template literal adds nothing. Pre-existing, can ignore. Overall: fix is correct, clean, and follows the established pattern. The |
2aaf5f6 to
da85bea
Compare
… prevent shared state The store was declared with providedIn: 'root', creating a singleton shared across all relationship field instances. When multiple relationship fields exist on the same form, each initialization reset the shared state, causing all fields to display the same value. Providing the store at the component level ensures each field instance gets its own isolated store. Closes #34795
Adds three tests proving that separate store instances maintain independent state: setData isolation, initialize isolation, and deleteItem isolation. Addresses PR review feedback requesting automated proof of multi-field independence.
15dd8ba to
1051d79
Compare
… for content type
Summary
RelationshipFieldStorewas declared withprovidedIn: 'root', creating a singleton shared across all relationship field instances on a formDotRelationshipFieldComponent'sprovidersarray so each field instance gets its own isolated storeFileFieldStoreandCategoryFieldStorein the codebaseCloses #34795
Changes
core-web/.../store/relationship-field.store.ts{ providedIn: 'root' }fromsignalStore()configcore-web/.../dot-relationship-field.component.tsRelationshipFieldStoreto componentprovidersarraycore-web/.../dot-edit-content-relationship-field.component.spec.tsAcceptance Criteria
Test Plan
Visual Changes
CleanShot.2026-03-17.at.14.47.49.mp4
Notes
dot-edit-content-relationship-field.component.spec.ts) remainsxdescribe(skipped) due to a pre-existing test setup issue (ɵcmpresolution error) unrelated to this fixrelationship-field.store.spec.ts) pass — 100 suites, 1639 testsspectator.query(DotRelationshipFieldComponent).storeinstead ofspectator.inject(RelationshipFieldStore, true)since the store is now component-scopedThis PR fixes: #34795