Repository navigation
Show install counts consistently across the plugin store and marketplace - #4791
Conversation
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]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 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".
| if (now - publishedAt < PLUGIN_NEW_WINDOW_MS) { | ||
| return { display: "New", accessibleLabel: "New", tone: "new" }; |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
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]>
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 searchnow use one rule, defined once in@bb/domain/plugin-install-badge:bb plugin searchfills its Installs column from the same rule. The bb plugin guide documents it.installedByDefaultfield, taken from the bundled registry'sautoInstall.false, so the app shows counts instead of "Built in".deploy-web.ymlnow also redeploys when the shared rule changes.Screenshots
Before:
a8973c67c7(main) · After:1ea1321069, except the web detail row, captured from2ddee8568f· 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
getbb.app marketplace
The hero banner on the in-app detail shots rotates on its own, so the two shots caught different slides.
How you verified
117b357(31 passed, 3 skipped).bb plugin searchprints "Built in" and "New".plugin-install-badge.test.tscovers each branch of the shared rule.public-marketplace.test.tsxchecks that badges follow the route's render time and that detail pages show no "New".installedByDefaultmatchesautoInstallfor every bundled plugin.Follow-ups
publishedAtkeeps a low-count plugin "New" until 30 days after that date. The fix belongs inplugin-install-badge.ts.BB-Thread-ID: thr_b9xfg54xyy
🤖 Generated with Claude Code