Add Lenses app for Atomic mappings and collection correspondences #37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/lenses-app"
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?
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
9be210d9733fbe9beb5624521a496030efb453b6under MIT with provenance documented. CI includes Lenses type checking and browser tests.