Repository navigation
Import the row fork's modules statically, which puts main back under the startup budget - #11588
Merged
Merged
Conversation
…the startup budget forkChatRow loaded chat-api and chat-runtime-store with import(). Both are already in the eager chat chunk, so nothing was deferred, but each became a dynamic entry and Rollup split their graphs into eight more startup chunks. The glue cost 10 KB and put main 686 bytes over the raw startup budget.
Member
Author
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
…the startup budget (unslothai#11588) forkChatRow loaded chat-api and chat-runtime-store with import(). Both are already in the eager chat chunk, so nothing was deferred, but each became a dynamic entry and Rollup split their graphs into eight more startup chunks. The glue cost 10 KB and put main 686 bytes over the raw startup budget.
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.
mainfails Frontend build + bundle sanity since #11564:Cause
forkChatRowinchat-row-menu.tsloads../api/chat-apiand../stores/chat-runtime-storewithawait import(...). Both modules already ship in the eagerchatchunk, so nothing is deferred. Each one did become a dynamic entry, though, and Rollup split their graphs (chat-api,apply-per-model-config,external-providers-store,model-identity,use-gpu-info,hf-token-store,settings-dialog-store, ...) out ofchatandproviders-apiinto eight new startup chunks.I measured each startup chunk on both sides of #11564 (same machine, same build):
3b87ee8b5)2036ee0ba)The fork feature itself costs about 1.1 KB. The other 10 KB was the glue those new chunks add. No module was added to or dropped from the startup set. The same code just shipped in more pieces.
So the gate was right and the product was wrong. The budget is not raised here.
Changes
chat-row-menu.ts: importforkChatThreadandsettleThreadScopedSettingsForCopystatically. Behaviour is unchanged: the visible branch is still read before settings settle, and the fork still runs after them. There is no import cycle (neither module importschat-row-menuor thefeatures/chatbarrel), andtsc -bis clean.tests/sidebar-row-actions.test.ts: the test transpilesforkChatRowalone and supplied the two modules throughrequire, which only works forimport(). They are now passed as bindings in the VM context. The ordering andmessageIdassertions are unchanged.scripts/check-bundle-budget.ts: the over-budget hint suggested a dynamic import, which is how this overage happened. When the chunk count rose, it now says to check the opposite first.Verification
npm run bundle:check:within budget (15.2 KB transfer, 9.2 KB raw to spare), 78 chunks.import()calls failsrow forks retain the visible branch across settings settlement(ReferenceError: require is not defined) and fails the budget check again atraw 5596.4 KB > 5595.7 KB.