Enhancement: Link-health cron admin notification (email/slack)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start with issue #38, since this work depends on Phase 5 email infrastructure, then read src/app/api/cron/link-health/route.ts and src/lib/link-health.ts to understand the existing weekly check and summary. The issue leaves email versus Slack/webhook open and also calls for an admin preference; clarify those choices before starting. Done means newly broken links trigger the agreed notification with the requested details and admins can opt in or out.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
PRD §8.6 requires: "4xx/5xx or timeout → status = 'broken', admin gets a summary notification"
Currently (PROGRESS.md judgment call #3): "Link-health 'admin gets a summary notification' (§8.6) is the dashboard's status-count line, not an email. No email provider is wired up yet (that's Phase 5's digest email, §8.12); building one just for this would be scope creep."
Now that we're planning Phase 5 email infrastructure, this should be implemented properly.
Current State
src/app/api/cron/link-health/route.tsruns weekly, updates status, logs summary to console- Admin dashboard shows counts and
max(last_verified_at) - No proactive notification when links break
Expected Behavior
When link-health cron finds broken links:
- Send email to admin (using Resend/Mailvex from Phase 5)
- Or send Slack/webhook notification
- Include: list of newly broken links, total checked, summary stats
Implementation Plan
- Wait for Phase 5 email infrastructure (issue #38)
- Modify link-health cron to send notification:
- After processing, if
broken > 0, send email - Template: "StudentStack Link Health: X broken links found"
- List each broken resource with name, URL, category
- After processing, if
- Add notification preference: Admin can opt in/out
Files to Modify
src/app/api/cron/link-health/route.ts- add notification callsrc/lib/email.ts(from Phase 5) - add link-health notification templatesrc/lib/link-health.ts- return detailed broken link info
Email Template
Subject: StudentStack Link Health Alert — 5 broken links detected
The weekly link health check found 5 newly broken links out of 551 checked.
Broken Resources:
1. GitHub Copilot — https://education.github.com/pack — Development Tools
2. AWS Free Tier — https://aws.amazon.com/education/awseducate/ — Cloud & Hosting
...
View in admin dashboard: https://your-domain.com/admin
— StudentStack Bot
Alternative: Slack/Webhook
- Simpler than email for now
- Add
SLACK_WEBHOOK_URLenv var - Post to #alerts channel
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 6
- Merge trung bình
- 11 giờ 16 phút
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Your-Voldemort/StudentStack
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Your-Voldemort/StudentStack#42 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Your-Voldemort/StudentStack#40 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
Your-Voldemort/StudentStack#38 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Your-Voldemort/StudentStack#37 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 3-5 ngày Mức phù hợp với người mới 68/100
Your-Voldemort/StudentStack#36 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Your-Voldemort/StudentStack
Issue tương tự
-
ble-needs-fable-review bug mobile priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ColeMurray/background-agents#2305 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug from-studio
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
esengine/DeepSeek-Reasonix#12355 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
oblien/openship#1086 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày