feat: skip-reason telemetry via emoji reactions on now-playing
Merged
LU
6mo ago+616+616+012345678901234567890123456789-5-5-0123456789
Summary
Implements GitHub issue #1093: capture optional skip-reason telemetry when users react with emojis to the now-playing message control.
Adds four skip-reason emoji reactions (π, π΄, πΈ, π) that map to telemetry values (generic_dislike, too_chill, mood_mismatch, repeat). Updates Recommendation.skipReason non-blockingly; persistence failures do not break the skip flow.
Implementation
- reactionHandler: New
handleSkipReasonReaction()function captures emoji reactions and persists skip reason via Prisma - trackNowPlaying: Adds skip-reason emoji reactions to now-playing message (both edit and create paths)
- recommendationTelemetry: New
recordRecommendationSkipReason()service function for database updates - schema: Optional
skipReasonfield added to Recommendation model - tests: Comprehensive test suite covering emoji mappings, error handling, and non-blocking semantics
Test Results
- All 2521 bot tests passing (2527 total, 6 skipped)
- All 12 reactionHandler emoji reaction tests passing
- All 5 recordRecommendationSkipReason persistence tests passing
Related
Closes #1093
Summary by cubic
Captures skip-reason telemetry from emoji reactions on the now-playing message. Adds π π΄ πΈ π β generic_dislike, too_chill, mood_mismatch, repeat; non-blocking persistence with guild+track-URL matching that refreshes on now-playing edits (closes #1093; fixes #1377).
-
New Features
- Adds skip-reason reactions to now-playing (create + edit). Central emojiβreason map in
skipReasonMap.ts; now-playing storestrackUrland refreshes it on edits; reactions are only handled for the current message. reactionHandlerrecords reasons viarecordRecommendationSkipReason(typedSkipReason) and finds the latest recommendation byguildId+trackUrl; bot/non-relevant reactions are ignored; DB errors are logged and ignored.
- Adds skip-reason reactions to now-playing (create + edit). Central emojiβreason map in
-
Migration
- Apply
20260613040000_add_recommendation_skip_reasonto add theSkipReasonenum and nullableRecommendation.skipReasoncolumn.
- Apply