feat(plex): move Watch-state out of the rail into a toolbar pill

The "Show" (watch-state) filter leaves the left rail and becomes a FilterSelect
pill next to the item count, mirroring the feed's Watch-state control — a
top-level "what am I looking at" choice, always in reach, not buried in the rail.
It still emits a removable chip when non-default (same as the feed).
This commit is contained in:
2026-08-22 07:51:54 +02:00
parent 21c9b34540
commit b4984dc38b
2 changed files with 19 additions and 16 deletions
+1 -14
View File
@@ -27,7 +27,6 @@ type Props = {
onToggleCollapse: () => void;
};
const SHOW_OPTS = ["all", "unwatched", "in_progress", "watched"] as const;
const RATING_STEPS = [5, 6, 7, 8, 9];
const ADDED_OPTS = ["24h", "1w", "1m", "6m", "1y"] as const;
const DURATION_BUCKETS: { key: string; min: number | null; max: number | null }[] = [
@@ -66,7 +65,7 @@ export default function PlexSidebar({ layout, setLayout, collapsed, onToggleColl
// the header search box); this rail is the primary editor of them. Opening a playlist is a
// hand-off to PlexBrowse via the shared `playlistOpen` slot.
const { scope, show, filters } = usePlex();
const { setShow, setFilters, setPlaylistOpen: onOpenPlaylist } = usePlexActions();
const { setFilters, setPlaylistOpen: onOpenPlaylist } = usePlexActions();
const playlistsQ = useQuery({ queryKey: qk.plexPlaylists(), queryFn: () => api.plexPlaylists() });
const [newPlaylist, setNewPlaylist] = useState("");
// This rail's media source (the Plex library) — names the abstraction the feed and Plex rails
@@ -151,18 +150,6 @@ export default function PlexSidebar({ layout, setLayout, collapsed, onToggleColl
</>
),
},
{
id: "watch",
title: t("plex.filter.show"),
body: (
<FilterChipGroup
ariaLabel={t("plex.filter.show")}
options={SHOW_OPTS.map((s) => ({ value: s, label: t(`plex.filter.showOpt.${s}`) }))}
value={show}
onChange={setShow}
/>
),
},
...(peopleActive
? [
{