Skip to content

Temporarily raise workspace route bundle budgets by 5% - #4906

Merged
ymichael merged 1 commit into
mainfrom
bb/investigate-ci-bundle-budget-failure-thr_pw3t4r3mvx
Oct 5, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/investigate-ci-bundle-budget-failure-thr_pw3t4r3mvx

Conversation

@ymichael

@ymichael ymichael commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Main's SplitWorkspaceRoute static closure exceeded its raw JavaScript budget after recent-thread long-press actions landed: 1064.8 KiB against a 1062.4 KiB limit. This prevented the bundle check from passing despite boot, Brotli, and split guards passing.

What changed

Temporarily raise both SplitWorkspaceRoute byte limits by 5% at the user's request: raw 1,087,864 → 1,142,257 bytes and Brotli 317,278 → 333,142 bytes. Record the reason in bundle-budget.json. A separate PR will reduce the route payload and ratchet the limits back down. Boot budgets and dependency/split guards remain intact.

How you verified

pnpm exec turbo run build --filter=@bb/app passed. node apps/app/scripts/check-bundle-budget.mjs passed with 1064.8 KiB raw / 308.4 KiB Brotli for SplitWorkspaceRoute and 1488.3 KiB raw / 370.1 KiB Brotli for boot. git diff --check passed.

AGENT GENERATED

@ymichael
ymichael merged commit 0e265ce into main Oct 5, 2026
31 of 34 checks passed
@ymichael
ymichael deleted the bb/investigate-ci-bundle-budget-failure-thr_pw3t4r3mvx branch October 5, 2026 17:01
ymichael added a commit that referenced this pull request Oct 5, 2026
## Human comments

## What was wrong

The composer imported `@tiptap/extensions` and `@tiptap/extension-list`
barrels. Their top-level `Extension.create` / `Node.create` calls kept
unused extension implementations in the shipped app, including character
count, drop cursor, gap cursor, and task-list implementations. The
placeholder compatibility export also reached the extensions barrel.
This contributed to the workspace route exceeding its original raw
budget by 2.4 KiB.

## What changed

Import the seven enabled list/editor extensions from their supported
package subpaths. This removes unused implementations and the entire
`prosemirror-dropcursor` and `prosemirror-gapcursor` packages from the
app output while keeping the editor's enabled extensions unchanged.

Restore both workspace budgets to their pre-#4906 values: **1,087,864
raw / 317,278 Brotli bytes**. Add the removed ProseMirror packages to
the boot and workspace forbidden-package guards.

Measured against merged main at `0e265cee96`, using the same build
pipeline and minifier:

| Measurement | Baseline | This PR | Change |
| --- | ---: | ---: | ---: |
| All app dist JavaScript, raw | 20,036,405 B | 20,021,455 B | **−14,950
B** |
| All app dist JavaScript, compressed | 4,233,497 B | 4,230,620 B |
**−2,877 B** |
| Workspace static closure, raw | 1,090,328 B | 1,075,187 B | **−15,141
B** |
| Workspace static closure, compressed | 315,834 B | 312,660 B |
**−3,174 B** |
| Boot, raw | 1,524,030 B | 1,524,030 B | unchanged |
| Boot, compressed | 378,936 B | 379,106 B | +170 B |

The totals include **every `.js` file under app dist**, including
worker/copied assets. Compressed totals use `.br` sizes, with raw sizes
for sub-1 KiB files skipped by precompression. Both builds emit **553
JavaScript files and 51 workspace chunks**. No code is moved behind a
new import boundary, no feature is removed, and the minifier is
unchanged. Boot's small compressed increase accompanies
import-name/chunk-hash changes; aggregate raw and compressed output both
shrink.

The final diff touches only the editor imports and bundle-budget.json.
There are no CLI, SDK, or daemon protocol changes.

## How you verified

- `pnpm exec turbo run build --filter=@bb/app` in an isolated baseline
checkout at `0e265cee96`; counted every dist JavaScript file and its
precompressed counterpart against the final build.
- `pnpm exec turbo run build typecheck lint --filter=@bb/app` passed;
lint reports existing warnings, no errors.
- `pnpm exec turbo run test --filter=@bb/app --
src/components/promptbox/editor src/bundle-budget.test.ts` passed 110
tests; 3 performance tests were skipped.
- The restored budget and new package guards fail against the baseline
build (raw overflow and both unwanted packages), then pass against this
PR. `git diff --check` passed.
- Final optimized app with a fresh isolated dev database: plain
multiline input; rich editing enabled through Settings; bullet-list
creation and item splitting; ordered-list creation; undo/redo; and rich
draft persistence after reload all passed. Screenshot inspected. iOS
Safari was not run.

This PR is intentionally left unmerged pending the user's go-ahead.

Rebased onto main to pick up the published-SDK version correction and
stable blocking CI test order. The SDK npm version guard and production
bundle checker pass; 143 focused app tests pass (3 skipped). The
complete Linux app shard that previously failed also passes locally:
1,861 tests passed, 5 skipped. Preloading and execution timing are
unchanged by this PR.

Final-head CI passed: 26 jobs passed, 1 skipped.
https://github.com/get-bb/bb/actions/runs/37350850806

> AGENT GENERATED
ymichael added a commit that referenced this pull request Oct 5, 2026
## Human comments

## What was wrong

Main's CI has been red since #4782 (e4fcbed). The SplitWorkspaceRoute
static closure measures 1062.5 KiB against a 1062.4 KiB raw limit, about
100 bytes over. Brotli, boot, and split guards all pass.

#4782 adds about 12 KiB to the closure because `VoiceInputButton`
statically imports `MicrophonePreferences`. Its PR CI last ran on Oct 2,
while the temporary 5% raise from #4906 was still in effect. #4907 then
restored the lower limits on Oct 5, and the two merges collided.

## What changed

Temporarily raise both SplitWorkspaceRoute byte limits by 5%, using the
same values as #4906: raw 1,087,864 → 1,142,257 bytes and Brotli 317,278
→ 333,142 bytes. The reason is recorded in `bundle-budget.json`. A
follow-up will lazy-load the microphone preferences and ratchet the
limits back down. Boot budgets and dependency/split guards are
unchanged.

## How you verified

CI on 95750b8 measured 1062.5 KiB raw / 308.6 KiB Brotli for the
closure. Both numbers are well under the new limits.
`bundle-budget.json` parses as JSON.

> AGENT GENERATED

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant