Skip to content

Serve the catalog's install order publicly for the website - #1234

Open
helpcodeai wants to merge 2 commits into
mainfrom
feat/public-install-ranking
Open

helpcodeai wants to merge 2 commits into
mainfrom
feat/public-install-ranking

Conversation

@helpcodeai

@helpcodeai helpcodeai commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The website orders its guides and its connector marketplace by newest guide and by tool count, which says nothing about which connectors bring people in. This adds a public endpoint with the catalog in install order, so the site can lead with the connectors most workspaces install. Only the order is served, never a count.

Changes

  • GET /api/adapters/ranking/installs (public, like GET /api/adapters): { "slugs": [...] }, listed adapters ordered by how many workspaces on this deployment have a connector installed from them that has answered at least one call (distinct workspaces, so five Odoo connectors in one workspace count once). Connectors installed and never used, such as the free starter pack many sign-ups add in one click, do not count. Same ETag / Cache-Control handling as the public catalog.
  • Adapters used by fewer than 3 workspaces are left out, so one tenant's choice never shows through; unlisted and (on Cloud) self-host-only adapters are left out too.
  • AdaptersService.installRanking(): one aggregate query (about 130 ms on the Cloud data, 64 adapters ranked; the EXISTS on tool_invocations uses its (connector_id, created_at) index), cached for six hours; on a failed query it serves the last good ranking, or an empty one.
  • Constants and the rationale in src/adapters/install-ranking.ts.

Cloud and self-hosted: the endpoint works the same in both modes and ranks from that deployment's own data; a fresh self-host returns an empty list. The website only reads Cloud's.

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Performance improvement
  • Other (describe below)

Testing

  • Added/updated unit tests
  • Tested manually (describe steps below)
  • No tests needed (explain why)

From packages/backend:

  • npx jest src/adapters/adapters.service.spec.ts src/adapters/adapters.controller.spec.ts: 2 suites, 82 tests passed. New: query order kept, only slugs, the successful-call condition and the 3-workspace threshold, unlisted/self-host-only/unknown slugs dropped, one query per cache window, last good ranking on failure.
  • npm test: 753 suites passed, 4 skipped; 22,432 tests passed, 1,550 skipped, 0 failed.
  • npx tsc --noEmit -p tsconfig.json: clean.
  • npm run lint: 0 errors, 11 pre-existing warnings (unrelated eslint --fix rewrites reverted).
  • The ranking query was run read-only against the Cloud database: 64 rows, 127 ms.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • I have updated documentation (if applicable)
  • All existing tests pass (npm test)
  • This PR has a descriptive title

Related Issues

Used by the website change in HelpCode-ai/anythingmcp-website (branch feat/guides-sorted-by-installs), which falls back to a built-in snapshot of the order until this is deployed.

@helpcodeai
helpcodeai requested a review from D3nisty as a code owner October 24, 2026 15:35
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