feat: enhance weekly report and realtime notifications
Weekly Report (fix-weekly-report): - Remove 5-task limit, show all tasks per category - Add blocked tasks with blocker_reason and blocked_since - Add next week tasks (due in coming week) - Add assignee_name, completed_at, days_overdue to task details - Frontend collapsible sections for each task category - 8 new tests for enhanced report content Realtime Notifications (fix-realtime-notifications): - SQLAlchemy event-based notification publishing - Redis Pub/Sub for multi-process broadcast - Fix soft rollback handler stacking issue - Fix ping scheduling drift (send immediately when interval expires) - Frontend NotificationContext with WebSocket reconnection Spec Fixes: - Add missing ## Purpose sections to 5 specs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# Change: Fix Weekly Report Content Alignment
|
||||
|
||||
## Why
|
||||
現行 ReportService.get_weekly_stats 與 automation spec 的週報內容要求有差距:
|
||||
1. 任務清單僅顯示 5 筆摘要,spec 要求完整清單
|
||||
2. 未包含阻礙中任務清單 (blocker_flag = true)
|
||||
3. 未包含下週預計完成任務 (due_date 在下週)
|
||||
|
||||
## What Changes
|
||||
- **ReportService** - 擴充 get_weekly_stats 回傳完整任務明細
|
||||
- **Report Content** - 新增 blocked_tasks 與 next_week_tasks 欄位
|
||||
- **ReportHistory** - content JSON 結構擴充
|
||||
|
||||
## Impact
|
||||
- Affected specs: `automation`
|
||||
- Affected code:
|
||||
- `backend/app/services/report_service.py` - 擴充週報內容
|
||||
- `frontend/src/components/WeeklyReportPreview.tsx` - 顯示完整清單
|
||||
|
||||
## Implementation Phases
|
||||
|
||||
### Phase 1: Backend Report Enhancement
|
||||
- 擴充 get_weekly_stats 回傳完整任務清單
|
||||
- 新增 blocked_tasks 欄位
|
||||
- 新增 next_week_tasks 欄位
|
||||
|
||||
### Phase 2: Frontend Display
|
||||
- 更新 WeeklyReportPreview 顯示完整清單
|
||||
- 可摺疊/展開的任務分類區塊
|
||||
|
||||
## Dependencies
|
||||
- automation (已完成)
|
||||
- collaboration (blocker 功能)
|
||||
|
||||
## Technical Decisions
|
||||
- 任務清單不設上限,由前端分頁或摺疊處理
|
||||
- 下週預計任務以 due_date 在下週一至週日為準
|
||||
Reference in New Issue
Block a user