Skip to content

UI-SP2 — Download-manager Task Detail (4 additive read endpoints + redesigned page)#20

Merged
l17728 merged 20 commits into
mainfrom
feat/ui-sp2-task-detail
May 19, 2026
Merged

UI-SP2 — Download-manager Task Detail (4 additive read endpoints + redesigned page)#20
l17728 merged 20 commits into
mainfrom
feat/ui-sp2-task-detail

Conversation

@l17728
Copy link
Copy Markdown
Owner

@l17728 l17728 commented May 19, 2026

Summary

Web UI sub-project 2 of 5 (UI-SP1 = PR #19). Full-stack but additive, zero Alembic migration (all columns already existed).

  • Backend (4 additive read-only endpoints), tenant-scoped + RBAC via the proven cancel-pattern gate, over the existing schema: GET /api/v1/tasks/{id}/subtask-chunks, /source-allocation, /participating-executors, /events (audit-derived, cursor-paginated). Implements the 2 already-declared openapi.yaml paths (getSourceAllocation/getTaskEvents) to match their schemas + adds 2 new paths/schemas. New src/dlw/schemas/task_detail.py + src/dlw/services/task_detail.py; routes appended to src/dlw/api/tasks.py.
  • Frontend: /tasks/:id rebuilt into a download-accelerator view — header (basic info + inline-SVG aggregate ring + client-derived speed/ETA + cancel/delete) and el-tabs (Files & chunks / Sources / Executors / Events) with per-pane DataBoundary. Single useLiveResource seam preserved (added view-transparent enabled option so only the active tab polls; SP5 SSE swap stays view-free). No new runtime dep (inline SVG, no ECharts).
  • TDD: 20 bite-sized tasks across M1-M4; 2 opus pre-execution reviewers (fixed 2 BLOCKERs in the plan before code: SQLAlchemy false() vs and_(False); a Vitest real-ref mock). Final opus whole-impl review = MERGE-READY (0 CRITICAL/HIGH).

Verification

  • Backend: 439 pytest pass (incl. 12 new endpoint tests: happy / cross-tenant-404 / unauth-401 / aggregation). spectral + swagger-cli + lint_invariants + lint_no_direct_status_write green.
  • Frontend: 92 vitest pass, vue-tsc strict 0 errors, eslint --max-warnings=0, vite build ok; en/zh locale parity test.
  • Live headed-Playwright smoke against a freshly-started controller: all 4 endpoints 200 with real data; aggregate ring/tabs/file table rendered correctly, zero console errors.

Known follow-ups (non-blocking, record-and-accept; from final review)

  • Event log: live poll + manual "Load older" can visually overlap rows at the page seam (data/security unaffected; index-key masks it) — dedupe in a follow-up.
  • File table uses height-capped el-table — the spec §7 sanctioned contingency for el-table-v2 virtualization.
  • _decode_cursor on a malformed cursor → 500 not 422 (tenant gate runs first; no security/data impact).
  • Deferred by design: client-derived speed/ETA (no backend speed source), retry/pause/upgrade actions (no endpoints), SSE/WS push (UI-SP5).

Test plan

  • CI green (OpenAPI, Invariant, pytest, frontend-lint, frontend-build, + others)
  • Squash-merge with --delete-branch

🤖 Generated with Claude Code

l17728 and others added 20 commits May 20, 2026 00:02
… + redesigned page)

Full-stack additive: zero migration (all columns exist), honors UI-SP1 locked
decisions (useLiveResource single seam, DataBoundary, el-table-v2, no new dep),
implements the already-declared SourceAllocation/TaskEvent contract + adds
subtask-chunks/participating-executors. Client-derived speed/ETA; canvas matrix /
retry-upgrade / SSE deferred & documented.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
M1 backend (schemas/services/4 routes/openapi, per-endpoint pytest), M2
frontend foundation (useLiveResource enabled, types, composables, rate), M3
visual components (ring/chunkbar/sourcebar/swimlane/eventrow), M4 page
rebuild + i18n parity + full gate + headed smoke + docs. Complete code, no
placeholders; grounded in verified on-disk contract + cancel-pattern gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Backend B1: and_(False) is invalid in SQLAlchemy 2 -> use false() (+ import)
- Frontend B1: TaskDetailSP2 mock returned plain {value} not a ref; Vue
  template auto-unwrap needs a real ref -> self-contained async vi.mock
  factories that await import('vue') and create real refs
- Minor: deps are caret-resolved (vue-query 5.100.x / element-plus 2.13.x);
  don't assert exact minors (behavior verified equivalent)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@l17728 l17728 merged commit de9573a into main May 19, 2026
12 checks passed
@l17728 l17728 deleted the feat/ui-sp2-task-detail branch May 19, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant