Add Lenses app for Atomic mappings and collection correspondences #37

Merged
michielbdejong merged 3 commits from codex/lenses-app into main 2026-10-16 16:34:34 +02:00

Adds a Lenses app to define Atomic property mappings and manage the collection bridges and durable record correspondences a future reflector will consume. Start it with pnpm db-app-runner lenses-react.

Lens definitions use Atomic Server's content-addressed identities and transform implementation, with forward/backward sample previews, Atomic JSON-AD import/export, editable labels, and new immutable definitions when mappings change. Expense and Shopping title mappings are provided as starting points.

Bridges pin lens IDs and collection scopes (graph plus record class for NextGraph). Correspondences use deterministic, bridge-scoped IDs; repeated linking is idempotent, conflicting counterparts are rejected or exposed, and referenced definitions cannot be removed locally. All three resource types persist in native NextGraph RDF, preserving the existing Expense and Shopping records and shapes.

This is a management app: no synchronization daemon, Atomic publication, endpoint credentials, or foreignIds writes to source/destination records are implemented. Desired state is explicitly distinguished from daemon activity. Parent ownership is checked by Atomic Server on publication; the native app records the supplied parent. Two-way bridge configuration initially accepts only rename lenses, and correspondence validation is not a distributed uniqueness guarantee.

Validation: 284 unit tests passed; the final changed lens/native tests (38 tests) passed again after schema refinements. All four Lenses browser tests passed without retries; Lenses type checking and its production build passed. Native offline WASM coverage writes and reopens the actual lens, bridge, and correspondence RDF representations. Browser reload tests use the protocol fixture; the broker/wallet native browser suite was not run locally.

Atomic lens code, its Datatype enum, and the shared fixture corpus are vendored from upstream commit 9be210d9733fbe9beb5624521a496030efb453b6 under MIT with provenance documented. CI includes Lenses type checking and browser tests.

Adds a Lenses app to define Atomic property mappings and manage the collection bridges and durable record correspondences a future reflector will consume. Start it with `pnpm db-app-runner lenses-react`. Lens definitions use Atomic Server's content-addressed identities and transform implementation, with forward/backward sample previews, Atomic JSON-AD import/export, editable labels, and new immutable definitions when mappings change. Expense and Shopping title mappings are provided as starting points. Bridges pin lens IDs and collection scopes (graph plus record class for NextGraph). Correspondences use deterministic, bridge-scoped IDs; repeated linking is idempotent, conflicting counterparts are rejected or exposed, and referenced definitions cannot be removed locally. All three resource types persist in native NextGraph RDF, preserving the existing Expense and Shopping records and shapes. This is a management app: no synchronization daemon, Atomic publication, endpoint credentials, or foreignIds writes to source/destination records are implemented. Desired state is explicitly distinguished from daemon activity. Parent ownership is checked by Atomic Server on publication; the native app records the supplied parent. Two-way bridge configuration initially accepts only rename lenses, and correspondence validation is not a distributed uniqueness guarantee. Validation: 284 unit tests passed; the final changed lens/native tests (38 tests) passed again after schema refinements. All four Lenses browser tests passed without retries; Lenses type checking and its production build passed. Native offline WASM coverage writes and reopens the actual lens, bridge, and correspondence RDF representations. Browser reload tests use the protocol fixture; the broker/wallet native browser suite was not run locally. Atomic lens code, its Datatype enum, and the shared fixture corpus are vendored from upstream commit `9be210d9733fbe9beb5624521a496030efb453b6` under MIT with provenance documented. CI includes Lenses type checking and browser tests.
Add Lenses app for Atomic mappings and collection correspondences
Some checks failed
db-app-runner tests / test (pull_request) Has been cancelled
23c6056f1c
Trim trailing blank line in vendored lens fixtures
All checks were successful
db-app-runner tests / test (pull_request) Successful in 26m36s
eec6b7ebb2
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!37
No description provided.