Refresh Atomic schemas while preserving open drafts #60

Merged
michielbdejong merged 1 commit from codex/issue-55-schema-refresh into main 2026-10-19 16:02:46 +02:00

External Class and Property edits left /atomic-reuse with stale columns and validation. AtomicTable now subscribes to its Table, Class and referenced Properties, rebinds dependencies when fields change, and releases its subscriptions on cleanup. Existing view validators, save callbacks and creation use the current schema, including a final check after asynchronous setters and before persistence.

Compatible schema edits retain drafts by row and Property ID, including raw numeric input and existing values on newly referenced fields. Removed fields and incompatible editor types retain their original controls and block Save with recovery instructions. Missing or unsupported definitions keep the last usable layout visible with an actionable error and recover after repair. Unsupported Class constraints and datatypes remain rejected.

The demo's Add text column action now uses ordinary Store updates without rebuilding adapters. External schema controls exercise labels, requiredness, field removal and datatype changes. This builds on the merged membership and live-edit fixes: parent/Class checks, retained missing rows and external-row conflict choices remain intact. Regression coverage includes subscription cleanup, missing/restored definitions, stale callbacks, schema changes during save preparation, and combined live-row/schema edits.

Validation:

  • 355 unit tests: vitest run --maxWorkers=1 --testTimeout=15000.
  • 30 distinct browser cases across Atomic, native and template table hosts: 29 combined cases plus the added row/schema interaction regression; the final Atomic reuse and live-editing run passed all 14 cases.
  • TypeScript checks for tsconfig.atomic.json and tsconfig.runtime.json.
  • Production build of db-table-editor-atomic.

This uses locally observed schema definitions; Atomic Server transport and server-side conditional commits remain separate work.

Closes #55.

External Class and Property edits left `/atomic-reuse` with stale columns and validation. `AtomicTable` now subscribes to its Table, Class and referenced Properties, rebinds dependencies when fields change, and releases its subscriptions on cleanup. Existing view validators, save callbacks and creation use the current schema, including a final check after asynchronous setters and before persistence. Compatible schema edits retain drafts by row and Property ID, including raw numeric input and existing values on newly referenced fields. Removed fields and incompatible editor types retain their original controls and block Save with recovery instructions. Missing or unsupported definitions keep the last usable layout visible with an actionable error and recover after repair. Unsupported Class constraints and datatypes remain rejected. The demo's Add text column action now uses ordinary Store updates without rebuilding adapters. External schema controls exercise labels, requiredness, field removal and datatype changes. This builds on the merged membership and live-edit fixes: parent/Class checks, retained missing rows and external-row conflict choices remain intact. Regression coverage includes subscription cleanup, missing/restored definitions, stale callbacks, schema changes during save preparation, and combined live-row/schema edits. Validation: - 355 unit tests: `vitest run --maxWorkers=1 --testTimeout=15000`. - 30 distinct browser cases across Atomic, native and template table hosts: 29 combined cases plus the added row/schema interaction regression; the final Atomic reuse and live-editing run passed all 14 cases. - TypeScript checks for `tsconfig.atomic.json` and `tsconfig.runtime.json`. - Production build of `db-table-editor-atomic`. This uses locally observed schema definitions; Atomic Server transport and server-side conditional commits remain separate work. Closes #55.
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!60
No description provided.