Repository navigation
Implement typed App/Worker coordination with a pure coordinator - #148
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e133d035f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| type page | ||
| type block |
There was a problem hiding this comment.
Expose read-only accessors for page and block results
For a client implementing the specified Journal-to-Children read flow, Journal returns an opaque page with no way to obtain the UUID required by Children.parent; likewise, returned block values expose neither identity nor content for rendering. Inspecting the public interfaces shows no accessors or manifest type aliases for either type, so Core.reply and Core.observed expose typed containers whose contents clients cannot actually use. Add read-only identity/content accessors or private result records, and cover a positive client that reads a journal page, requests its children, and consumes their rendering fields.
Useful? React with 👍 / 👎.
Remove the old internal RPC Protocol and mutation wire modules. Keep canonical v1 persisted identities and immutable proof bytes while passing the original typed intent and outcome through Service, Worker and App. Move the existing unique I/O assertions to real typed Service and business consumers, retain the original pure cases through native Dune, and retire the unused RPC test host and inactive probe wrappers.
App/Worker requests previously relied on runtime ownership tables and loosely associated results. This PR implements the typed coordination boundary and migrates the App's read, durable-write, observation, media/Import and lifecycle paths onto the existing Worker Service/client. It includes the Sync, Worker, Overlay and storage changes needed to execute those contracts.
Implementation and ownership
journal_worker_coordination/logseq_journal.worker_coordinationunderapp/spec/worker_coordination/, with a Duneimplementsimplementation underapp/impl/worker_coordination/:worker_api,worker_pure_coordinatorandworker_effect_runner.Mailbox.on_eventsubscription. Application retains UI/navigation, authentication/catalog, client lifetime and business planning.The spec library does not depend on the App. Compile-only consumers use the real App projection. Feed/Favorites/Detail/Capture planning and presentation remain with their business reducers.
Existing UI/UX and recovery
Preserve the existing screens, layout, navigation and interaction model. Remove the added pending-record Diagnostics sections, read-only/Retry recovery page, Detail observation error/retry controls and
Closing graph…state. Non-network errors do not offer user Retry, and transient coordination states do not add UI. Safe recovery runs in the background while existing error/Diagnostics surfaces retain failures and durable evidence.The final changes also fix preview presentation stopping the native runtime, late canonical replies invalidating a reopened Timeline prefix, and a rapid reopen click being overwritten by an unfinished close. Navigation retains the latest selection until actual settlement, recomputes current slots, and respects cancellation, sign-out and rebinding.
Validation at
e6abcb613bcb6f99912d4307fec4011500226278dune build @all app/native_embed.exe.oand forceddune runtestpassed. The validated source hashes match the committed tree. Coverage includes pure unit tests and shrinking property tests, real Service/storage/protocol integration, 222 mounted App tests, 189 Runtime locality tests and 354 Sync tests.Simulator evidence and limits
The final-source Simulator packages exercised real App views/reducers with isolated synthetic encrypted graphs, memory-only keys and blocked authentication. The normal package rechecked stored-image preview/open/return, Detail responsiveness, retained Task/image content and Copy feedback.
Four final-source fault scenarios used explicitly controlled backend I/O faults, with production App UI unchanged:
Additional, earlier-source Simulator runs covered Capture/Child Task creation, status/Delete, new-photo selection and Import, Favorites scrolling and graph switching/reordering. Those runs are distinguished from final-binary coverage; not every operation was repeated on the final package. Same-data base/head comparisons covered Timeline, Composer, the picker and Favorites; the large Favorites fixture produced a membership-read byte-budget error on base and a successful read on the candidate.
This is not exhaustive GUI or pixel-by-pixel parity proof. Real login, live online synchronization, real-account/graph behavior and iPhone execution were not tested. The Simulator uses an isolated warm-start host and experimental host-restamped native objects (
cross_abi_validated=false), so it does not establish real-device ABI acceptance. Synthetic fault instrumentation, private evidence, app packages and real user data are outside the PR. No merge or release is part of this change.