Add epics 10–12 (plans UI, completion artifacts, ops copilot), worker draft-PR and live E2E verify tasks, and phase A–E execution order after A1 gap review. Co-authored-by: Cursor <cursoragent@cursor.com>
55 lines
1.7 KiB
Markdown
55 lines
1.7 KiB
Markdown
---
|
|
kind: task
|
|
slug: trpc-backlog-tree
|
|
title: tRPC backlog.list / tree / get for markdown_backlog_items
|
|
plan_slug: automation-foundation
|
|
epic_slug: plans-roadmap-ui
|
|
status: ready
|
|
priority: P1
|
|
tenant_id: global
|
|
owner: unassigned
|
|
cursor_todo_id: null
|
|
updated_at: "2026-08-12"
|
|
agent_prompt: |
|
|
Extend apps/web backlog router: list/tree/get for markdown_backlog_items.
|
|
Always filter by workspace_id. Zod inputs. No Plans UI yet — API only.
|
|
Reuse existing schema. claim_task / complete_task; lint + type-check + test.
|
|
---
|
|
|
|
# Task summary
|
|
|
|
Add workspace-scoped tRPC procedures to list the Plan → Epic → Task hierarchy from `markdown_backlog_items` with status filters — the data layer for the Plans roadmap UI.
|
|
|
|
## Description
|
|
|
|
Today `backlog` router only handles workflow prompts. Add:
|
|
|
|
- `backlog.tree` — nested plans → epics → tasks (or flat list + client nest by `kind` / parent)
|
|
- `backlog.list` — flat with filters: `kind`, `status`, `planSlug`, `epicSlug`
|
|
- `backlog.get` — single item by id or slug keys
|
|
|
|
All queries must filter `workspace_id` from session membership.
|
|
|
|
Document that rows come from `pnpm --filter @tasks/database import:markdown-backlog`.
|
|
|
|
## Subtasks
|
|
|
|
- [ ] Zod input schemas in shared or router-local
|
|
- [ ] Procedures on `backlog` router
|
|
- [ ] Unit/integration coverage for workspace isolation
|
|
- [ ] Empty tree when import not run (friendly empty state data)
|
|
|
|
## Estimation
|
|
|
|
M
|
|
|
|
## Acceptance criteria
|
|
|
|
- [ ] Member of workspace A cannot fetch workspace B items
|
|
- [ ] Tree returns automation-foundation plan with nested epics/tasks after import
|
|
- [ ] Status filter `ready` excludes `done`
|
|
|
|
## Links
|
|
|
|
- Epic: `./Epic-plans-roadmap-ui.md`
|
|
- Related: `apps/web/server/routers/backlog.ts`
|