6.2 KiB
6.2 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| 06-kanban-dependency-ui | Kanban dependency UI | done | 6 |
|
plan.md | ../../specs/tasks/system-design/task-dependencies.md |
Task 06: Kanban Dependency UI
Acceptance
- The Kanban task type, boot-payload mapper, and WS handlers carry
blocked,blockedReason,dependsOn,blocks, andstartWhenUnblocked, surviving both boot hydration and incrementaltask.updatedevents.
Dependency chip above the composer
- A dependency chip renders in the chat status row directly above the composer,
alongside
PRStatusChip, incomponents/task/chat/chat-input-area.tsx(data-testid="chat-status-bar"). - The same chip renders in
components/task/passthrough-toolbar.tsx(data-testid="passthrough-status-row"), which mounts its own copy ofPRStatusChip. Both rows must show it or the chip disappears in passthrough layouts. shouldRenderChatStatusBar(...)is extended with the chip's presence. Without that, a task whose only status content is the dependency chip renders no row at all — the predicate currently accounts only for todos, a queue chip, right-hand controls, and proceed.- The chip reports both directions and opens to a list of blocked-by and blocks entries with each entry's title and state, each navigable to that task.
- Failed predecessors are visually distinguished from pending ones in the list.
- The chip returns null when the task has no edges in either direction, matching
PRStatusChip's own null-when-not-applicable contract. - Mobile uses the drawer pattern, not a hover card, mirroring
PRStatusChipDrawer/usesMobileDrawerincomponents/github/pr-status-chip.tsx. - The chip reads
dependsOn/blocksfrom the task payload; it does not fetch each related task individually. - A blocked badge renders on the shared task card next to the existing
queuedForStepIdbadge. It shows the predecessor count and distinguishespendingfromfailed. Hovering or tapping it lists the predecessor titles and their states. - Both badges can appear on one card without truncating either, on desktop and on a narrow mobile viewport, with no horizontal page overflow and no hover-only disclosure of the blocked state itself.
- The Kanban task detail view mounts no edge editor. Dependencies are
declared in the create dialog or over MCP, so every detail-view surface that
reads them (card badge, chip, chip list) is read-only and no
BlockersPickeris repointed at the task-scoped routes. - The task-create dialog gains a "Depends on" field and a "Start automatically
when unblocked" checkbox, submitting
blocked_byandstart_when_unblocked. The checkbox is disabled when no dependency is selected. - The Kanban card context menu gains an "Add dependency" entry, following the
kanban-card-link-submenu.tsxpattern. - All new copy goes through
t()/<Trans>; no hardcoded literal, including inside SCREAMING_CASE config tables, which are reviewed by eye. Every path touched here is appended toi18nGuardFilesineslint.i18n.options.mjsin the same change.t()is never called at module scope. - The pseudo-locale (Settings → General → Appearance) shows no English text in any surface added by this task.
- Mobile parity: the picker and the create-dialog field are reachable and usable on a narrow viewport using native mobile interaction patterns, not a compressed desktop layout.
TDD sequence
- Failing tests: DTO/store conversion preserves the five fields from boot and
from a
task.updatedevent withfields: ["dependencies"]. - Failing test: the blocked badge renders count and reason, and coexists with
the queued badge.
2a. Failing test:
shouldRenderChatStatusBarreturns true for a task whose only status content is the dependency chip. 2b. Failing test: the chip lists blocked-by and blocks entries with states, distinguishes a failed predecessor, and renders null with no edges. 2c. Failing test: the chip appears in bothchat-status-barandpassthrough-status-row. - Failing test: the picker creates and removes an edge optimistically.
- Failing test: a
409with acyclebody renders the formatted cycle path and reverts the optimistic edge. - Failing test: the create dialog submits
blocked_byandstart_when_unblocked, and the checkbox is disabled with no selection. - Failing test: the context-menu entry opens the picker for the right task.
- Implement types, mappers, badge, picker mount, dialog fields, and menu entry.
Verification
cd apps/web
pnpm test -- --run components/kanban-card-content components/task/simple/components/blockers-picker components/task-create-dialog components/task/chat/chat-input-area components/task/dependency-chip lib/ws/handlers/kanban
pnpm run typecheck
pnpm run lint
pnpm run i18n:check
pnpm run i18n:ratchet
Use pnpm test / pnpm run typecheck, not pnpm exec — exec skips the
generator pre-hooks and produces spurious generated-JSON failures.
Files likely touched
apps/web/lib/state/slices/kanban/types.tsapps/web/lib/ws/handlers/kanban.tsapps/web/components/kanban-card.tsx,kanban-card-content.tsxapps/web/components/kanban-card-context-menu.tsxapps/web/components/task/simple/components/blockers-picker.tsxapps/web/components/task/dependency-chip.tsx(new)apps/web/components/task/chat/chat-input-area.tsxapps/web/components/task/passthrough-toolbar.tsxapps/web/app/tasks/[id]/kanban-task-shell.tsxapps/web/components/task-create-dialog*.tsxapps/web/lib/api/domains/(task-scoped dependency client)apps/web/eslint.i18n.options.mjsapps/web/public/locales/**(or the repo's catalog location)- focused
*.test.tsx/*.test.tsfiles
Dependencies
Task 01 — needs the task-scoped routes and the five DTO fields. It does not need Tasks 02–05, so it may start as soon as 01 lands, alongside Task 05.
Parallelism
sequential
Output contract
Mark this task in_progress before the RED tests and done only after the
listed commands pass. Record the badge layout decision for the two-badge case,
the i18n paths appended to the guard list, the pseudo-locale check result, and
test results in this file and plan.md.