Repository navigation
Remove legacy Connect and use native SDK record leases - #200
Open
callumalpass wants to merge 5 commits into
Open
callumalpass wants to merge 5 commits into
callumalpass wants to merge 5 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge after #197
Supersedes #145.
Reader no longer imports or depends on the legacy Connect client. Repositories use native SDK
RecordView/QueryResult, plain JSON, record witnesses, settlement and error descriptions. Web and extension source-note/annotation editors use native record leases through the real SDKMdbase, without a lease RPC or compatibility client.Merge composition
origin/feat/extension-shared-session(794d9b85) with merge commit9e3c0db5. Replace extension RPC with the SDK shared session #197 removes the extension's application RPC bridge and gives each page its owncreateMdbasewithsession: { build, host: false }, sharing the offscreen SDK host.use-extension-capture.ts:633now supplies that page's actual application to the native source-note editor. The previously intentional full-typecheck failure is resolved; no bridge or legacy client is restored.origin/main(6b71623e) with merge commita68d5fd4, accepting its automatic SDK beta.210 intake, original production archive/custody metadata and SDK publisher selection. The package conflict retains beta.210 and the legacy client deletion.1a505626to make the preview behavior precise. No Reader upkeep: browser audit drift, development guide and vendor pruning #196 upkeep/browser-audit/menu/layout fix is included; its files are left alone apart from already-existing lane changes and main's separate chore: vendor verified production SDK 0.1.0-beta.210 #198 repin.Deletion evidence and retained invariants
SdkReaderRoot/NativeImportPagefromapps/reader/src/main.tsx. The removedreaderSessionhad only unused old-import consumers;ReaderPortableApplicationSessionhad no caller. Native records carry revision witnesses, so the revisionless annotation cache and feature-negotiation paths have no native consumer.@mdbase-dev/sdk/manifest. Together with Replace extension RPC with the SDK shared session #197 this also deletes the offscreen application RPC channel, host/client, serialization, callbacks/abort dispatch, lifetime lock, memory bus and bridge tests. The offscreen lifecycle message and existing content-capture messages remain; they carry no SDK record RPC.Behaviour change for review
The no-collection interface preview previously let a user type and format source-note Markdown and autosave it into that tab's sample data. Annotation bodies with a path and revision were also editable: newly-created source comments and seeded anthology bookmarks qualified, and their editor offered deletion. The three seeded James annotations already lacked those identities, so their card Edit buttons were already disabled.
This was not a legacy in-memory Connect client. Both editors used the legacy callback-based
MdbaseRecordSessionaroundPreviewGateway.saveSourceBody/updateAnnotation, which mutate the preview's own arrays. There was no SDK application, collection or transport behind those saves. Saved sample changes reset on reload; source-note unsaved drafts separately had a browser-local checkpoint.Now the preview still has no
Mdbase, so source-note Markdown is read-only, its formatting/save/insertion toolbar is absent, and annotation-card Edit remains visible but disabled even for newly-created comments. Consequently the body editor and its Delete annotation action cannot be reached through those cards. The change follows requiring native SDK record leases, not removing a backing in-memory client. No sample runtime or preview gateway behavior is changed in this integration lane.The demo is not wholly read-only: a user can still create a source comment with an initial body, but cannot re-edit it through its card. The existing sample gateway still handles annotation creation, colour/ownership, source creation/removal and source/citation details, reading state, saved views and transclusion.
Insert into source notestill changes the sample source-note body despite direct Markdown editing being read-only; highlight release/undo has a separate deletion path. These remain tab-local sample operations, not connected or durable collection writes.An isolated Chromium comparison against unmodified main
6b71623eand final head verifies: before, source-note edit/autosave and new-comment edit work; after, note and annotation-card body editing are disabled. In both versions the James seed cards are already disabled, source-comment creation succeeds, annotation transclusion changes the body, and reload restores the original sample note. Source traces separately establish the other retained gateway operations; they are not claimed as individually browser-tested.Validation
Final head:
1a50562667a4e0a674765df10c42cb96a93da3a5; Node 22.22.0, pnpm 10.7.0. Finite checks/builds userpnpm; Chromium and owned loopback services stay local.pnpm install --lockfile-only --offline;pnpm install --offline --frozen-lockfilepnpm i18n:extract;pnpm i18n:compilerpnpm checkrpnpm --pull apps/reader/dist build:productionrpnpm --pull apps/extension/dist --filter @mdbase-reader/extension packageMDBASE_ENV=production pnpm --filter @mdbase-reader/app manifest;MDBASE_ENV=production pnpm --filter @mdbase-reader/extension manifest:mdbase;test -z "$(git status --porcelain)"pnpm --filter @mdbase-reader/extension test:browserpnpm --filter @mdbase-reader/app test:browserpnpm --filter @mdbase-reader/app test:html-svgpnpm --filter @mdbase-reader/app test:pdf-touchrpnpm --pull apps/reader/dist --filter @mdbase-reader/app build:feedback-test;pnpm --filter @mdbase-reader/app test:feedbackrpnpm test:publisherrpnpm check:release-downloads;rpnpm test:release-downloadsThe full Reader browser audit is not green: unchanged
apps/reader/scripts/audit-reader.mjs:310usesgetByLabel("Library actions", { exact: true }), matching both the toolbar and summary. The final head and a clean exported main6b71623efail identically after the successful 5,000-source virtualization/keyboard/range-selection scenario. #196 already contains the summary-specific locator correction; it was deliberately not taken into this lane. Later portions of the full audit were not reached and are unverified, not PASS. This remains an exception to the requested all-checks-green acceptance.An earlier full check hit a Vitest-cache
ENOTEMPTYstartup race; the unchanged rerun and final-head full check pass. One release-download run scanned the temporary exported baseline under its new prefix; removing only that run-owned snapshot and rerunning passes. No registered assertion, timeout, allowlist or trust policy was relaxed. Production output was rebuilt after the feedback build. Owned browsers/servers were closed and the exported baseline removed.No authenticated extension sign-in/editor-save, production registration binding, LAB/native-runtime, log-durability, deployment or store-release qualification is claimed. The local replica test and editor unit/type coverage are separate evidence. No review was requested, no PR was merged and CI is not watched.