refactor(stage): enforce package boundaries - #2371
Closed
leaft wants to merge 1 commit into
Closed
Conversation
Contributor
⏳ Approval required for deploying to Cloudflare Workers (Preview) for stage-web.
Hey, maintainers, kindly take some time to review and approve this deployment when you are available. Thank you! 🙏 |
leaft
force-pushed
the
feat/package-boundaries
branch
from
August 26, 2026 09:42
917392f to
c822c74
Compare
nekomeowww
approved these changes
Aug 26, 2026
Collaborator
Author
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.
Summary
This PR removes five cross-package source imports and gives shared Stage behavior a clear owner.
It resolves all five findings from the package-boundary review. Items 3 and 4 share one boundary and use one solution.
Problems and solutions
@proj-airi/stage-pages. Both apps already scan this shared page directory. Update the browser regression test to import the public package path.@proj-airi/stage-uiimporteduseSettingsLive2dfrom thestage-ui-live2dsource tree. This bypassed the package export contract.useSettingsLive2dfrom@proj-airi/stage-ui-live2d.stage-uisource tree. They also copied the same wLipSync profile and model-neutral vowel policy.AudioContextfrom Stage to both renderers. Move the shared profile and vowel policy to@proj-airi/model-driver-lipsync. Keep the VRM and MMD model mappings in their renderer packages.useLocalStorageManualResetfrom thestage-sharedsource tree.@proj-airi/stage-shared/composablesentry.Lip-sync boundary
The shared driver does not depend on Vue, Three.js, VRM, or MMD. The renderer packages no longer depend directly on
wlipsync.The renderer packages also no longer import the Stage audio store. Audio cleanup disconnects only the wLipSync node that each renderer owns.
Visual changes
No visual changes. The shared Polaroid SFC is byte-for-byte identical to both removed app copies. The browser regression test passes from the new package location.
Verification
sem diff --staged --no-cosmetics -v --file-exts .ts .tsxsem diff --staged --no-cosmetics -v --file-exts .vuepnpm -F @proj-airi/model-driver-lipsync test— 3 tests passedpnpm -F @proj-airi/stage-ui-three exec vitest run— 18 tests passedpnpm -F @proj-airi/stage-ui-mmd exec vitest run— 23 tests passedpnpm -F @proj-airi/stage-web exec vitest run --config vitest.config.ts src/pages/devtools/polaroid.browser.test.ts— 1 browser test passedmodel-driver-lipsync,stage-ui-three,stage-ui-mmd,stage-ui,stage-pages,stage-web, andstage-pocketpnpm lint— 0 errors and 7 existing warnings outside this changegit diff --checkThe full
pnpm typecheckstill reports three errors in the unchangedapps/stage-tamagotchi/src/renderer/main.ts.vue-router/auto-routesdoes not exporthandleHotUpdateorroutes. TheupdatedRoutesparameter also has an implicitanytype.