Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Enhancement: Link-health cron admin notification (email/slack)

Đang mở
#41 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ả

enhancement

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.ts runs 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

  1. Wait for Phase 5 email infrastructure (issue #38)
  2. 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
  3. Add notification preference: Admin can opt in/out

Files to Modify

  • src/app/api/cron/link-health/route.ts - add notification call
  • src/lib/email.ts (from Phase 5) - add link-health notification template
  • src/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_URL env 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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Your-Voldemort/StudentStack

Tất cả issue của Your-Voldemort/StudentStack

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.