Activity replay, HUDFX in the overlay, chat filter, redeem art fix

- Dashboard Recent activity: readable details (reward name, cost, variation,
  rarity, TTS, viewer message; sub tier/months; bits; raids; polls), local
  times, and a Replay button. Each row now stores the overlay message that was
  shown (activity_log.replay_json); older redeem/raid rows are rebuilt from the
  raw Twitch event.
- Fix: redeem alerts lost polaroid/art/emote since 4fda606 (they had ended up
  inside a comment), so sticker art, Power-up emotes and sound-only were gone.
- HUDFX embedded in the overlay with ?ext=hudfx (opt-in per OBS source): its
  page is served from our domain with the camcorder CSS, its settings API is
  forwarded, its Web Worker is started from a same-origin stand-in (the alert
  box needs it; blob: workers break the site CSP), and the box sits in the
  alert corner. The HUDFX URL is a field on the Settings page.
- Blerp cassette CSS kept with it (src/ext/blerp.css, pasted into the Blerp
  OBS source; Blerp itself cannot be embedded: its realtime server only
  accepts its own site).
- On-screen chat: Settings -> Hidden chatters and Hide ! commands.
- Outgoing raids are logged with a line in the server log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bashy 2026-11-22 15:29:20 +02:00
parent 5f61b1ebe1
commit 19a0965eb2
16 changed files with 671 additions and 35 deletions

View file

@ -2,7 +2,8 @@ const db = require('./db');
const ws = require('./ws');
const { isOnCooldown, setCooldown } = require('./cooldowns');
function dispatchEvent(eventType, eventDetail = null, username = null, data = null) {
// replay: the overlay message that was shown for this event, stored so the dashboard can play it again
function dispatchEvent(eventType, eventDetail = null, username = null, data = null, replay = null) {
const actions = db.getMatchingActions(eventType, eventDetail);
let fired = 0;
@ -31,7 +32,7 @@ function dispatchEvent(eventType, eventDetail = null, username = null, data = nu
console.log(`[dispatch] Fired action ${action.id} (${action.name}) — event: ${eventType}, user: ${username}`);
}
db.logActivity(eventType, eventDetail, username, data, fired);
db.logActivity(eventType, eventDetail, username, data, fired, replay);
}
module.exports = { dispatchEvent };