Skip to content

Remove unused Tiptap code and restore workspace bundle budgets - #4907

Merged
ymichael merged 1 commit into
mainfrom
bb/reduce-workspace-route-bundle-thr_pw3t4r3mvx
Oct 5, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/reduce-workspace-route-bundle-thr_pw3t4r3mvx

Conversation

@ymichael

@ymichael ymichael commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

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 ymichael changed the title Defer New thread screen and reduce workspace route payload by 81% Reduce app JavaScript and defer the New thread screen Oct 5, 2026
@ymichael
ymichael force-pushed the bb/reduce-workspace-route-bundle-thr_pw3t4r3mvx branch from a34117d to 5af159b Compare October 5, 2026 17:25
@ymichael ymichael changed the title Reduce app JavaScript and defer the New thread screen Remove unused Tiptap code and restore workspace bundle budgets Oct 5, 2026
@ymichael
ymichael force-pushed the bb/reduce-workspace-route-bundle-thr_pw3t4r3mvx branch from 5af159b to e0fc2e1 Compare October 5, 2026 17:45
@ymichael
ymichael merged commit 3a1fa5a into main Oct 5, 2026
34 checks passed
@ymichael
ymichael deleted the bb/reduce-workspace-route-bundle-thr_pw3t4r3mvx branch October 5, 2026 17:59
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]>
ymichael added a commit that referenced this pull request Oct 5, 2026
The content-position hold in the bottom-anchored scroll body and the
windowed timeline's straddling-row scroll rule add about 1 KiB raw
(0.2 KiB brotli) to the SplitWorkspaceRoute closure, which #4907 left at
its limit. Raise only the raw limit by 1.5 KiB and record why.

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