feat(repo): enhance PR discovery with persistent shareable search filters#1033
Conversation
b6fafce to
110eddf
Compare
|
Hi @ventura-oss Rebased onto the latest origin/test and force-pushed the branch. The PR diff should now be limited to the PR-table search/filter changes only. |
4c1ad51 to
141a9e1
Compare
|
fix conflicts |
141a9e1 to
ed4c852
Compare
|
Hi @anderdc fixed conflicts |
anderdc
left a comment
There was a problem hiding this comment.
Scope this down to the search feature, and tighten a few spots before merge.
Drop — unrelated to PR-table search:
- The useMemo/useCallback wrapping of
columns(RepositoryPRsTable.tsx:364),filterButtons(:315), andhandleSort(:249) —columnscontent is unchanged, it's pure relocation/re-indent churn. ThegetRepoPrAuthor/getRepoPrGithubIdmodule consts only exist to feed those memo deps; they go too. - The
alpha(...)/TEXT_OPACITY→'text.tertiary'swap in the empty-state message (RepositoryPRsTable.tsx:757) — unrelated theme cleanup.
Fix:
- RepositoryPRsTable.tsx:198-212 — the pipeline hand-rolls the author filter (
byStatus.filter((pr) => pr.author === authorFilter), :207), and again inprsForStatusTabCounts(:186).filterPrsalready takes anauthoroption — passauthor: authorFilter === AUTHOR_FILTER_ALL ? null : authorFilterand drop both manual.filtercalls. - RepositoryPRsTable.tsx:209-211 — committed and draft terms run as two separate
filterPrsBySearchTermspasses. Collapse to one:filterPrsBySearchTerms(byAuthor, [...committedPrQRaw, draftSearch], true)— it already trims and skips empty terms. - RepositoryPRsTable.tsx:199 —
filterPrs(allPRs ?? [], { statusFilter: filter, searchQuery: '', includeNumber: true }):allPRsis always an array, and withsearchQuery: ''the function returns beforeincludeNumberis read. Reduce tofilterPrs(allPRs, { statusFilter: filter }). - RepositoryPRsTable.tsx:68-74 — every member of
REPO_PR_TABLE(bodyMaxHeight,titleCellMaxWidth,chipLabelMaxWidth,searchMaxWidthSm,scrollbarGutter) is referenced exactly once. Inline each value at its use site and drop the object. KeepchipLabelSx— that one is genuinely shared. - prTable.ts:70-76 —
SCORE_OP_MAPis an identity map and theop === undefinedbranch inparsePrSearchQueryis unreachable: the regex capture(?:>=|<=|>|<|=)already constrainsm[1]to those five operators. Drop the map; castm[1]directly.
Minor: SCORE_TOKEN_RE (prTable.ts:78) is a /g regex used for a single .exec, which is why the manual lastIndex reset is needed — a non-global regex removes that footgun.
|
Fix conflicts. |
ed4c852 to
c36418d
Compare
|
Hi @anderdc Addressed all requested search-scope cleanup items, removed the unrelated memo/theme churn, simplified the filtering/search pipeline, inlined one-off table constants, cleaned up the score query parsing logic, and resolved the remaining merge conflicts. |
bec286e to
49fa3cc
Compare
…te matching functionality
…y in RepositoryPRsTable component
49fa3cc to
b045dd5
Compare
|
Hi @anderdc rebased and resolved conflicts
|
anderdc
left a comment
There was a problem hiding this comment.
Scoping this down — the search box is worth having, but most of the diff is bolt-on the table doesn't need.
Keep:
- A single-term, live search box — filters the PR table by title, repository, PR number, and merged date as you type. Local component state, no URL params.
- The author-scoped status tab counts (All/Open/Merged/Closed badges narrowing to the selected author).
Drop:
- Multi-term pinning — the Enter-to-pin behavior, the
prQURL params, and the "Active filters:" chip row. - The
score >/>=/<query DSL —parsePrSearchQuery,ScorePredicate,matchesScorePredicate,matchesPrSearchTerm,filterPrsBySearchTerms,formatScorePredicateLabel, and the unusedscoreMatchfield. - The
prStatusURL-param migration — leave the status filter onuseSessionStoredState. - "Clear all" and the "N of M" header count — both only exist to service the pinning.
- The relocation of
handleSortand theif (isLoading)early-return — move them back, it's pure churn.
…ment in RepositoryPRsTable component
|
Hi @anderdc Scoped this down as requested and removed the extra search/filter complexity. Also resolved conflicts and cleaned up the remaining churn. |

Summary
Adds URL-backed search to the repository PR table with multi-term AND filtering and persistent, shareable query state.
Users
Product
Engineering
src/utils/prTable.tsRepositoryPRsTable.tsxType of Change
Screenshots
Before
After
gorec-2026-05-11-05-51-53.webm
Checklist
npm run formatandnpm run lint:fixhave been runnpm run buildpasses