Update active table editors when external changes arrive #57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/live-edit-updates"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
External updates previously left Save/Cancel drafts showing old untouched values, while native controls could replace invalid text that had never been saved. The shared React table now reconciles drafts with live values in both NG-backed editors and
/atomic-reuse.Untouched fields follow incoming values, including removals. Set edits preserve local additions/removals while incorporating external membership changes. Overlapping scalar edits retain the local draft, show the latest value and require “Use latest” or “Keep my value” before Save. A later external change requires a new choice. Native controls retain invalid input and offer “Use latest” when that field changes externally. Save rechecks the values available to the component.
Related to #54; this does not close that issue. The asynchronous gap between checking and persistence still needs a concurrency-safe persistence operation. This change does not add an engine-level conditional commit or change backend replication guarantees.
Validation: all 336 unit tests, six typechecks, 12 production builds and 22 browser tests for both editors and atomic-reuse passed. New browser coverage delivers external patches through a distinct real NG ORM subscription using the test engine fixture; it does not establish broker/CRDT concurrency guarantees. Coverage includes invalid native input, untouched field updates, overlapping drafts, both resolution choices, a second update after resolution, and failed-save retry. Broker-backed synchronization tests were not rerun.
Screenshots
Captured from this PR branch using local demo data. The NG examples receive updates through a separate real ORM subscription backed by the browser test engine.
Untouched fields update while the draft stays intact
Atomic reuse: an external update changes untouched Count from 1 to 2 immediately; the unsaved Title stays intact.
Overlapping edits require a choice
Atomic reuse: Count is locally 9 and externally 3. The draft is retained, the latest value is shown, and Save is blocked until Use latest or Keep my value is chosen.
After choosing Keep my value and saving
Atomic reuse: choosing Keep my value and then Save persists Title and Count 9. Use latest instead accepts the incoming value into the draft.
Native NG editor: preserve invalid input
Native NG editor: invalid local Quantity 1.5 remains visible when an external update supplies 8. The notice shows 8 and offers Use latest.
Atomic NG editor: the same invalid-input handling
Atomic NG editor: invalid local Quantity 1.5 remains visible when an external update supplies 8. The notice shows 8 and offers Use latest.