Visitar URL original
feat(website): add multi-select exclude filters, message search, and First Seen sorting to linter by jess-lowe · Pull Request #6335 · google/osv.dev · GitHub
Skip to content

feat(website): add multi-select exclude filters, message search, and First Seen sorting to linter - #6335

Open
jess-lowe wants to merge 2 commits into
google:masterfrom
jess-lowe:feat/linter-filtering
Open

jess-lowe wants to merge 2 commits into
google:masterfrom
jess-lowe:feat/linter-filtering

Conversation

@jess-lowe

@jess-lowe jess-lowe commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Builds on #6334 to add multi-select/exclude filtering, finding-message search, First Seen regression windows, and multi-column sorting to /linter.

Changes

Backend (go/internal/website/, go/internal/database/datastore/, go/internal/models/, go/cmd/website-devserver/)

  • ListFirstSeen projection scan: Extend ImportFindingsStore, datastore.ImportFindingsStore, website-devserver.DevStore, and linterIndex.triggerTimestampEnrichment to load first_seen Unix timestamps alongside last_attempt using typed single-property Datastore projections in parallel (errgroup) without composite indexes or loading full findings blobs.
  • linter_index.go, linter.go:
    • Multi-select & Include/Exclude mode: Support comma-separated source (source_mode=include|exclude), granular code, and category (cat, rule_mode=include|exclude) using canonical unique.Handle[string] matching while keeping default queries on the O(pageSize) fast path.
    • Bug ID & Finding Message search: Match q against both Bug ID and finding Message text.
    • First Seen regression windows: Support since=24h|7d|30d|90d or YYYY-MM-DD cutoffs against ImportFinding.FirstSeen (skipped safely while background Datastore timestamp enrichment is still warming).
    • Multi-column sorting: Support sort=last_attempt|first_seen|bug_id|finding_count with order=asc|desc.
  • linter_test.go, import_finding_test.go, store_test.go: Add unit tests for ListFirstSeen, multi-select include/exclude, category filters, UTF-8 message search, First Seen cutoffs, and multi-column sorting.

Frontend (website/frontend3/)

  • src/templates/linter/index.html, src/linter.js, src/linter.scss:
    • Home Database & Rule/Category dropdowns: Multi-select checkboxes, Include / Exclude toggle, inline filter search, and category checkboxes (SCH, REC, RNG, PKG).
    • First Seen dropdown: Quick presets (24h, 7d, 30d, 90d) with automatic refresh retry and syncing indicator while background timestamps finish loading.
    • Table & URL state: 5-column sortable table (Bug ID, Home DB, Findings, First Seen, Modified), removable active filter chips + Clear all, page-size selector (15/25/50/100), legacy ?finding= normalization, and full URL state sync.

Testing

  • cd go && go test -race -count=1 ./internal/website/... ./internal/gcs/... ./cmd/website/... ./cmd/website-devserver/... passed.
  • cd tools/apitester && OSV_API_BASE_URL=api.test.osv.dev go test -count=1 ./... passed.
  • poetry run tools/lint_and_format.sh passed with 0 issues.

@jess-lowe
jess-lowe force-pushed the feat/linter-filtering branch from 78e777f to 7c1582c Compare November 11, 2026 02:26
@jess-lowe
jess-lowe marked this pull request as draft November 11, 2026 02:26
@jess-lowe
jess-lowe force-pushed the feat/linter-filtering branch 2 times, most recently from 4ec4119 to 11fe23a Compare November 12, 2026 03:20
@jess-lowe
jess-lowe marked this pull request as ready for review November 12, 2026 03:26
@jess-lowe
jess-lowe force-pushed the feat/linter-filtering branch from 11fe23a to a00c141 Compare November 12, 2026 03:31
@jess-lowe
jess-lowe requested review from a team and michaelkedar November 12, 2026 03:46
@jess-lowe
jess-lowe force-pushed the feat/linter-filtering branch from a00c141 to 29f9b7a Compare November 12, 2026 04:00
…s, and expand tests

# Conflicts:
#	website/frontend3/src/linter.scss

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants