f441399441
Co-authored-by: nova28 <17953305+nova28@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
3.5 KiB
3.5 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-project-and-render-priority | Project and render task-switcher priority | completed | 1 | plan.md |
|
|
|
Task 01: Project and Render Task-Switcher Priority
Summary
Make priority part of the shared task-switcher item and render one generic task priority indicator on board cards and task rows. Both desktop and mobile projection adapters must retain the same stored value.
In scope
- Move priority tokens and display metadata to a task-owned shared module.
- Replace the kanban-only indicator with a reusable task priority indicator.
- Project priority into desktop sidebar and mobile task-switcher items.
- Render the indicator after the title in its inline badge area at every breakpoint.
- Add focused projection, rendering, fallback and accessibility tests.
Out of scope
- Priority mutation menus or E2E interaction flows.
- New copy, priority tokens, state ownership or backend contracts.
Acceptance
- Critical, high and low tasks show distinct indicators after the task title, while every task title keeps the same starting position.
- Medium, absent and invalid values show no indicator or raw token.
- Desktop and mobile task-switcher projections retain the stored priority and localized accessible name.
Verification
cd apps && pnpm --filter @kandev/web exec vitest run components/task/task-priority-indicator.test.tsx components/kanban-card-content.test.tsx components/task/task-item.test.tsx components/task/task-session-sidebar-item.test.ts components/task/mobile/session-task-switcher-sheet-item.test.ts --reporter=dot
cd apps/web && pnpm run typecheck
cd apps/web && pnpm run i18n:check && pnpm run i18n:ratchet
git diff --check
Files likely touched
apps/web/lib/kanban/task-priority.tsapps/web/lib/tasks/task-priority.tsapps/web/components/kanban-card-priority-indicator.tsxapps/web/components/task/task-priority-indicator.tsxapps/web/components/kanban-card-content.tsxapps/web/components/task/task-switcher-types.tsapps/web/components/task/task-session-sidebar-item.tsapps/web/components/task/mobile/session-task-switcher-sheet-item.tsapps/web/components/task/task-switcher-row.tsxapps/web/components/task/task-item.tsx- Focused test files beside these modules.
Dependencies
None.
Risks
- A stale import can leave one existing priority surface on a second metadata map.
- Inline priority and existing badges can reduce title width on dense nested rows.
Parallelism
sequential
Inputs
- Task priority visibility requirement and system-design indicator contracts.
- Existing
KanbanCardPriorityIndicatorbehavior and tests. - Existing
buildSidebarItemandtoSheetItemprojection patterns.
Results
- Added task-owned priority tokens, labels and validation under
lib/tasks. - Added a generic priority indicator and kept the kanban adapter compatible.
- Projected priority into desktop and mobile task-switcher items.
- Rendered non-medium priority after the title and before change-request badges.
- Added focused projection, fallback, accessibility and ordering coverage.