Sort Browse Plugins by install count, and default to it - #2458
Merged
andrewkchan merged 1 commit intoAug 26, 2026
Conversation
## What was wrong get-bb#2282 published install counts on every Browse card, but the sort menu still offered one option, "Plugin name". The store's only popularity signal was per-card text the user had to scan for, and the grid opened alphabetically — so a widely adopted plugin appeared wherever its name landed. ## What changed `apps/app/src/components/plugin/management/BrowsePluginsTab.tsx`: - The sort menu gains an "Installs" option, and Browse now opens on it, descending: a store's first screen should be the plugins people actually install. Alphabetical stays one click away. - `groupByPublisher` takes the mode. Install order sorts numerically, with entries the sidecar does not name sinking to the bottom in both directions — an unpublished count is unknown, not zero — and names breaking ties so equally installed plugins stay stable. - Only the curated marketplace publishes counts, so a catalog with none disables the option and falls back to alphabetical *ascending*, rather than inheriting the count sort's descending direction and showing an unexplained Z→A grid. `changeSort` compares against the mode on screen, so the checked row always toggles direction. No wire, CLI, or doc surface changes: this is a view affordance over data the API already returns, and `bb plugin search` already prints an Installs column (`apps/cli/src/commands/plugin.ts:918`). ## How you verified Two tests in `BrowsePluginsTab.test.tsx`, both failing before this change: install-count ordering (default mode and direction on first render, the uncounted entry pinned last in both directions, and the reset to ascending when switching back to names), and the disabled option plus alphabetical fallback when no listing publishes a count. - `pnpm exec turbo run test --filter=@bb/app -- BrowsePluginsTab` — 13/13 - `pnpm exec turbo run typecheck --filter=@bb/app` — clean > AGENT GENERATED
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
Now you can sort plugins in the browse page by install count (default)
What was wrong
#2282 published install counts on every Browse card, but the sort menu
still offered one option, "Plugin name". The store's only popularity
signal was per-card text the user had to scan for, and the grid opened
alphabetically — so a widely adopted plugin appeared wherever its name
landed.
What changed
apps/app/src/components/plugin/management/BrowsePluginsTab.tsx:descending: a store's first screen should be the plugins people
actually install. Alphabetical stays one click away.
groupByPublishertakes the mode. Install order sorts numerically,with entries the sidecar does not name sinking to the bottom in both
directions — an unpublished count is unknown, not zero — and names
breaking ties so equally installed plugins stay stable.
disables the option and falls back to alphabetical ascending, rather
than inheriting the count sort's descending direction and showing an
unexplained Z→A grid.
changeSortcompares against the mode onscreen, so the checked row always toggles direction.
No wire, CLI, or doc surface changes: this is a view affordance over
data the API already returns, and
bb plugin searchalready prints anInstalls column (
apps/cli/src/commands/plugin.ts:918).How you verified
Two tests in
BrowsePluginsTab.test.tsx, both failing before thischange: install-count ordering (default mode and direction on first
render, the uncounted entry pinned last in both directions, and the
reset to ascending when switching back to names), and the disabled
option plus alphabetical fallback when no listing publishes a count.
pnpm exec turbo run test --filter=@bb/app -- BrowsePluginsTab— 13/13pnpm exec turbo run typecheck --filter=@bb/app— clean