Use string position keys for shopping list ordering #33

Merged
michielbdejong merged 3 commits from improve-shopping-list-ordering into main 2026-10-12 16:38:21 +02:00

Dragging a shopping item previously rewrote every item's integer position. The app now uses position-strings to allocate a fresh variable-length key between destination neighbors and updates only the moved subject, using fixed code-unit comparisons.

The schema is authored in Atomic JSON-AD (shared/shapes/atomic/shopping.jsonad) and constructed at load time through the shared Atomic-to-NextGraph converter and defineShape builder; generated snapshots use the same pipeline. Explicit unordered string-set and legacy read-datatype mappings preserve concurrent placements and upgrade existing integers. The generator now resolves projection identities from their declared shape mappings, allowing both projections to share the same RDF class. No runtime schema UI, ShEx intermediate, RDF linked list, or predecessor relationships are introduced.

The UI selects the greatest concurrent key (rightmost placement wins), and a later move deletes observed alternatives before adding its new key. Upgrade retains subject IDs, titles and graph membership. Migration writes are deferred beyond incoming backend callbacks so the ORM does not suppress them.

Closes #30.

Validation against current main including runtime-schema PR #29: all 104 unit tests, runtime and shopping-list type checks, the shopping-list production build, and all three shopping-list browser tests pass. Generated schemas are repeatable, and expense outputs remain unchanged. All nine production builds passed before integrating #29. In broader browser checks, all six expense checks passed across the initial run and rerun; two Joep checks passed, while its grid-header check retained a five-second startup timeout failure (shopping code does not change the Joep grid). Cloud reruns used 60-second test limits, with assertions unchanged.

Native offline two-verifier replication has not been exercised. Browser/fixture checks verify the installed ORM protocol and position projection, not native encrypted synchronization. Old integer-writing clients must be upgraded; concurrent title edits and membership/delete semantics remain NextGraph's existing behavior.

Dragging a shopping item previously rewrote every item's integer position. The app now uses position-strings to allocate a fresh variable-length key between destination neighbors and updates only the moved subject, using fixed code-unit comparisons. The schema is authored in Atomic JSON-AD (`shared/shapes/atomic/shopping.jsonad`) and constructed at load time through the shared Atomic-to-NextGraph converter and defineShape builder; generated snapshots use the same pipeline. Explicit unordered string-set and legacy read-datatype mappings preserve concurrent placements and upgrade existing integers. The generator now resolves projection identities from their declared shape mappings, allowing both projections to share the same RDF class. No runtime schema UI, ShEx intermediate, RDF linked list, or predecessor relationships are introduced. The UI selects the greatest concurrent key (rightmost placement wins), and a later move deletes observed alternatives before adding its new key. Upgrade retains subject IDs, titles and graph membership. Migration writes are deferred beyond incoming backend callbacks so the ORM does not suppress them. Closes #30. Validation against current main including runtime-schema PR #29: all 104 unit tests, runtime and shopping-list type checks, the shopping-list production build, and all three shopping-list browser tests pass. Generated schemas are repeatable, and expense outputs remain unchanged. All nine production builds passed before integrating #29. In broader browser checks, all six expense checks passed across the initial run and rerun; two Joep checks passed, while its grid-header check retained a five-second startup timeout failure (shopping code does not change the Joep grid). Cloud reruns used 60-second test limits, with assertions unchanged. Native offline two-verifier replication has not been exercised. Browser/fixture checks verify the installed ORM protocol and position projection, not native encrypted synchronization. Old integer-writing clients must be upgraded; concurrent title edits and membership/delete semantics remain NextGraph's existing behavior.
Use string position keys for shopping list ordering
Some checks failed
db-app-runner tests / test (pull_request) Failing after 3m16s
2b4caf75ad
Merge main and define shopping positions with Atomic Schema
Some checks failed
db-app-runner tests / test (pull_request) Has been cancelled
86596dadee
Integrate runtime Atomic Schema and legacy position read types
Some checks failed
db-app-runner tests / test (pull_request) Failing after 3m47s
def883d02f
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!33
No description provided.