Skip to content

Refine charter blacklist handling#30

Merged
Jamesllllllllll merged 2 commits intomainfrom
codex/issue-5-charter-blacklist-refine
Mar 21, 2026
Merged

Refine charter blacklist handling#30
Jamesllllllllll merged 2 commits intomainfrom
codex/issue-5-charter-blacklist-refine

Conversation

@Jamesllllllllll
Copy link
Copy Markdown
Owner

Summary

Refines charter blacklist handling so request matching and playlist-manager version review behave correctly when only some candidate versions are blocked.

Resolves #5.

What Changed

  • Updated chat request resolution to skip blacklisted-charter candidates and choose the first allowed match when alternate versions exist.
  • Added a clean rejection path when every matching candidate is blocked by a blacklisted charter, so chat no longer gets a success message for a request that was never added.
  • Added charter-specific rejection messaging for blocked-only cases.
  • Included charter IDs in stored candidate snapshots so the playlist manager can distinguish blacklisted versions.
  • Updated the manage-playlist versions UI to dim versions by blacklisted charters and show a small Blacklisted badge next to the charter name.
  • Prevented manual version switching in the backend from selecting a blacklisted charter version.
  • Expanded request-policy and EventSub tests to cover mixed-candidate and blocked-only charter blacklist scenarios.

How To Test

  1. Run npm run lint.
  2. Run npm run typecheck.
  3. Run npm test.
  4. Run npm run build.
  5. On the moderation page, blacklist a charter by selecting them from the charter search.
  6. Request a song that has one version by the blacklisted charter and one version by a different charter.
  7. Confirm the request succeeds, an allowed version is added, and Twitch chat does not show a rejection.
  8. Request a song where every available version is by a blacklisted charter.
  9. Confirm nothing is added to the playlist and Twitch chat replies that the song cannot be played in this channel.
  10. Open manage playlist, expand View versions, and confirm blacklisted-charter versions are dimmed and labeled Blacklisted.

Screenshots Or UI Notes

  • The visible UI change is in the manage-playlist versions list.
  • Versions by blacklisted charters stay visible for moderators/streamers, but render dimmed with a small Blacklisted badge beside the charter name.

Checklist

  • I tested the change locally
  • I updated docs or examples if needed
  • I called out any follow-up work or known limitations

@github-actions
Copy link
Copy Markdown

Preview deployment updated.

App: https://request-bot-pr-30.jameskeezer.workers.dev
Frontend worker: request-bot-pr-30
Backend worker: request-bot-backend-pr-30

@github-actions
Copy link
Copy Markdown

Preview deployment updated.

App: https://request-bot-pr-30.jameskeezer.workers.dev
Frontend worker: request-bot-pr-30
Backend worker: request-bot-backend-pr-30

@Jamesllllllllll Jamesllllllllll merged commit d56c909 into main Mar 21, 2026
3 checks passed
@Jamesllllllllll Jamesllllllllll deleted the codex/issue-5-charter-blacklist-refine branch April 12, 2026 13:59
Jamesllllllllll added a commit that referenced this pull request Apr 12, 2026
…cklist-refine

Refine charter blacklist handling
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.

[Feature]: Add charter blacklisting

1 participant