From e10b99621efc8528653152fd0566bf4d3fa09969 Mon Sep 17 00:00:00 2001 From: OpenClaw Bot Date: Thu, 19 Feb 2026 19:39:26 -0600 Subject: [PATCH] Show each sprint as separate section ordered by date --- data/tasks.json | 22 +++++++++++++++++- src/components/BacklogView.tsx | 42 ++++++++++++++++++++-------------- 2 files changed, 46 insertions(+), 18 deletions(-) diff --git a/data/tasks.json b/data/tasks.json index d2578c1..8239c96 100644 --- a/data/tasks.json +++ b/data/tasks.json @@ -482,7 +482,7 @@ ] } ], - "lastUpdated": 1771546378027, + "lastUpdated": 1771551465295, "sprints": [ { "name": "Sprint 1", @@ -494,6 +494,26 @@ "sprintId": "sprint-1", "id": "sprint-1", "createdAt": "2026-02-16T00:00:00.000Z" + }, + { + "name": "Sprint 2", + "goal": "", + "startDate": "2026-02-23", + "endDate": "2026-03-01", + "status": "planning", + "projectId": "1", + "id": "1771551323429", + "createdAt": "2026-02-20T01:35:23.429Z" + }, + { + "name": "Sprint 3", + "goal": "", + "startDate": "2026-03-02", + "endDate": "2026-03-08", + "status": "planning", + "projectId": "1", + "id": "1771551465241", + "createdAt": "2026-02-20T01:37:45.241Z" } ] } \ No newline at end of file diff --git a/src/components/BacklogView.tsx b/src/components/BacklogView.tsx index 44625a4..64975ca 100644 --- a/src/components/BacklogView.tsx +++ b/src/components/BacklogView.tsx @@ -189,7 +189,6 @@ export function BacklogView() { const [activeId, setActiveId] = useState(null) const [openSections, setOpenSections] = useState>({ current: true, - other: false, backlog: true, }) const [isCreatingSprint, setIsCreatingSprint] = useState(false) @@ -226,10 +225,6 @@ export function BacklogView() { ? tasks.filter((t) => t.sprintId === currentSprint.id) : [] - const otherSprintsTasks = otherSprints.flatMap((sprint) => - tasks.filter((t) => t.sprintId === sprint.id) - ) - const backlogTasks = tasks.filter((t) => !t.sprintId) // Get active task for drag overlay @@ -310,18 +305,31 @@ export function BacklogView() { /> - {/* Other Sprints Section */} - {otherSprints.length > 0 && ( -
- toggleSection("other")} - onTaskClick={(task) => selectTask(task.id)} - /> -
- )} + {/* Other Sprints Sections - ordered by start date */} + {otherSprints + .sort((a, b) => new Date(a.startDate).getTime() - new Date(b.startDate).getTime()) + .map((sprint) => { + const sprintTasks = tasks.filter((t) => t.sprintId === sprint.id) + return ( +
+ toggleSection(sprint.id)} + onTaskClick={(task) => selectTask(task.id)} + sprintInfo={{ + name: sprint.name, + date: `${format(new Date(sprint.startDate), "MMM d")} - ${format( + new Date(sprint.endDate), + "MMM d" + )}`, + status: sprint.status, + }} + /> +
+ ) + })} {/* Create Sprint Button */} {!isCreatingSprint ? (