Scope Atomic table rows by table parent and class #59

Merged
michielbdejong merged 2 commits from codex/issue-51-atomic-membership into main 2026-10-19 15:09:35 +02:00

Opening one Atomic table previously showed every loaded row of its Class, including rows belonging to other tables or no table. AtomicTable now opens an Atomic Table resource, reads its existing classtype metadata, and selects host-supplied collection members by both row Class and parent.

New rows receive the selected table as parent. Ordinary field edits preserve parent and Class, and stale saves recheck membership before preparing the draft and again before persistence. The shared React table keeps an active draft visible when its record leaves the collection, reports the missing record, and refuses Save until it returns; Cancel dismisses it. The shared component still has no graph or parent selection logic.

/atomic-reuse demonstrates two tables sharing one Class in one Store, including excluded unparented/wrong-class rows, correctly parented creation, external arrivals, movement between tables, reclassification and deletion. Collection notifications discover unknown arrivals and update both views. Regression coverage preserves NextGraph's graph-plus-class membership without an Atomic parent requirement.

The demo's collection source is explicitly a complete local dataset. Actual Atomic Server collection queries, paging, member fetching and invalidation/refresh remain #45; the adapter contract and Atomic lib collection API handoff are documented. Parent membership does not grant edit permission. These checks validate locally observed membership and do not add a server-side conditional commit (#54).

Validation on the updated branch:

  • 19 focused unit tests for Atomic membership, draft reconciliation and NextGraph graph/class selection.
  • 12 browser tests: all eight Atomic reuse cases plus live-editing regressions in both native and Atomic editors. This includes preserving the latest untouched value when an edited row leaves and returns.
  • Atomic and runtime TypeScript checks.
  • Atomic editor production build.

Closes #51.

Opening one Atomic table previously showed every loaded row of its Class, including rows belonging to other tables or no table. `AtomicTable` now opens an Atomic Table resource, reads its existing `classtype` metadata, and selects host-supplied collection members by both row Class and `parent`. New rows receive the selected table as parent. Ordinary field edits preserve parent and Class, and stale saves recheck membership before preparing the draft and again before persistence. The shared React table keeps an active draft visible when its record leaves the collection, reports the missing record, and refuses Save until it returns; Cancel dismisses it. The shared component still has no graph or parent selection logic. `/atomic-reuse` demonstrates two tables sharing one Class in one Store, including excluded unparented/wrong-class rows, correctly parented creation, external arrivals, movement between tables, reclassification and deletion. Collection notifications discover unknown arrivals and update both views. Regression coverage preserves NextGraph's graph-plus-class membership without an Atomic parent requirement. The demo's collection source is explicitly a complete local dataset. Actual Atomic Server collection queries, paging, member fetching and invalidation/refresh remain #45; the adapter contract and Atomic lib collection API handoff are documented. Parent membership does not grant edit permission. These checks validate locally observed membership and do not add a server-side conditional commit (#54). Validation on the updated branch: - 19 focused unit tests for Atomic membership, draft reconciliation and NextGraph graph/class selection. - 12 browser tests: all eight Atomic reuse cases plus live-editing regressions in both native and Atomic editors. This includes preserving the latest untouched value when an edited row leaves and returns. - Atomic and runtime TypeScript checks. - Atomic editor production build. Closes #51.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ELFA/database-apps!59
No description provided.