tfrere HF Staff Cursor commited on
Commit
196fa01
·
1 Parent(s): 07a94f1

refactor(api): scope dedup per route to surface JS-only same-name apps

Browse files

Move the name-based dedup out of `fetchAppsFromHF` so each route can
apply its own policy on top of a single raw cache:

- `/api/apps` (showcase site) keeps the original global dedup, so
Python forks of `reachy_mini_conversation_app` etc. still collapse
to a single tile.
- `/api/js-apps` (mobile shell) now dedups within the JS subset only,
so a JS Space like `tfrere/emotions` no longer loses a name fight
against an unrelated Python Space (`RemiFabre/emotions`) and
surfaces correctly in the store.

`getApps()` is renamed to `getRawApps()` to make the cache contract
explicit, and `dedupAppsByName` is shared between `dedupGlobalApps`
and `dedupJsApps` so the policies can diverge later without churn.

Co-authored-by: Cursor <cursoragent@cursor.com>

1 file changed +91 -50
server/index.js+91-50