{boards.map((board) => {
const groupId = board.activeFileGroupId;
const groupFiles = fileGroups[groupId] ?? [];
const isActiveBoard = board.id === activeBoardId;
const isOpen = !collapsed[board.id];
const color = BOARD_COLOR[board.boardKind];
// Status dot color
const statusColor = board.running
? '#22c55e'
: board.compiledProgram
? '#f59e0b'
: '#6b7280';
return (
{/* Board section header */}
{
switchToBoard(board.id, groupId);
if (!isOpen) toggleCollapse(board.id);
}}
title={`${BOARD_KIND_LABELS[board.boardKind]} — click to edit`}
>
{BOARD_ICON[board.boardKind]}
{BOARD_KIND_LABELS[board.boardKind]}
{/* New file button — visible on hover */}
{/* Files under this board */}
{isOpen && (
)}
);
})}
{/* Fallback: no boards yet */}
{boards.length === 0 && (