backlog-md/backlog/tasks/task-001 - Add-velocity-das...

2.3 KiB

id title status assignee created_date updated_date labels dependencies priority
task-001 Add velocity dashboard, Do Today feature, and label toggle filters Done
2025-12-07 06:25 2025-12-07 06:25
feature
web-ui
devops
medium

Description

Implemented three major features for the backlog web UI:

  1. Task Velocity Dashboard - Real velocity metrics using statusHistory data:

    • Completed (7d): Tasks completed in the last 7 days
    • Avg Cycle Time: Average time from "To Do" → "Done"
    • Avg Time to Start: Average time from "To Do" → "In Progress"
    • Avg/Week (4w): Average weekly throughput over 4 weeks
    • Weekly Velocity Bars: Visual bar chart showing completions per week
  2. "Do Today" Star Feature:

    • Added doToday field to Task type
    • Parser/serializer support for do_today frontmatter
    • Star icon toggle on TaskCard and TaskList items
    • "Today" filter button to show only starred tasks
    • URL parameter sync (?doToday=true)
  3. Clickable Label Toggle Filters:

    • Labels work as toggle filters in TaskCard and TaskList
    • Click to filter, click again to remove
    • Multiple labels can be active (AND filter)
    • Active labels shown in filter bar
    • URL parameter sync (?labels=bug,feature)

Implementation Notes

Files Modified

  • src/types/index.ts - Added doToday to Task and TaskUpdateInput
  • src/markdown/parser.ts - Parse do_today from frontmatter
  • src/markdown/serializer.ts - Serialize do_today to frontmatter
  • src/core/backlog.ts - Handle doToday in task updates
  • src/core/statistics.ts - Added VelocityStats interface and calculation using statusHistory
  • src/web/components/Statistics.tsx - Added velocity UI with charts and metrics
  • src/web/components/TaskCard.tsx - Added star toggle and clickable labels
  • src/web/components/TaskList.tsx - Added Today filter, label filters, doToday toggle

Technical Notes

  • StatusHistory is already recorded on task creation and status changes
  • Velocity metrics calculate from statusHistory entries
  • Existing tasks without history show "-" for velocity metrics
  • All new features sync with URL parameters for shareable links