Skip to content

Show install counts consistently across the plugin store and marketplace - #4791

Merged
brsbl merged 6 commits into
mainfrom
bb/format-low-install-counts-more-readably-thr_b9xfg54xyy
Oct 3, 2026
Merged

brsbl merged 6 commits into
mainfrom
bb/format-low-install-counts-more-readably-thr_b9xfg54xyy

Conversation

@brsbl

@brsbl brsbl commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Install badges followed different rules in the in-app plugin store and on getbb.app. Built-in plugins showed meaningless counts like ✓ 1, small community counts showed as raw numbers, and plugins with no data read "New" on the web but showed a bare icon in the app.

What changed

The plugin store, getbb.app, and bb plugin search now use one rule, defined once in @bb/domain/plugin-install-badge:

Plugin Badge
Installed with bb by default "Built in" (no icon, no count)
25+ installs, including opt-in official plugins like Tasks The count
Under 25, published in the last 30 days Blue "New" on cards
Under 25, older than 30 days The real count
  • Detail pages on both surfaces show only real counts, never "New".
  • bb plugin search fills its Installs column from the same rule. The bb plugin guide documents it.
  • New & notable cards on getbb.app no longer repeat a "New" badge.
  • The marketplace route stamps its render time in loader data, so server and hydrated badges always match.
  • Catalog search results gain an additive installedByDefault field, taken from the bundled registry's autoInstall.
  • With an older server, the field defaults to false, so the app shows counts instead of "Built in".
  • Server-to-daemon wire messages are unchanged.
  • deploy-web.yml now also redeploys when the shared rule changes.
  • Add built-in plugin pages to the public marketplace #4608 should show "Built in" only for always-on plugins to match this rule.

Screenshots

Before: a8973c67c7 (main) · After: 1ea1321069, except the web detail row, captured from 2ddee8568f · Captured at 2× with live getbb.app marketplace data and install stats. The other rows look the same on the final head.

In-app plugin store

Screen / state Viewport Before After
BB Official + New & notable shelves Desktop · 1440×900 Before: in-app official shelf After: in-app official shelf
BB Official shelf Mobile · 390×844 Before: in-app official shelf, mobile After: in-app official shelf, mobile
BB Official "View all": opt-in official plugins Desktop · 1440×900 Before: opt-in official plugins After: opt-in official plugins
Search "sidebar": mixed counts Desktop · 1440×900 Before: in-app search After: in-app search
Low-count card (Radar Sidebar, 3 installs) Mobile · 390×844 Before: in-app low-count card After: in-app low-count card
Detail, low-count plugin Desktop · 1440×900 Before: in-app detail After: in-app detail

getbb.app marketplace

Screen / state Viewport Before After
Landing: New & notable + category shelves Desktop · 1440×900 Before: web landing After: web landing
Landing: New & notable Mobile · 390×844 Before: web landing, mobile After: web landing, mobile
Category: Thread Management Desktop · 1440×900 Before: web category After: web category
Category: Thread Management Mobile · 390×844 Before: web category, mobile After: web category, mobile
Detail, low-count plugin Desktop · 1440×900 Before: web detail After: web detail

The hero banner on the in-app detail shots rotates on its own, so the two shots caught different slides.

How you verified

  • Remote CI passed on the final head 117b357 (31 passed, 3 skipped).
  • A CLI test checks that bb plugin search prints "Built in" and "New".
  • plugin-install-badge.test.ts covers each branch of the shared rule.
  • public-marketplace.test.tsx checks that badges follow the route's render time and that detail pages show no "New".
  • A server test checks that installedByDefault matches autoInstall for every bundled plugin.
  • Chrome for Testing (headless, bb Browser Automation) at 1440×900 and 390×844: badges render as tabled on both surfaces.
  • Safari 26.5.2 (macOS, via safaridriver): server and hydrated badges matched on 89 cards, with no console errors.
  • Safari: hard reload and client navigation kept the same badges, and the detail page shows no "New".

Follow-ups

  • A future-dated publishedAt keeps a low-count plugin "New" until 30 days after that date. The fix belongs in plugin-install-badge.ts.

BB-Thread-ID: thr_b9xfg54xyy

AGENT GENERATED

🤖 Generated with Claude Code

Plugins installed with bb show "Built in". Other plugins show their
install count once it reaches 25; below that they show "New" for 30
days after publishing, then the real count. Drops the redundant "New"
badge from New & notable cards on getbb.app.

Adds installedByDefault to plugin catalog search results so the app can
tell auto-installed built-ins from opt-in official plugins.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T02:14:45.833124Z 1ea1321 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ea1321069

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +61 to +62
if (now - publishedAt < PLUGIN_NEW_WINDOW_MS) {
return { display: "New", accessibleLabel: "New", tone: "new" };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude future publication dates from the New window

When a third-party marketplace supplies a valid ISO publishedAt timestamp in the future—because of clock skew or an incorrect year—now - publishedAt is negative and therefore always satisfies this comparison. Such a low-count plugin remains labeled “New” until 30 days after that future timestamp instead of being treated as outside the preceding 30-day window. Require the elapsed value to be nonnegative here and in the mirrored web helper.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changing this in this PR; I've noted it as a follow-up. The only effect is cosmetic: a plugin with a future-dated publishedAt shows "New" a bit longer. Causing it takes control of a marketplace manifest. The bb-community catalog is reviewed through PRs, and a third-party marketplace is one the user chose to add. The rule now lives in one place, packages/domain/src/plugin-install-badge.ts, so a follow-up fix there covers the store, getbb.app, and the CLI at once.

brsbl and others added 4 commits October 2, 2026 19:29
Moves the 25-install and 30-day rule into @bb/domain so the plugin
store and getbb.app cannot drift. The marketplace route stamps its
render time in loader data so server and hydrated badges always agree,
and the web detail page drops "New" to match the in-app Install button.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-counts-more-readably-thr_b9xfg54xyy

# Conflicts:
#	apps/web/src/marketplace/public-marketplace.tsx
The Installs column now reads Built in, New, or the count, matching the
plugin store and getbb.app. The plugin guide documents the rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brsbl
brsbl merged commit db9777f into main Oct 3, 2026
34 checks passed
@brsbl
brsbl deleted the bb/format-low-install-counts-more-readably-thr_b9xfg54xyy branch October 3, 2026 04:04
brsbl added a commit that referenced this pull request Oct 3, 2026
Resolves the conflicts with #4786 (icons moved to marketplace-icons.ts)
and #4791 (shared install badge). Only plugins installed by default now
show "Built in"; opt-in official plugins like Tasks show their install
counts, matching the in-app plugin store.

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