diff --git a/components/tracks/TrackList.tsx b/components/tracks/TrackList.tsx index 2912888..f655fda 100644 --- a/components/tracks/TrackList.tsx +++ b/components/tracks/TrackList.tsx @@ -369,27 +369,47 @@ export function TrackList({ )} - {/* Automation Bar - Always visible and expanded above effects bar at bottom */} + {/* Automation Bar - Collapsible, above effects bar at bottom */} {!track.collapsed && (
- {/* Automation Header - Not clickable */} -
+ {/* Automation Header - Clickable to toggle */} +
{ + const currentLane = track.automation.lanes.find( + l => l.parameterId === track.automation.selectedParameterId + ); + if (currentLane) { + const updatedLanes = track.automation.lanes.map((l) => + l.id === currentLane.id ? { ...l, visible: !l.visible } : l + ); + onUpdateTrack(track.id, { + automation: { ...track.automation, lanes: updatedLanes }, + }); + } + }} + > + {track.automation.lanes.find(l => l.parameterId === track.automation.selectedParameterId)?.visible ? ( + + ) : ( + + )} Automation {track.automation.selectedParameterId || 'Volume'}
- {/* Automation Lane Content - Always visible */} + {/* Automation Lane Content - Collapsible */} {track.automation.lanes - .filter((lane) => lane.parameterId === track.automation.selectedParameterId) + .filter((lane) => lane.parameterId === track.automation.selectedParameterId && lane.visible) .map((lane) => ( -
+