Skip to content

Trending: read the 30-day install numbers for every plugin - #609

Merged
ericzakariasson merged 1 commit into
mainfrom
fix-trending-30-day-installs
Dec 1, 2026
Merged

ericzakariasson merged 1 commit into
mainfrom
fix-trending-30-day-installs

Conversation

@ericzakariasson

Copy link
Copy Markdown
Member

Summary

The Trending tab has not been ranking by recent installs. On the live site only 2 of 10,390 plugins have a 30-day install count. Trending shows those two first and ranks everything else by its estimate from lifetime installs, which is close to the Top tab.

Cause: the database function behind the numbers returns a row for every active plugin, and the production Data API returns 100 rows per request. The site read the function in one request, so it only ever saw the first 100 plugins.

Fix: ask only for the plugins that have installs in the window, in a fixed order, and read them a page at a time. The plugin list is already read this way.

Live now With this change
Plugins with a 30-day count 2 893
First rows of Trending comparapix, garmlink, uizze, nextjs, front-end, expo nextjs, uizze, tripsy, remote-desktop-commander, uiux-design, front-end

Things to know

  • This is older than today's deploys. The previous deployment has the same order, and so does a screenshot of the live site from yesterday.
  • The numbers now take about nine requests to read instead of one. They are cached for an hour, as before.
  • If install counts change between two pages, a plugin at a page boundary can be read twice or missed until the next hourly refresh.

Testing

  • bunx biome ci . and bun run typecheck in apps/cursor pass.
  • Preview build, which reads the live data:
    • 893 plugins have a 30-day count.
    • Compared with the Grok Bot Directory's public list, which gets the same numbers inside the database: 742 plugins have the identical count and 6 differ by one install. The two reads were minutes apart.
    • The first rows of Trending follow the 30-day counts.
  • Not viewed in a browser, because the preview is behind company sign-in. The tab's code is unchanged; only the data it gets is different.

The function behind the numbers returns a row for every active plugin,
and the production Data API returns 100 rows per request. The site read
it in one request, so only the first 100 plugins had numbers. On the
live site 2 of 10,390 plugins had a 30-day count, and Trending ranked
everything else by its estimate from lifetime installs.

The query now asks only for the plugins that have installs in the
window and reads them a page at a time, the way the plugin list is read.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ericzakariasson
ericzakariasson merged commit 1916f50 into main Dec 1, 2026
1 check passed
@ericzakariasson
ericzakariasson deleted the fix-trending-30-day-installs branch December 1, 2026 17:55
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