Repository navigation
Conversation
ymichael
force-pushed
the
bb/plugin-cache-grows-to-many-gb-duplicated-node-mo-thr_9uskkfyrd8
branch
4 times, most recently
from
October 6, 2026 21:42
3405e7c to
9f12956
Compare
…, add prune Git-installed plugins kept every version's full clone, including .git and a complete node_modules. Removal deleted nothing and updates kept the replaced version for 7 days, both collected only by a later startup GC, and there was no way to clean up. Plugins scaffolded before SDK 0.5.16 also carry @hugeicons/* (over 100 MB per copy) in dependencies. - Verify the checked-out commit inside cloneGitCommit, then delete the clone's .git before validation and hashing. New installs always record their ref kind, so only pre-existing Phase 1 checkouts are read for ref evidence. - `bb plugin remove` deletes the plugin's cached versions immediately, matching what its help and the guides already promised. - A successful update deletes the plugin's replaced versions once activation has stabilized. The update's state snapshot keeps its 7-day retention. - Add `bb plugin prune [--dry-run]`, `POST /plugins/cache/prune`, `sdk.plugins.experimental_pruneCache`, and a "Clean up plugin cache" command-palette entry. Prune deletes every version no installed plugin uses and unrecorded cache directories, under the registration lock. It keeps active versions, pending rollbacks, installed roots, and staging directories. - node_modules stays: pre-1.0, every SDK version change makes bb rebuild a git plugin's server from source, and that build resolves dependencies from it. - Point plugin authors at the host icon wrapper and how to drop hugeicons. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/plugin-cache-grows-to-many-gb-duplicated-node-mo-thr_9uskkfyrd8
branch
from
October 6, 2026 23:06
9ffe8c5 to
b9aad18
Compare
ymichael
deleted the
bb/plugin-cache-grows-to-many-gb-duplicated-node-mo-thr_9uskkfyrd8
branch
October 7, 2026 02:34
Closed
2 tasks done
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.
Human comments
What was wrong
Git-installed plugins retained clone history and obsolete copies of their dependencies. Uninstall left artifact-backed installs on disk, successful updates retained the replaced version for seven days, and users had no explicit cleanup command.
Manual QA also exposed two failures in the install/update journey. Toast swipe handling captured mouse pointers on links, preventing navigation. Plugin updates held their HTTP request open through preparation and a 30-second startup-error observation window, exceeding Connect's 30-second response-header deadline even when activation succeeded.
What changed
.gitfrom newly materialized Git plugin artifacts. Reclaim replaced artifacts after a successful update and unused artifacts after uninstall; preserve active, overlapping, shared, and rollback-protected paths.bb plugin prune [--dry-run],sdk.plugins.experimental_pruneCache, and the app cleanup command with reclaimed-byte reporting. Keep installed dependencies required for rebuilds.plugins.applyUpdatepolls short requests while retaining its existing result contract. Addexperimental_startUpdate,experimental_updateJobs.list/get,bb plugin update --no-wait, andbb plugin update-jobs [job-id] [--json]. Raw HTTP callers opt in withPrefer: respond-async; legacy callers retain synchronous responses.How you verified
--no-waitand job inspectionpnpm start:worktree --dryrunpassed; isolated QA server rebuilt and running--no-waitreturned a job ID; a later healthy update completed. Counter increment and refresh worked afterwardLive browser automation used local Chromium against the isolated source app. The user reproduced the original 504 through authenticated remote Chrome; that authenticated session was not automated. Native desktop/iOS/Safari and server-restart job durability are not claimed as verified.
Plugin job notifications now use generic titles, plain display names, and explicit actions. Successful installs/updates open the registered plugin page (or show View details when there is no page); failures expose Details. Retry uses the same asynchronous job flow. The server resolves update display names from the plugin manifest. The 30-second activation safeguard is unchanged.
Toast follow-up verification: 23 focused UI tests and 29 server update tests passed, plus app/server typechecks. The retry regression fails on the prior implementation because Retry stays busy after job acceptance and passes with the shared flow. Live Chromium verified progress after refresh, rollback, retry, the success action, and saved counter state.
The shared Sonner patch now remeasures custom content when it changes. Live repro measured a 68px container around a 92px success card; after the fix both measure 92px and the first mouse click opens the plugin. Install success navigation was also verified after a source-CLI install.