Add notify_on_download_start option (#486)#494
Conversation
Emits a download_start event when a file enters the DOWNLOADING state, gated by a new notify_on_download_start flag (default False). Fires through the existing webhook, Discord, and Telegram channels with a "Download Started" label and yellow Discord embed color. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR adds a new ChangesDownload Start Notification Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@CHANGELOG.md`:
- Around line 3-8: Replace the top "## [Unreleased]" heading with a new release
header in the format "## [x.y.z] - YYYY-MM-DD" and move the existing "### Added"
content under that new release; ensure the new release block contains the
required section headings "Changed", "Added", "Fixed", "Removed", and "Security"
(add empty placeholders under any sections without items). Specifically update
the header that currently reads "## [Unreleased]" and keep the existing bullet
"- **Notify on download start** — New `notify_on_download_start` option..."
under the "Added" section while adding the five required subheadings beneath the
new release heading.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 63e47d2f-227b-4c3d-8483-322c437d118f
📒 Files selected for processing (10)
CHANGELOG.mdsrc/angular/src/app/models/config.tssrc/angular/src/app/pages/settings/options-list.tssrc/angular/src/app/services/settings/config.service.spec.tssrc/python/common/config.pysrc/python/controller/notification_formatters.pysrc/python/controller/notifier.pysrc/python/tests/unittests/test_common/test_config.pysrc/python/tests/unittests/test_controller/test_notification_formatters.pysrc/python/tests/unittests/test_controller/test_notifier.py
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
|
|
||
| - **Notify on download start** — New `notify_on_download_start` option (disabled by default) emits a `download_start` event when a file enters the `DOWNLOADING` state. Fires through the existing webhook, Discord, and Telegram channels, with a yellow Discord embed color and "Download Started" label. (#486) | ||
|
|
There was a problem hiding this comment.
Replace Unreleased with a dated semver release block that includes all required sections.
Line 3 uses an Unreleased heading, but this repository requires a top entry like ## [x.y.z] - YYYY-MM-DD, and the entry must include Changed, Added, Fixed, Removed, and Security sections (even if some are empty placeholders).
As per coding guidelines, "Update CHANGELOG.md with a new version entry at the top following semver (major.minor.patch) with date in YYYY-MM-DD format and sections: Changed, Added, Fixed, Removed, Security".
🤖 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 `@CHANGELOG.md` around lines 3 - 8, Replace the top "## [Unreleased]" heading
with a new release header in the format "## [x.y.z] - YYYY-MM-DD" and move the
existing "### Added" content under that new release; ensure the new release
block contains the required section headings "Changed", "Added", "Fixed",
"Removed", and "Security" (add empty placeholders under any sections without
items). Specifically update the header that currently reads "## [Unreleased]"
and keep the existing bullet "- **Notify on download start** — New
`notify_on_download_start` option..." under the "Added" section while adding the
five required subheadings beneath the new release heading.
Summary
notify_on_download_startnotifications flag (defaultFalse) that emits adownload_startevent when a file transitions intoDOWNLOADING.WebhookNotifier._resolve_event_typeplus label/color entries innotification_formatters.py.Closes #486.
Why default
False?Downloads start far more often than they complete (one per file vs. one per completed batch in some workflows). Opt-in keeps existing installs from suddenly being noisier after upgrade.
Test plan
cd src/angular && npx ng lint— passescd src/angular && npx ng test— 413 tests pass, including the updatedconfig.service.spec.tsfixturecd src/python && pytest tests/unittests/test_controller/test_notifier.py tests/unittests/test_controller/test_notification_formatters.py tests/unittests/test_common/test_config.py— 64 tests pass, including:DEFAULT → DOWNLOADINGandQUEUED → DOWNLOADINGtransitions, plus the disabled-flag casetest_to_filegolden config string with the new fielddownload_startlabel and color via existingEVENT_LABELS/DISCORD_COLORSiteration, plus an explicit assertion🤖 Generated with Claude Code
Summary by CodeRabbit