Skip to content

feat(compare): filter the ranking table by repository name#107

Open
renatoguimaraescb wants to merge 1 commit into
mainfrom
feat/compare-repo-filter
Open

feat(compare): filter the ranking table by repository name#107
renatoguimaraescb wants to merge 1 commit into
mainfrom
feat/compare-repo-filter

Conversation

@renatoguimaraescb

Copy link
Copy Markdown
Contributor

Summary

Adds a repository-name filter to /[tenant]/compare, mirroring the search input already used on /[tenant]/repos. Once an org has more than 5 repos, a search box shows up in the Repository Ranking card header — typing narrows both the desktop table and the mobile card stack to repositories whose names contain the query.

Design notes

  • Same threshold as RepoList: input only appears when repos.length > 5 so small tenants stay uncluttered.
  • Best/worst highlights are NOT recomputed on filter. A repo at 60% stabilization still reads yellow even when it's the only match. The filter narrows the visible rows, not the comparison universe.
  • Sort and filter compose: filtered runs first, then sorted orders the matches. Both memoized.
  • No-matches state: when the query has no hits, the table/list is hidden and a "No repositories match '{query}'" message takes its place. The empty-state for "org has zero repos" stays untouched.
  • i18n: new keys compare.searchPlaceholder and compare.noMatches in en-US and pt-BR.

Test plan

  • tsc --noEmit — clean
  • npm run lint — 0 errors (preexisting warnings only)
  • npm run test — 212/212 passing
  • npm run build — production build OK
  • Open /clickbus/compare on a tenant with > 5 repos and confirm the input shows up; type a partial name and verify the table narrows
  • Confirm the input is hidden on a tenant with ≤ 5 repos
  • Type something that doesn't match anything and confirm the "No repositories match" message renders
  • Click a column header to sort; the order of the filtered rows should respect the sort

🤖 Generated with Claude Code

Mirrors the search input already used by the /[tenant]/repos list so the
compare table can be narrowed by name. The input only appears once the
org has more than five repos (same threshold as repo-list) to avoid
clutter on small tenants. Best/worst highlights still reference the full
set — the filter narrows the visible rows, not the comparison universe.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clickbus-iris Ready Ready Preview, Comment Jun 17, 2026 2:27pm

Request Review

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