From 0babc469ccc1d6e3c71fbccd843dafd57193b725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Wed, 19 Nov 2025 13:09:44 +0100 Subject: [PATCH] fix: enforce minimum 360px height for all tracks using Math.max MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Track component now uses Math.max to ensure track.height is at least MIN_TRACK_HEIGHT - TrackList component also uses Math.max for consistent enforcement - Fixes issue where tracks with old height values (340px, 357px) were smaller - All tracks now guaranteed to be exactly 360px regardless of stored height 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- components/tracks/Track.tsx | 2 +- components/tracks/TrackList.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/tracks/Track.tsx b/components/tracks/Track.tsx index 30e5958..f12a060 100644 --- a/components/tracks/Track.tsx +++ b/components/tracks/Track.tsx @@ -641,7 +641,7 @@ export function Track({ } }; - const trackHeight = track.collapsed ? COLLAPSED_TRACK_HEIGHT : track.height; + const trackHeight = track.collapsed ? COLLAPSED_TRACK_HEIGHT : Math.max(track.height || MIN_TRACK_HEIGHT, MIN_TRACK_HEIGHT); // Track height resize handlers const handleResizeStart = React.useCallback( diff --git a/components/tracks/TrackList.tsx b/components/tracks/TrackList.tsx index f3e6ceb..629a0ed 100644 --- a/components/tracks/TrackList.tsx +++ b/components/tracks/TrackList.tsx @@ -7,7 +7,7 @@ import { Track } from './Track'; import { TrackExtensions } from './TrackExtensions'; import { ImportTrackDialog } from './ImportTrackDialog'; import type { Track as TrackType } from '@/types/track'; -import { DEFAULT_TRACK_HEIGHT, COLLAPSED_TRACK_HEIGHT } from '@/types/track'; +import { DEFAULT_TRACK_HEIGHT, COLLAPSED_TRACK_HEIGHT, MIN_TRACK_HEIGHT } from '@/types/track'; import { createEffect, type EffectType, EFFECT_NAMES } from '@/lib/audio/effects/chain'; import { AutomationLane } from '@/components/automation/AutomationLane'; import type { AutomationPoint as AutomationPointType } from '@/types/automation'; @@ -211,7 +211,7 @@ export function TrackList({
{/* Waveform - Takes remaining space */}