feat: multi-select platforms + creator-only media type - #37
Merged
Merged
Conversation
Two lobby/room fixes: Platforms — the single-select dropdown becomes a multi-select chip group, so someone with e.g. Netflix + Prime gets titles on EITHER. An explicit "Any" chip (default) clears the filter; the old "Any / Plex" label drops the "Plex" wording. platform_filter is now a CSV; the backend maps each key to its TMDb provider id and OR-joins them (with_watch_providers=8|119). Media type (movie/tv) — it's a shared, room-level setting (both users draw from ONE pool), so a joiner picking a different type would break overlap. Now creator-only: PATCH /rooms/:id is gated to user_a, and the swipe-screen toggle is hidden for the joiner (they inherit the creator's choice). New pure helper platformProviderParam (CSV → provider param) + reject… unchanged; both unit-tested. typecheck, lint, vitest (12/12), build all pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two lobby/room improvements.
1. Platforms → multi-select
The single
<select>becomes a chip multi-select, so if you have e.g. Netflix + Prime the deck includes titles on either (TMDbwith_watch_providers=8|119, OR).Any / Plexlabel drops the "Plex" wording as requested.platform_filteris now a CSV string; new pure helperplatformProviderParammaps each key → TMDb provider id, dedupes, and OR-joins. Unknown/empty → no filter.platform_filterwas already free TEXT).2. Media type (movie/tv) → creator-only
media_typeis a shared, room-level setting — both users draw from one pool, so a joiner switching to a different type would leave nothing in common. So:PATCH /api/rooms/:idis gated to the creator (user_a) only (was any member).Tests
platformProviderParam(single, CSV, empty/null, unknown-key dedupe).typecheck,lint,vitest(12/12) andwrangler --dry-runall pass.