fix(registry): stop matching reverse-DNS namespace in search - #2567
Conversation
Almost every catalog entry is named `io.github.stacklok/...`, so searching for "github" matched the namespace on every server and the filter looked broken. Search the short name, title, description, and tags instead. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Fixes Registry search behavior so it no longer matches reverse-DNS namespace prefixes (e.g. io.github.stacklok/...), which previously caused common terms like github to match most of the catalog and appear broken.
Changes:
- Update Registry filtering to search by short name (segment after the last
/) plus title, description, and tags. - Add regression tests for namespace false-positives and tag matching in Registry search.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| renderer/src/routes/(registry)/-registry.route.tsx | Adjusts search filtering fields to use short-name + user-visible fields (title/description/tags) instead of full namespaced name. |
| renderer/src/routes/tests/registry.test.tsx | Adds/extends regression tests covering namespaced search false-positives, short-name searching, and tag searching. |
Address review feedback: derive short name with lastIndexOf, and make the short-name regression test match only via the name segment (not title). Co-authored-by: Cursor <cursoragent@cursor.com>
Pass the search term into filterFields so registry search can include the full namespaced name only when the query contains `/`. Soften the tags comment and match tags as separate fields. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed the follow-up review points in 1568396:
Left the pre-existing |
Summary
io.github.stacklok/…. Searching for common terms such asgithubtherefore matched (almost) the entire catalog and looked broken./), plus title, description, and tags — the fields users actually see.Test plan
github— only GitHub-related servers remain (not the whole catalog)fetch— findsio.github.stacklok/fetchvia short namepnpm exec vitest run renderer/src/routes/__tests__/registry.test.tsx