Repository navigation
Serve the catalog's install order publicly for the website - #1234
Open
helpcodeai wants to merge 2 commits into
Open
helpcodeai wants to merge 2 commits into
helpcodeai wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, likeGET /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-Controlhandling as the public catalog.AdaptersService.installRanking(): one aggregate query (about 130 ms on the Cloud data, 64 adapters ranked; theEXISTSontool_invocationsuses its(connector_id, created_at)index), cached for six hours; on a failed query it serves the last good ranking, or an empty one.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
Testing
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 (unrelatedeslint --fixrewrites reverted).Checklist
npm test)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.