diff --git a/app/roadmap/page.tsx b/app/roadmap/page.tsx index 78219a9..0d07ffc 100644 --- a/app/roadmap/page.tsx +++ b/app/roadmap/page.tsx @@ -16,6 +16,7 @@ export default function RoadmapPage() { const [roadmap, setRoadmap] = useState([]) const [loading, setLoading] = useState(true) const [expandedItems, setExpandedItems] = useState>(new Set()) + const [showCompleted, setShowCompleted] = useState(false) useEffect(() => { fetchRoadmap() @@ -155,80 +156,193 @@ export default function RoadmapPage() { {/* Roadmap Items */} -
- {roadmap.map((item, index) => { - const isExpanded = expandedItems.has(index) - return ( -
+ {/* Completed Tasks Section */} + {stats.complete > 0 && ( +
+ -
+
+ +

Completed Tasks

+ + {stats.complete} items +
+ + + + - {isExpanded && ( -
-
-
-
Expected Impact
-
{item.impact}
-
- - {item.items && item.items.length > 0 && ( -
-
Implementation Details:
-
    - {item.items.map((subItem, subIndex) => ( -
  • - - {subItem} -
  • - ))} -
+ {showCompleted && ( +
+ {roadmap + .map((item, index) => ({ item, index })) + .filter(({ item }) => item.status === 'complete') + .map(({ item, index }) => { + const isExpanded = expandedItems.has(index) + return ( +
+
toggleItem(index)} + > +
+
+
+ {getStatusIcon(item.status)} +

{item.title}

+ + {item.phase} + +
+

{item.description}

+ {item.completed && ( +
+ ✓ Completed: {item.completed} +
+ )} +
+ +
+
+ + {isExpanded && ( +
+
+
+
Expected Impact
+
{item.impact}
+
+ + {item.items && item.items.length > 0 && ( +
+
Implementation Details:
+
    + {item.items.map((subItem, subIndex) => ( +
  • + + {subItem} +
  • + ))} +
+
+ )} +
+
+ )}
- )} + ) + })} +
+ )} +
+ )} + + {/* In-Progress and Planned Tasks */} +
+ {roadmap + .map((item, index) => ({ item, index })) + .filter(({ item }) => item.status !== 'complete') + .map(({ item, index }) => { + const isExpanded = expandedItems.has(index) + return ( +
+
toggleItem(index)} + > +
+
+
+ {getStatusIcon(item.status)} +

{item.title}

+ + {item.phase} + +
+

{item.description}

+ {item.completed && ( +
+ ✓ Completed: {item.completed} +
+ )} +
+ +
+ + {isExpanded && ( +
+
+
+
Expected Impact
+
{item.impact}
+
+ + {item.items && item.items.length > 0 && ( +
+
Implementation Details:
+
    + {item.items.map((subItem, subIndex) => ( +
  • + + {subItem} +
  • + ))} +
+
+ )} +
+
+ )}
- )} -
- ) - })} + ) + })} +
{/* Footer */}