Move the portable half of version history and the Yjs document into core - #19
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This was referenced Aug 5, 2026
Third extraction layer: git/doc, git/ops, git/merge, git/layout, git/repo, git/pack and ydoc (plus its 15 tests). 2,109 lines, all pure renames. The split falls along an existing seam rather than a new one. repo.js and friends never open a filesystem themselves — they take one through repoCtx, which is what already let the same commit/merge/restore logic run against LightningFS in the browser and node:fs in tests. So they port untouched. What stays in apps/web is everything that names a concrete runtime: fs.js LightningFS over IndexedDB remote.js reads import.meta.env.VITE_API_URL at module scope engine.js the Buffer polyfill browsers need, and the chunk boundary load.js the memoised dynamic import sync.js composes the two halves That boundary is load-bearing for bundle size, so it was verified rather than assumed: isomorphic-git internals still appear only in the ~181 KB async chunk, not in any of the four main chunks, and the build total is unchanged. ydoc.test.js moves with ydoc.js, which gives core its own vitest setup and leaves apps/web with no test files — its test script gains --passWithNoTests so the harness stays in place for tests added later. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
playforge-coding
force-pushed
the
core-extract-git-ydoc
branch
from
August 5, 2026 23:30
89b98e5 to
f978ceb
Compare
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.
Third extraction layer. Stacked on #17.
Moves
git/doc,git/ops,git/merge,git/layout,git/repo,git/packandydoc(plus its 15 tests) into core — 2,109 lines, all pure renames.The seam already existed
repo.jsand friends never open a filesystem themselves; they take one throughrepoCtx. That is what already let the same commit/merge/restore logic run against LightningFS in the browser andnode:fsin tests, so they port untouched.What stays in
apps/webis everything that names a concrete runtime:fs.jsremote.jsimport.meta.env.VITE_API_URLat module scopeengine.jsBufferpolyfill browsers need, and the chunk boundaryload.jssync.jsThe bundle split was verified, not assumed
load.js's dynamic import is what keeps isomorphic-git out of the bundle every homepage visitor downloads, and moving its dependencies into a workspace package could plausibly have broken that. It didn't — isomorphic-git internals appear only in the ~181 KB async chunk, in none of the four main chunks, and the build total is unchanged at 4096.0 kB.One thing to flag
ydoc.test.jsmoves withydoc.js, which gives core its own vitest setup and leavesapps/webwith no test files at all. Itstestscript would now exit 1, so it gains--passWithNoTeststo keep the harness in place for tests added later.CI doesn't currently run tests on any workspace (
deploy.ymlonly builds), so nothing was masked by this — but it does mean the 56 tests across core/api/mcp are only ever run locally. Probably worth a CI step, out of scope here.Verification
pnpm run lint,pnpm run build,pnpm run build:docspass; core 15, api 27, mcp 14.Docs updated: the version-history page now documents the portable/browser-bound split explicitly, since that page's whole "Where it lives" table was the old single-location layout.
Stack created with GitHub Stacks CLI • Give Feedback 💬