Problem
The / Substring Filter matches only a PR's title and author
(filter_matches in src/app/pr_list.rs:58 — pr.title and pr.author). The
v1 PRD (#1, user story 11) specifies full-text search across title, description,
author, reviewers, labels, PR number (e.g. #5543), and changed file paths.
Today a user can't narrow by label, reviewer, PR number, or a path that appears
in the diff.
Approach
Broaden filter_matches to test the needle against, in addition to title/author:
- labels —
pr.labels (already on the model; rendered in the summary panel).
- PR number — match
#<number> and bare <number> against pr.number.
- reviewers / requested reviewers — from enrichment when present.
- description (body) — when the PR body is loaded.
- changed file paths — when files enrichment is present.
Fields that depend on enrichment (body, reviewers, files) only contribute once
that data has streamed in; the filter must stay a cheap synchronous predicate
over already-fetched data (no fetch triggered by typing). Keep it
case-insensitive with the needle lowercased once per relayout, as today.
Consider whether a bare numeric needle should match PR numbers loosely
(substring) or only as an exact #N token — exact-token avoids "1" matching
every PR containing "1" in a path. Recommend: #N exact-token match for numbers,
substring for everything else.
Acceptance Criteria
References
Problem
The
/Substring Filter matches only a PR's title and author(
filter_matchesinsrc/app/pr_list.rs:58—pr.titleandpr.author). Thev1 PRD (#1, user story 11) specifies full-text search across title, description,
author, reviewers, labels, PR number (e.g.
#5543), and changed file paths.Today a user can't narrow by label, reviewer, PR number, or a path that appears
in the diff.
Approach
Broaden
filter_matchesto test the needle against, in addition to title/author:pr.labels(already on the model; rendered in the summary panel).#<number>and bare<number>againstpr.number.Fields that depend on enrichment (body, reviewers, files) only contribute once
that data has streamed in; the filter must stay a cheap synchronous predicate
over already-fetched data (no fetch triggered by typing). Keep it
case-insensitive with the needle lowercased once per relayout, as today.
Consider whether a bare numeric needle should match PR numbers loosely
(substring) or only as an exact
#Ntoken — exact-token avoids "1" matchingevery PR containing "1" in a path. Recommend:
#Nexact-token match for numbers,substring for everything else.
Acceptance Criteria
/filter narrows by label, reviewer/requested-reviewer, PR number, bodytext, and changed file path, in addition to title and author.
triggers a fetch.
#5543matches PR 5543; numeric matching does not spuriously match numbersembedded in unrelated fields (per the chosen number-match rule).
filter_matchesstays a pure predicate; table-driven tests cover each newfield plus the no-match and empty-needle cases.
References
src/app/pr_list.rs:58(filter_matches), CONTEXT.md — Substring Filter,Open PR List.