mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1575] [Feature]: Make AppShell startup imports use lightweight mode and catalog entrypoints #815
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#815
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @Xelvanis on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1575
Originally assigned to: @cha1latte on GitHub.
What problem does this solve?
pnpm buildstill emits the Vite large chunk warning. Rollup module metadata shows the startup entry includes heavy game, shared chat UI, and catalog/chat modules that should stay behind lazy route or panel boundaries.Observed eager paths:
src/features/shell/notifications/components/ChatNotificationBubbles.tsximportsuseGameModeStorefrom../../../modes/game.src/features/modes/game/index.tsre-exportsGameSurface,GameModeRoute, game stores, and game asset helpers from one broad barrel.src/app/shell/AppShell.tsximportsuseClearAutonomousUnreadfrom../../features/catalog/chats/index.src/features/catalog/chats/index.tsre-exportshooks/use-chats.ts, which imports prompt preview, summary backfill, transcript export, storage APIs, and other heavy chat utilities.This makes shell startup pay for route/editor/runtime code that should be loaded only when the relevant mode or panel is used.
Proposed behavior
Add focused lightweight public entrypoints for startup-safe APIs and update shell imports to use them.
Examples of the desired shape:
useClearAutonomousUnreadfrom a narrow chat-owned module instead of the fulluse-chats.tsbarrel;GameSurface,ConversationView,ChatMessage, editor panels, and route components behind their existing lazy route/panel imports.Expected owner or impact area
Refactor branch considerations
Keep the public entrypoints feature-owned and narrow. Avoid solving this by deep-importing feature internals from the app shell or by creating a new broad compatibility barrel.
Acceptance checks:
pnpm buildpasses.src/features/modes/game/components/GameSurface.tsx,GameNarration.tsx,GameSetupWizard.tsx, orsrc/features/modes/game/api/game-api.tsthrough shell notification imports.Alternatives considered
Leaving the broad barrels in place and only adding
manualChunkswould hide part of the symptom but keep startup imports coupled to unrelated feature owners.Additional context
This is one implementation slice under #1532.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@cha1latte commented on GitHub (May 29, 2026):
Triage note: labeling this as
normal-scopebecause it narrows eager AppShell imports behind existing lightweight mode and catalog entrypoints without changing product behavior.A good next step is a focused startup-bundle cleanup with build-size proof.
@cha1latte commented on GitHub (May 31, 2026):
#1711 fixed the chat-side narrow entrypoint and moved notification bubbles behind a lazy AppShell boundary, so startup no longer eagerly pays for that optional surface.
Leaving this open for the remaining intended fix: ChatNotificationBubbles still imports useGameModeStore from the broad game barrel, and src/features/modes/game/index.ts still re-exports GameSurface/GameModeRoute alongside stores. The original issue asked for a small game-owned startup-safe entrypoint for setup/reset state, so that structural piece is not done yet.
@cha1latte commented on GitHub (May 31, 2026):
fixed in #1746