Skip to content

Improve bot auth workflow and local testing guidance#34

Merged
Jamesllllllllll merged 1 commit intomainfrom
codex/vip-token-chatter-lookup
Mar 22, 2026
Merged

Improve bot auth workflow and local testing guidance#34
Jamesllllllllll merged 1 commit intomainfrom
codex/vip-token-chatter-lookup

Conversation

@Jamesllllllllll
Copy link
Copy Markdown
Owner

Summary

Improve the bot auth workflow and local bot-testing setup, while also shipping the related VIP-token moderation improvements that were developed alongside it.

Primary focus:

  • safer shared-bot reconnect flow
  • correct Twitch auth/scopes for bot-badged replies
  • clearer local-vs-production testing guidance using separate test broadcaster and test bot accounts

What Changed

  • added admin bot reconnect support that safely replaces the currently connected bot account
  • updated admin status UI to show the actual connected bot identity and warn on mismatches
  • updated bot OAuth flow to force re-verification and updated broadcaster OAuth to request the required scopes for chatter lookup and bot-badged replies
  • switched chat replies to the Twitch app-token send path needed for the official Bot badge and surfaced reconnect-required UI when broadcaster scopes are outdated
  • improved local-development and bot-operations docs around separate test bot/test broadcaster usage and cross-environment EventSub behavior
  • improved VIP token management from chat and dashboard, including chatter-aware Twitch lookup, debounced editable token counts, VIP styling in playlist management, and duplicate-command protection
  • updated changelog coverage for recent shipped PRs and the work in this branch

How To Test

  1. Run npm run format
  2. Run npm run lint
  3. Run npm run typecheck
  4. Run npm run test
  5. Run npm run build
  6. In local dev, set TWITCH_BOT_USERNAME to a dedicated test bot in .env, connect that bot from /dashboard/admin, and verify the admin page shows the actual connected bot identity.
  7. Reconnect the broadcaster via /auth/twitch/start and confirm the header/settings UI no longer shows a Twitch reconnect warning once the required scopes are present.
  8. Send a bot reply in chat and confirm the Twitch Bot badge appears.
  9. In dashboard moderation, search for a Twitch user, grant a VIP token, then edit VIP token counts with the plus/minus controls and confirm debounced saves do not race or revert.
  10. In manage playlist, confirm VIP requests show the VIP badge and purple VIP styling.

Screenshots Or UI Notes

Visible UI changes include:

  • admin bot status/reconnect UI
  • global/header reconnect warning
  • settings reconnect warning
  • VIP token moderation table behavior
  • VIP styling in manage playlist rows

Checklist

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

Issue Notes

Implemented or substantially advanced in this PR:

Partially addressed, but intentionally not closed by this PR:

@github-actions
Copy link
Copy Markdown

Preview deployment updated.

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

@Jamesllllllllll Jamesllllllllll merged commit cd5258c into main Mar 22, 2026
3 checks passed
@Jamesllllllllll Jamesllllllllll deleted the codex/vip-token-chatter-lookup branch April 12, 2026 13:59
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