Repository navigation
Studio: keep the prompt upsampler client out of the startup chunks, reset the startup budget to the build - #14168
Conversation
|
@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. Hooray! 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". |
|
pre-commit.ci added @codex review |
|
Codex Review: Didn't find any major issues. 👍 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 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". |
# Conflicts: # studio/frontend/scripts/check-bundle-budget.ts
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! 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". |
…er-14137 # Conflicts: # studio/frontend/scripts/check-bundle-budget.ts
|
@codex review |
|
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
## Summary Main is over the startup bundle budget again, by 17 B raw, so `Frontend build + bundle sanity` fails on every PR based on it: ``` over the startup budget: raw 6665.9 KB > 6665.9 KB (main at 551dc28) ``` #14168 reset both limits to the measured build plus a 160 B raw / 189 B transfer margin. #14190 (open //host links as web links) then added 177 B raw / 52 B transfer to the eager startup chunks. It merged while its own bundle check was still queued, so the raise never happened. ## Cause `studio/frontend/src/lib/open-link.ts` is the shared link opener, and the eager shell imports it. #14190 adds leading/trailing control-character trimming and `//host` (scheme-relative) link handling there (+16 lines). That is real growth with no lazy home: the opener is needed from the first screen. #14187, the other commit since the reset, changes no frontend code. ## Change - **`check-bundle-budget.ts`:** a BUDGET comment entry for #14190, and both limits moved to the measured build plus the same margin: - `rawBytes`: 6,825,885 -> 6,826,062. - `transferBytes`: 2,054,261 -> 2,054,313. ## Testing One machine and build, Node 24, exact byte totals from the budget script, 95 chunks throughout. CI has matched this machine to the byte on every earlier budget change. | tree | raw B | transfer B | |---|---|---| | `4dc8bf0bd2` (after #14168, no frontend change since) | 6,825,725 | 2,054,072 | | main `551dc28123` (+ #14190, #14187) | 6,825,902 | 2,054,124 | - **Main against the old limits:** `over the startup budget: raw 6665.9 KB > 6665.9 KB`. - **With this change:** `within budget (0.2 KB transfer, 0.2 KB raw to spare)`.
Summary
Main is over the startup bundle budget, so
Frontend build + bundle sanityfails on every PR based on it:This PR takes two steps. It moves #14137's prompt upsampler client out of the startup chunks, which is real growth with a lazy home. It then resets both limits to the measured build. Main has gone over this budget repeatedly, and the root of that is a shortfall in how the limits were raised, which this corrects.
Cause
#14137 (FLUX.3 prompt upsampling). The Images page is lazy (
ImagesPage = lazy(...)in__root.tsx), butfeatures/images/api.tsis not. Startup modules import it for other calls (loaded-models-api.ts,loaded-models-sources.ts,use-media-companion-bytes.ts). #14137 put the four upsampler calls there, with value imports fromlib/prompt-enhance.ts, so that module joined the startup chunks. Onlyprompt-enhance-panel.tsx, inside the lazy Images page, calls them.The limits themselves. Each raise since #14073 was sized from its own PR's delta and added to the previous limit. That previous limit already sat below the build, starting at #14073:
475a02acmeasures 2,047,700 B transfer against the 2,047,608 B limit Studio: audio.cpp v0.9.2 support #14073 set.2fee36ffthe gap is 6,500 B raw and 2,409 B transfer.The raises since (#14072, #14075, #14110, #14108, #14113) each added their delta, so the shortfall carried forward. CI agrees with my machine to the byte: the first run of this PR read 1999.7 KB transfer on both.
Change
features/images/prompt-upsampler-api.ts: holdsgetPromptUpsamplerStatus,startPromptUpsamplerDownload,cancelPromptUpsamplerDownloadandpreviewEnhancedPrompt, moved unchanged, with the sameparseJsonerror handling.api.ts: now imports only thePromptEnhancementtype fromlib/prompt-enhance(erased at build).prompt-enhance-panel.tsx: imports the calls from the new module.check-bundle-budget.ts: both limits are reset to the measured build plus the usual margin (160 B raw, 189 B transfer), with an entry in the BUDGET comment block explaining why the reset is absolute rather than by delta.rawBytes: 6,819,206 (main after Studio: match letter shortcuts by the letter the layout types #14113) -> 6,825,885.transferBytes: 2,051,727 -> 2,054,261.Testing
One machine and build, Node 24, exact byte totals from the budget script, 95 chunks throughout:
2fee36ff2fee36ff+ the move78e5eefa4d(adds #14113) + the moveb227654927, adds #14184, + the move)within budget (0.2 KB transfer, 0.2 KB raw to spare).npm run typecheck: clean.bundle-budget-cli.test.ts,bundle-budget-closure.test.ts,image-prompt-enhance.test.tsandloaded-models-platform-matrix.test.ts: 74 passed.