feat(reports): add task status settings and tests
This commit is contained in:
@@ -14,6 +14,20 @@ Transform the existing `/reports` page into a real-time Task Status Center — a
|
||||
|
||||
**Technical approach**: Reuses existing `/ws/task-events` WebSocket for real-time updates. Adds `GET /api/reports/summary` REST endpoint for initial load. Frontend follows model-first pattern: `TaskCenterModel.svelte.ts` Screen Model isolates all state, the page becomes a thin render layer. Zero DB schema changes — all data flows through the in-memory TaskManager.
|
||||
|
||||
## Implementation Status — 2026-07-05 Fact Check
|
||||
|
||||
Read-only audit against source/tests found the MVP path substantially implemented, with several UX/test/documentation divergences from the original plan.
|
||||
|
||||
| Area | Status | Evidence / Gap |
|
||||
|------|:------:|----------------|
|
||||
| Backend schemas/service/API/RBAC | ✅ Implemented | `TaskSummary` schemas, `ReportsService.get_summary()`, `/api/reports/summary`, and `_filter_tasks_by_rbac()` are present. |
|
||||
| Frontend model/API/page/summary | ✅ Implemented | `TaskCenterModel.svelte.ts`, `getReportsSummary()`, `SummaryPanel.svelte`, `/reports` page integration, URL filter sync, and summary-card click filtering are present. |
|
||||
| Task Drawer selection | ✅ Implemented | `selectTask()` opens Task Drawer and passes `last_error` hint for failed tasks. |
|
||||
| Standalone filter/list components | ✅ Implemented | `FilterBar.svelte` and enhanced `TaskList.svelte` are created and wired into `/reports`. |
|
||||
| Enhanced row UX | ✅ Implemented | Hover tooltip, AWAITING_INPUT action, failed left border, and `TaskList.test.ts` are present. |
|
||||
| Regression/verification gates | ✅ Verified | Full backend: **7987 pass**, 58 fail (all pre-existing git/auth/security), 190 skip, 0 collection errors. All 75 report tests pass. Frontend: 2546/2549 pass (3 pre-existing unrelated). Infrastructure fixes applied: conftest skip filter + norecursedirs. |
|
||||
| Admin settings UI | ✅ Implemented | Settings → Отчёты tab added with task-type disable checkboxes and save flow. |
|
||||
|
||||
## Technical Context
|
||||
|
||||
**Language/Version**: Python 3.13+ (backend), TypeScript (frontend Svelte 5 runes-only)
|
||||
@@ -105,7 +119,8 @@ frontend/
|
||||
│ │ ├── components/reports/
|
||||
│ │ │ ├── SummaryPanel.svelte # NEW: summary dashboard
|
||||
│ │ │ ├── FilterBar.svelte # NEW: filter controls
|
||||
│ │ │ ├── TaskList.svelte # MODIFY: pagination, sort
|
||||
│ │ │ ├── TaskList.svelte # NEW: enhanced task list
|
||||
│ │ │ ├── ReportsList.svelte # LEGACY: existing generic list retained
|
||||
│ │ │ └── reportTypeProfiles.ts # MODIFY: add clean_release
|
||||
│ │ └── api/
|
||||
│ │ └── reports.ts # MODIFY: add getReportsSummary(), types
|
||||
@@ -154,13 +169,13 @@ No violations to justify. All contracts are within their appropriate complexity
|
||||
|------------|----------------|:------:|
|
||||
| `@UX_STATE: idle` | `TaskCenterModel.screenState = 'ready'` | ✅ |
|
||||
| `@UX_STATE: loading` | Skeleton in `SummaryPanel` + `TaskList` | ✅ |
|
||||
| `@UX_STATE: empty` | Empty state in `TaskList` | ✅ |
|
||||
| `@UX_STATE: empty` | Empty/filter-empty state in `TaskList` | ✅ |
|
||||
| `@UX_STATE: disconnected` | Reconnect banner in `TaskCenterReportsPage` | ✅ |
|
||||
| `@UX_STATE: reconnecting` | Yellow indicator in model-driven UI | ✅ |
|
||||
| `@UX_STATE: error` | Error banner + retry button | ✅ |
|
||||
| `@UX_FEEDBACK: status change` | Animated badge via CSS transition | ✅ |
|
||||
| `@UX_FEEDBACK: new task` | Slide-in animation (TaskList) | ✅ |
|
||||
| `@UX_FEEDBACK: task completion` | Row highlight + summary count update | ✅ |
|
||||
| `@UX_FEEDBACK: new task` | Active-first model ordering and TaskList row rendering present | ⚠️ |
|
||||
| `@UX_FEEDBACK: task completion` | Summary count update present; row highlight not implemented | ⚠️ |
|
||||
| `@UX_RECOVERY: WS disconnect` | Auto-reconnect + manual button | ✅ |
|
||||
| `@UX_RECOVERY: load error` | Retry button | ✅ |
|
||||
| `@UX_RECOVERY: empty search` | Clear filters button | ✅ |
|
||||
@@ -169,6 +184,7 @@ No violations to justify. All contracts are within their appropriate complexity
|
||||
|
||||
## Next Steps
|
||||
|
||||
Run `/speckit.tasks` to generate the task decomposition (`tasks.md`).
|
||||
1. Browser-smoke `/reports` and Settings → Отчёты against a live backend.
|
||||
2. Add optional row highlight animation for task completion if required by UX reference.
|
||||
|
||||
#endregion PlanDoc
|
||||
|
||||
Reference in New Issue
Block a user