Skip to content

feat(watchlist): add per-source filter chips to Pull Requests tab#1072

Open
Khaostica wants to merge 2 commits into
entrius:testfrom
Khaostica:feat/watchlist-pr-scope-filter
Open

feat(watchlist): add per-source filter chips to Pull Requests tab#1072
Khaostica wants to merge 2 commits into
entrius:testfrom
Khaostica:feat/watchlist-pr-scope-filter

Conversation

@Khaostica
Copy link
Copy Markdown

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

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Screenshots

Before:
image

After:
imageimage

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

  • New components are modularized/separated where sensible
  • Uses predefined theme (e.g. no hardcoded colors)
  • Responsive/mobile checked
  • Tested against the test API
  • npm run format and npm run lint:fix have been run
  • npm run build passes
  • Screenshots included for any UI/visual changes

@xiao-xiao-mao xiao-xiao-mao Bot added the enhancement New feature or request label May 12, 2026
@ventura-oss
Copy link
Copy Markdown
Contributor

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.
@Khaostica Khaostica force-pushed the feat/watchlist-pr-scope-filter branch from 0be9a38 to 5ec40e3 Compare May 13, 2026 14:47
@ventura-oss
Copy link
Copy Markdown
Contributor

Auto-skipping this review pass: no CI checks have run on this branch (no build / format from Actions). Other PRs from this contributor are in the same state, so this looks like workflow runs awaiting maintainer approval. Once approved and CI is green, this PR will be eligible for visual review again.

@Khaostica
Copy link
Copy Markdown
Author

@anderdc @LandynDev
Could a maintainer approve the workflow runs? CI is sitting in action_required and the review bot is skipping until it goes green.

Copy link
Copy Markdown
Collaborator

@anderdc anderdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@Khaostica
Copy link
Copy Markdown
Author

@anderdc
Done — d28c72f removes the test file and drops the export. Let me know if anything else needs changing.

@Khaostica Khaostica requested a review from anderdc May 16, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: all PRs are displayed in Pull Requests tab in watchlist

3 participants