feat(watchlist): add per-source filter chips to Pull Requests tab#1072
feat(watchlist): add per-source filter chips to Pull Requests tab#1072Khaostica wants to merge 2 commits into
Conversation
|
Skipping in this review pass — no CI checks reported yet (workflow waiting for maintainer approval). Will revisit once CI runs. |
Adds three multi-select chips — Starred / Miner / Repo — to the Watchlist > Pull Requests tab toolbar, matching the colors and labels of the existing source badges (entrius#789, entrius#799). All three are selected by default, preserving the auto-show behavior from entrius#789. Toggling chips narrows the list to PRs whose source set intersects the active selection. Selection is persisted to localStorage under gittensor.watchlist.prs-source-filter.v1 (JSON-serialized array of WatchedPRSource values, with all-on as the empty-storage fallback). Cross-tab sync via the storage event mirrors useWatchlist.ts. Closes entrius#969.
0be9a38 to
5ec40e3
Compare
|
Auto-skipping this review pass: no CI checks have run on this branch (no |
|
@anderdc @LandynDev |
anderdc
left a comment
There was a problem hiding this comment.
This repo doesn't carry a test suite — remove src/tests/usePrSourceFilter.test.ts. Once it's gone, drop the export on parseSourceFilter in usePrSourceFilter.ts; it's only referenced within that file.
…eFilter Removes the test file per maintainer feedback on entrius#1072 — the repo does not carry a test suite. With the test gone, parseSourceFilter is only used by readFromStorage in the same module, so drop the export.
|
@anderdc |
Summary
Adds three multi-select chips (Starred/Miner/Repo) to the Watchlist->Pull Requests tab toolbar, matching the colors and labels of the existing source badges (#789, #799). All three are selected by default, preserving the auto-show behavior from #789. Toggling chips on makes PRs with the chip's label visible, and PRs are only invisible if 0/3 of the chips with their label are toggled on (union-based).
Selection is persisted to localStorage under
gittensor.watchlist.prs-source-filter.v1 (JSON-serialized array of WatchedPRSource values, with all-on as the empty-storage fallback). Cross-tab sync via the storage event mirrors useWatchlist.ts.
Related Issues
Closes #969.
Type of Change
Screenshots
Before:

After:


Video
Note: The coloring is inaccurate in the recording, reference the above images for accurate coloring.
https://github.com/user-attachments/assets/94da9135-aad0-4a8e-85d7-484faf4cd94b
Checklist
npm run formatandnpm run lint:fixhave been runnpm run buildpasses