Skip to content

feat: multi-select platforms + creator-only media type - #37

Merged
valeboth merged 1 commit into
mainfrom
feat/platform-multiselect-media-lock
Aug 31, 2026
Merged

valeboth merged 1 commit into
mainfrom
feat/platform-multiselect-media-lock

Conversation

@valeboth

Copy link
Copy Markdown
Owner

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 (TMDb with_watch_providers=8|119, OR).

  • An explicit "Any" chip (default, visible) clears the filter — the old Any / Plex label drops the "Plex" wording as requested.
  • platform_filter is now a CSV string; new pure helper platformProviderParam maps each key → TMDb provider id, dedupes, and OR-joins. Unknown/empty → no filter.
  • No schema change (platform_filter was already free TEXT).

2. Media type (movie/tv) → creator-only

media_type is 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:

  • Backend: PATCH /api/rooms/:id is gated to the creator (user_a) only (was any member).
  • Frontend: the swipe-screen movie/tv toggle is hidden for the joiner; they inherit the creator's choice (join flow already did this). Solo users are their own creator, so they keep the toggle.

Tests

  • Unit tests for platformProviderParam (single, CSV, empty/null, unknown-key dedupe).
  • typecheck, lint, vitest (12/12) and wrangler --dry-run all pass.

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.
@valeboth
valeboth merged commit 161e744 into main Aug 31, 2026
1 check passed
@valeboth
valeboth deleted the feat/platform-multiselect-media-lock branch August 31, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant