fix: remove misspelled selector default and notify on monitor downgrade#261
fix: remove misspelled selector default and notify on monitor downgrade#261
Conversation
…owngrade (#254, #253) Clear the bogus "name of the selctor" default value from the selector field so users see the placeholder instead. Add a tier-downgrade email that lists which monitors were switched from hourly to daily when a subscription is cancelled or downgraded. Closes #254 Closes #253 https://claude.ai/code/session_01EaiPVsbd2waiYqem5rzKSY
… error handling - Add recordUsage() calls to sendTierDowngradeEmail for proper Resend cap tracking - Add early return for empty monitorNames array - Use fallback "(unnamed monitor)" for empty monitor names in email body - Use String(error?.message ?? error) for safer error extraction - Add test for empty monitorNames, downgrade email send, and no-send scenarios https://claude.ai/code/session_01EaiPVsbd2waiYqem5rzKSY
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 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 |
Summary
Fixes two open issues:
"name of the selctor"default value from the CSS Selector field inCreateMonitorDialog. Users now see the proper placeholder instead of a pre-filled typo.sendTierDowngradeEmail()to notify users when their monitors are switched from hourly to daily frequency after a subscription cancellation or tier downgrade.Closes #254
Closes #253
Changes
UI (client)
CreateMonitorDialog.tsxEmail notification (server/services/email.ts)
sendTierDowngradeEmail()with proper HTML escaping, plaintext sanitization, and safe href handlingResendUsageTracker.recordUsage()for accurate Resend cap accountingmonitorNamesarray"(unnamed monitor)"for empty monitor namesString(error?.message ?? error)Storage (server/storage.ts)
downgradeHourlyMonitors()return type fromnumberto{ count: number; monitorNames: string[] }to provide monitor names for the emailWebhook handlers (server/webhookHandlers.ts)
sendTierDowngradeEmailinto all 3 downgrade paths (inactive subscription, tier change, subscription deleted).catch()fire-and-forget pattern so email failures never block webhook processingTests
sendTierDowngradeEmail(cap check, no API key, no email, single/plural monitors, notificationEmail preference, error handling, empty array guard)How to test
npm run check && npm run test— all 1738 tests passnpm run build— production build succeeds.price-tag or #main-contentinstead of pre-filled texthttps://claude.ai/code/session_01EaiPVsbd2waiYqem5rzKSY