Skip to content

Sort Browse Plugins by install count, and default to it - #2458

Merged
andrewkchan merged 1 commit into
get-bb:mainfrom
andrewkchan:browse-plugins-sort-by-installs
Aug 26, 2026
Merged

Sort Browse Plugins by install count, and default to it#2458
andrewkchan merged 1 commit into
get-bb:mainfrom
andrewkchan:browse-plugins-sort-by-installs

Conversation

@andrewkchan

@andrewkchan andrewkchan commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

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:

  • 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

## 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
@andrewkchan
andrewkchan merged commit 33a727c into get-bb:main Aug 26, 2026
13 checks passed
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