diff --git a/architecture.md b/architecture.md index 4ffa045..d0eeabe 100644 --- a/architecture.md +++ b/architecture.md @@ -486,7 +486,8 @@ The persisted modes are `detailed` (`pickup: tracking`), `compact` (`LIVE`), `symbol` (a state-specific Unicode glyph), `color` (one fixed glyph using the semantic status color), and `hidden` (no pickup indicator). Detailed is the backward-compatible default. Both mixer orientations use the same mapping; -horizontal mode reclaims the pickup footer row when the indicator is hidden. +horizontal mode reserves the pickup footer row even when the indicator is +hidden or the fader has no MIDI assignment, keeping every meter the same height. The TUI is mixer-first rather than exposing the profile's normalized tables as separate tabs. Its main list is an ordered presentation of logical faders and diff --git a/task.md b/task.md index d060d27..86b56e4 100644 --- a/task.md +++ b/task.md @@ -409,6 +409,8 @@ Dependencies: M8, M2, M1. Config also persists pickup-status presentation as Detailed, Compact, Symbol, Color, or Hidden. Both mixer orientations share the same state mapping, and hiding the indicator does not disable pickup protection. + Horizontal strips reserve an empty pickup-status row for unassigned or hidden + indicators so MIDI assignment never changes the meter height. Reordering saved layouts now resets TOML source-order metadata: parsed table positions previously undid accepted moves during serialization, causing the optimistic TUI swap to snap back. Regression tests cover repeated file reloads, diff --git a/tui/src/lib.rs b/tui/src/lib.rs index 3b23a54..b21dc31 100644 --- a/tui/src/lib.rs +++ b/tui/src/lib.rs @@ -4896,11 +4896,7 @@ impl LiveTui { self.snapshot.configuration.status_display, theme, ); - let footer_height = if area.height >= 9 && !pickup.text.is_empty() { - 4 - } else { - 3 - }; + let footer_height = if area.height >= 9 { 4 } else { 3 }; let meter_height = area.height.saturating_sub(footer_height); let meter_width = area.width.saturating_sub(4).clamp(3, 7); let meter_area = Rect::new( @@ -6210,6 +6206,10 @@ mod tests { fn pickup_status_display_modes_use_distinct_feedback() { let theme = ThemeName::Default.palette(); + assert_eq!( + pickup_display(None, StatusDisplayMode::Detailed, theme).text, + "" + ); assert_eq!( pickup_display( Some(PickupStatus::Tracking), @@ -6257,6 +6257,41 @@ mod tests { ); } + #[test] + fn horizontal_faders_reserve_an_empty_pickup_status_row_when_unassigned() { + let app = LiveTui::new(DemoClient::default()).unwrap(); + let mut assigned = app.snapshot.items[0].clone(); + assigned.pickup = Some(PickupStatus::Waiting); + let mut unassigned = assigned.clone(); + unassigned.pickup = None; + let area = Rect::new(0, 0, 16, 12); + + let render_meter_bottom = |item: &MixerItem| { + let mut buffer = Buffer::empty(area); + app.render_fader_strip( + area, + &mut buffer, + &MixerRow::Fader { + layout_id: None, + item, + density: FaderDensity::Standard, + }, + false, + ); + buffer + .content + .iter() + .position(|cell| cell.symbol() == "└") + .map(|index| index / usize::from(area.width)) + .unwrap() + }; + + assert_eq!( + render_meter_bottom(&assigned), + render_meter_bottom(&unassigned) + ); + } + #[test] fn mixer_layout_reorders_and_hides_while_settings_restores_faders() { let mut snapshot = DemoClient::default().view();