feat: add video tutorial links to the sunset message - #912
Conversation
Spanish message links the Spanish tutorial, every other language links the English one
WalkthroughThe sunset messages now include English and Spanish video tutorial links. Tests define both URLs and verify that each locale message contains the correct link. ChangesSunset tutorial links
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
tests/bot/sunset.spec.ts (2)
14-15: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse camelCase for the new test variables.
SPANISH_VIDEO_TUTORIALandENGLISH_VIDEO_TUTORIALare variables. Rename them tospanishVideoTutorialandenglishVideoTutorial, then update their references on Lines 95 and 104.Proposed naming change
-const SPANISH_VIDEO_TUTORIAL = 'https://www.youtube.com/watch?v=lbenPWNlykk'; -const ENGLISH_VIDEO_TUTORIAL = 'https://www.youtube.com/watch?v=Lnyjgecfd_w'; +const spanishVideoTutorial = 'https://www.youtube.com/watch?v=lbenPWNlykk'; +const englishVideoTutorial = 'https://www.youtube.com/watch?v=Lnyjgecfd_w';🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/bot/sunset.spec.ts` around lines 14 - 15, Rename the test constants SPANISH_VIDEO_TUTORIAL and ENGLISH_VIDEO_TUTORIAL to spanishVideoTutorial and englishVideoTutorial, and update every reference to use the new camelCase names.Source: Coding guidelines
95-95: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd a regression test for the English fallback.
The current assertions cover only the direct Spanish and English locale files. Add one non-English, non-Spanish locale case through the production i18n resolution path and assert that it contains
englishVideoTutorial. This verifies the requirement that other locales use the English tutorial link through fallback.Also applies to: 104-104
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/bot/sunset.spec.ts` at line 95, Add a regression case in the sunset i18n tests using a non-English, non-Spanish locale through the production locale-resolution path, then assert its resolved tutorial text contains englishVideoTutorial. Keep the existing Spanish and English assertions unchanged and ensure the new case exercises the English fallback rather than directly loading a locale file.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/bot/sunset.spec.ts`:
- Around line 14-15: Rename the test constants SPANISH_VIDEO_TUTORIAL and
ENGLISH_VIDEO_TUTORIAL to spanishVideoTutorial and englishVideoTutorial, and
update every reference to use the new camelCase names.
- Line 95: Add a regression case in the sunset i18n tests using a non-English,
non-Spanish locale through the production locale-resolution path, then assert
its resolved tutorial text contains englishVideoTutorial. Keep the existing
Spanish and English assertions unchanged and ensure the new case exercises the
English fallback rather than directly loading a locale file.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 48d3c9ca-ec8a-4ff8-acd1-c96a11f7278c
📒 Files selected for processing (3)
locales/en.yamllocales/es.yamltests/bot/sunset.spec.ts
Summary
Adds a video tutorial link to the sunset notice introduced in #911:
Test plan
npm test— 225 passing; the locale specs intests/bot/sunset.spec.tsnow also assert the tutorial links per languagenpm run lintcleanSummary by CodeRabbit
New Features
Tests