Skip to content

feat(query): filter bugs by ID or prefix - #1666

Open
Hrushikesh-ramilla wants to merge 1 commit into
git-bug:trunkfrom
Hrushikesh-ramilla:feature/id-search
Open

Hrushikesh-ramilla wants to merge 1 commit into
git-bug:trunkfrom
Hrushikesh-ramilla:feature/id-search

Conversation

@Hrushikesh-ramilla

@Hrushikesh-ramilla Hrushikesh-ramilla commented Oct 4, 2026 •

Copy link
Copy Markdown

Summary

Add an id: qualifier to the shared query language, so users can find a bug by the ID shown in the terminal UI or referenced in a commit message.

Fixes #1144.

Examples:

id:265e26f
id:265e26f status:open
id:265e26f id:9ed1af4

Full IDs and prefixes use the existing entity prefix matcher. ID values are case insensitive. Repeated id: qualifiers match any specified ID, while filters of other kinds still apply. An empty ID is rejected, and prefixes matching multiple bugs return all matches. This does not change query behavior when id: is absent.

The terminal UI, command-line queries and the web API share this parser and cache matcher; no new UI controls or API schema changes are added. Usage documentation describes the qualifier and its combination rules.

Validation

Run by Codex on Windows with Go 1.26.1:

  • New parser regression cases failed with unknown qualifier "id" before implementation and pass afterward.
  • go test ./query -count=1 passes.
  • go test ./query ./cache -run 'TestParse|TestIdQuery|TestTitleFilter|^TestCache$' -count=1 passes. This covers prefix/full ID matching, uppercase values, non-prefix and unknown values, repeated IDs, existing filters and real repository queries with full-text search.
  • go vet ./query ./cache passes.
  • go test ./commands/bug ./api/graphql/resolvers -run '^TestBug_Format$|^TestQueries$' -count=1 -timeout=90s passes for the CLI format tests and compiles the resolver package, which has no test files. This is not a claim that GraphQL runtime tests were run.
  • go build of the application passes, without the optional embedded web UI.
  • Seven real command-line checks in an isolated repository pass: full ID, short prefix, uppercase prefix, unknown ID, multiple IDs, and filtering a closed bug by open/closed status.
  • Go formatting and git diff --check pass.

The query/cache test run started before edits also completed successfully. The complete project suite, browser UI and interactive terminal keypresses were not tested in this environment.

AI disclosure

Contributor: Hrushikesh-ramilla. Codex generated the implementation and tests and ran the validation listed above. No personal testing by the contributor is claimed here.

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable regression was established.

Summary

Adds a case-insensitive id: qualifier to the shared query parser and cache matcher.

  • Supports full IDs and prefixes, repeated IDs, and combinations with existing filters.
  • Adds parser and cache tests and documents the qualifier.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["CLI / terminal UI / web API query"] --> B["Shared query parser"]
  B --> C["Filters.Id"]
  C --> D["Cache matcher"]
  D --> E["Matching bug IDs"]
Loading

Reviews (1) · Last reviewed commit: "feat(query): filter bugs by full ID or p..."

This branch has not been deployed

No deployments
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.

TUI: Add a new search filter to search by ID

1 participant