Skip to content

fix(registry): stop matching reverse-DNS namespace in search - #2567

Merged
samuv merged 3 commits into
mainfrom
fix/registry-search-namespace
Aug 4, 2026
Merged

fix(registry): stop matching reverse-DNS namespace in search#2567
samuv merged 3 commits into
mainfrom
fix/registry-search-namespace

Conversation

@samuv

@samuv samuv commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Registry search matched the full server name, including reverse-DNS namespaces like io.github.stacklok/…. Searching for common terms such as github therefore matched (almost) the entire catalog and looked broken.
  • Filter on the short name (segment after the last /), plus title, description, and tags — the fields users actually see.
  • Add regression tests for the namespace false-positive, short-name matching, and tag matching (existing title-search coverage kept).

Test plan

  • Open Registry and type github — only GitHub-related servers remain (not the whole catalog)
  • Type fetch — finds io.github.stacklok/fetch via short name
  • Type a tag (e.g. a known catalog tag) — matching servers remain
  • pnpm exec vitest run renderer/src/routes/__tests__/registry.test.tsx

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>
Copilot AI lite review requested due to automatic review settings August 4, 2026 13:51
@github-actions github-actions Bot added the size/S label Aug 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread renderer/src/routes/__tests__/registry.test.tsx Outdated
Comment thread renderer/src/routes/__tests__/registry.test.tsx
Comment thread renderer/src/routes/(registry)/-registry.route.tsx Outdated
samuv and others added 2 commits August 4, 2026 15:58
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>
@samuv

samuv commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the follow-up review points in 1568396:

  1. Fully qualified names — conscious trade-off initially, but agreed it's worth supporting. filterFields now receives the search term; when the query contains /, we also match the full namespaced name so pasting e.g. io.github.stacklok/fetch works, without reintroducing the github false-positive for bare terms. Covered by a regression test.

  2. Comment — softened to "title/description (what users see) and tags (common search terms)".

  3. Tags — spread as separate fields instead of join(' ').

Left the pre-existing filterFields inline-closure / useMemo point alone as out of scope.

@samuv samuv self-assigned this Aug 4, 2026
@samuv
samuv merged commit ef2fbb3 into main Aug 4, 2026
21 checks passed
@samuv
samuv deleted the fix/registry-search-namespace branch August 4, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants