Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
description: "Tasks for 015-track-list-sizing — resizable track height and track-list width"
Tasks: Resizable track height and track-list width
Input: Design documents from specs/015-track-list-sizing/
Prerequisites: plan.md, spec.md, research.md, data-model.md, contracts/, quickstart.md
Tests: The spec does not request automated tests. Verification is by the quickstart.md scenarios and screenshots. The smoke test is unchanged and must stay green.
Organization: Tasks are grouped by user story. US4's compact layout moves forward into Foundational, because US1 and US2 reach 30 px rows and would clip controls without it.
Format: [ID] [P?] [Story] Description
- [P]: Can run in parallel (different files, no dependencies)
- [Story]: User story from spec.md (US1–US4)
All paths are relative to the repository root. AV = src/managed/Nota.App/ArrangementView.
Phase 1: Setup
- T001 Create the partial
src/managed/Nota.App/ArrangementView.Sizing.cswith the two-line AGPL-3.0-only SPDX header plus a comment header explaining why it exists (arrangement row/column sizing: state, snap/clamp, drag controllers, sidecar),namespace Nota.App; public sealed partial class ArrangementView { }
Phase 2: Foundational (blocks all stories)
Purpose: per-track row geometry, a variable header width, and header tiers, so every story can change sizes safely.
- T002 In
src/managed/Nota.App/ArrangementView.Sizing.csadd the constantsDefaultRowHeight = 64,MinRowHeight = 30,MaxRowHeight = 256, presetsCompactRowHeight = 30,StandardRowHeight = 64,LargeRowHeight = 128,SnapPx = 4;DefaultHeaderW = 228,MinHeaderW = 160,MaxHeaderW = 480,MinLanesW = 240; the stateprivate readonly Dictionary<int, double> _trackHeights(trackId → px; an absent key means 64) andprivate double _headerW = DefaultHeaderW; the helpersClampRowHeight,SnapRowHeight(h)(within 4 px of 30/64/128 → that preset, then clamp to [30, 256]) andTrackRowHeight(TrackVM t)(the stored height or 64) - T003 In
src/managed/Nota.App/ArrangementView.csremoveconst double RowHeight = 64:RebuildRowGeometry()andRowHeightAt(i)useIsSlimRow(t) ? GroupRowHeight : TrackRowHeight(t);RowTop(i)extrapolates past the end withDefaultRowHeight;_lanes.Height/_headers.Height(Math.Max(RowHeight, RowsHeight)at the three sites) useDefaultRowHeight;BuildTrackCard'sHeight = RowHeightbecomesHeight = RowHeightAt(index)(pass the effective height in) - T004 In
src/managed/Nota.App/ArrangementView.csturnconst double HeaderW = 228intoprivate double HeaderW => _headerW;. Keep everyWidth = HeaderWworking, and register each fixed-width header-column part in a newprivate readonly List<Control> _headerColumnPartsas it is built:_headers,zoomBar,leftBackdrop,_footerHeaders,footerHeaderPanel,_trackDropLine,_headerDropRing, and everyHeaderPanel(...)result (overview and sections rows) - T005 In
src/managed/Nota.App/ArrangementView.Sizing.csaddPruneTrackHeights()(drop ids no longer in_tracks, keep collapsed-group children: prune only against engine track ids) and call it fromRefreshinsrc/managed/Nota.App/ArrangementView.csbeforeRebuildRowGeometry() - T006 In
src/managed/Nota.App/ArrangementView.Sizing.csaddenum HeaderTier { Compact, Standard, Large }andstatic HeaderTier TierFor(double h) => h < 56 ? Compact : h < 112 ? Standard : Large - T007 In
src/managed/Nota.App/ArrangementView.csrefactorBuildTrackCard(TrackVM t)so the control factories (name/type-tag row, M/S/● chips, input/MIDI combo + monitor, fader + dB withMixGestureundo and automation-write wiring, pan bar, meter, spine, card shell plusAttachHeaderGestures,_headerCards/_volFaders/_volDb/_panBars/_metersregistration) are shared helpers.BuildTrackCardthen dispatches onTierFor(height)toBuildStandardCard(today's layout, pixel-identical at 64 px) and the tier builders below - T008 In
src/managed/Nota.App/ArrangementView.csaddBuildCompactCard: one line — spine, name (ellipsised), type tag (omitted when the card width leaves the name under ~40 px), M / S / ● chips (● only on instrument/audio tracks, as today), meter on the right; no combo, fader or pan; vertically centred; it must fit 30 px with no clipping. A group selected at compact height uses the same layout plus its disclosure triangle
Checkpoint: The app builds; at the default sizes the arrangement looks and behaves exactly as before (quickstart #10).
Phase 3: User Story 1 — Resize a track's height (P1) 🎯 MVP
Goal: drag a track's bottom edge (header or lane) to resize it; snap, clamp, double-click reset, multi-selection, persistence.
Independent Test: quickstart #1–#4, #7 (row part), #11, #12 (heights), #13.
- T009 [US1] In
src/managed/Nota.App/ArrangementView.Sizing.csadd the row-resize controller:BeginRowResize(int trackId, double pointerY, KeyModifiers mods)(target set = all track rows when Alt/Option is held — wired in US2 — the multi-selection whentrackIdis inSelectedTrackIds()with Count > 1, otherwise{trackId}; remember the start height and pointer Y),UpdateRowResize(double pointerY)(h =SnapRowHeight(start + dy), write to_trackHeightsfor the target set, store none at 64), andEndRowResize(); plusResetRowHeight(int trackId)(the track or its multi-selection → 64) - T010 [US1] In
src/managed/Nota.App/ArrangementView.Sizing.csaddRelayoutRowsLive()per research R4:RebuildRowGeometry(); for each card in_headerCardssetCanvas.SetTopandHeightfromRowTop/RowHeightAt; rebuild only the cards whoseTierForchanged (viaBuildHeaderCard, replacing the child in_headers); update_headers.Heightand_lanes.Height; move the seam grips;InvalidateVisualon_lanesand_overlay.EndRowResizecalls the fullRebuildHeaders()once - T011 [US1] In
src/managed/Nota.App/ArrangementView.cs(insideRebuildHeaders) add one transparent 6 px seam gripBorderper non-slim track row atCanvas.Top = RowTop(i+1) - 3,Width = HeaderW,Cursor = SizeNorthSouth, added after the cards (on top). PointerPressed with the left button → capture,BeginRowResize(double-click,ClickCount == 2→ResetRowHeight); PointerMoved →UpdateRowResize(e.GetPosition(_headers).Y); PointerReleased / CaptureLost →EndRowResize. Mark the events Handled soAttachHeaderGestures(select/reorder) does not fire. Keep the grips in a list soRelayoutRowsLivecan move them - T012 [US1] In
src/managed/Nota.App/ArrangementView.LaneControl.csadd a seam-band hit testint SeamRowAt(double y)(row i whoseRowTop(i+1)is within ±3 px of y, skipping slim group rows; −1 otherwise). In PointerMoved (no button) showSizeNorthSouthover the band. In PointerPressed check it before clip / trim / automation / selection hit tests and startBeginRowResize(double-click → reset); route move/release toUpdateRowResize/EndRowResizewhile a resize is active - T013 [US1] In
src/managed/Nota.App/ArrangementView.Sizing.cskeep the dragged edge under the pointer near the bottom of the viewport: duringUpdateRowResize, if the pointer is within 16 px of the scroller's bottom while growing, raise_scroller.Offset.Yby the delta; after shrinking, clamp the offset to the new extent - T014 [US1] In
src/managed/Nota.App/ArrangementView.Tracks.cscarry heights over: inDuplicateTracks, afternewIds, copy_trackHeights[ids[i]]→newIds[i]fori < min(count); inCopyTracks(and cut) store the selection's heights in order in a newprivate List<double?> _clipboardHeights; inPasteTracksAfterapply them tonewIdsin order (counts may differ — apply only matching positions). New tracks get no entry (default 64) - T015 [US1] In
src/managed/Nota.App/ArrangementView.Sizing.csadd the sidecar per contracts/track-view-sidecar.md:public void SaveTrackView(string bundleDir)writestrack-view.json{ "version": 1, "headerWidth": …, "trackHeights": [{ "index", "height" }] }(track index in engine order via_engine.TryGetTrackInfo(i, out ti); list only non-default heights; omitheaderWidthwhen 228; delete the file when everything is at its default; never throw — wrap in try/catch likeSaveSections). Addpublic void LoadTrackView(string bundleDir): clear the state; when the file is absent or corrupt use defaults; clamp heights to [30, 256] and width to [160, 480]; skip out-of-range indices; ignore files withversion > 1and unknown keys. Also addpublic void ResetTrackView() - T016 [US1] In
src/managed/Nota.App/MainWindow.Files.cscallTimeline.SaveTrackView(dir)afterTimeline.SaveSections(dir)inDoSaveAsync(beforeRecordVersion),Timeline.LoadTrackView(dir)afterTimeline.LoadSections(dir)on open (beforeRefreshAfterLoad()), andTimeline.ResetTrackView()next toTimeline.ClearSections()on New. Check that the History restore path reopens through the same load (quickstart #14)
Checkpoint: US1 is fully usable — single and multi-track resizing, saved with the project.
Phase 4: User Story 2 — Resize all tracks at once (P1)
Goal: Alt/Option-drag resizes every track; a "Track height" context submenu offers presets for the selection or all tracks.
Independent Test: quickstart #5, #6, #15.
- T017 [US2] In
src/managed/Nota.App/ArrangementView.Sizing.cscomplete the Alt/Option branch ofBeginRowResize: the target set = every non-return track id in the engine (including collapsed children, so they match on expand) while group slim bars stay 26 px. AddSetTrackHeights(IEnumerable<int> ids, double h)andSetAllTrackHeights(double h), each followed byRefresh/RebuildHeaders - T018 [US2] In
src/managed/Nota.App/ArrangementView.cs(ShowTrackMenu) andsrc/managed/Nota.App/ArrangementView.Tracks.cs(ShowTracksMenu) add a "Track height"MenuItembeside the colour submenu with radio items Compact / Standard / Large (ticked when every target is at that preset) for the clicked track or the selection, aSeparator, then "All tracks: Compact" / "All tracks: Standard" / "All tracks: Large"; useMenuKitstyling as the neighbouring items do - T019 [US2] Performance pass in
src/managed/Nota.App/ArrangementView.Sizing.cs: Alt-drag on a 40-track project must follow the pointer with no visible lag. Make sureRelayoutRowsLiverebuilds only cards whose tier changed, and coalesce pointer moves to one relayout per frame (Dispatcher.UIThread.Post(…, DispatcherPriority.Render)with a pending flag) if needed
Checkpoint: US1 and US2 together cover the issue's height requests.
Phase 5: User Story 3 — Resize the track-list width (P2)
Goal: drag the seam between headers and lanes; every header-column part follows; double-click resets; saved with the project.
Independent Test: quickstart #7 (seam), #8, #12 (width).
- T020 [US3] In
src/managed/Nota.App/ArrangementView.Sizing.csaddSetHeaderWidth(double w, bool final): clamp to [160, 480] and toBounds.Width − 240; set_headerW; setWidthon every_headerColumnPartsentry and every live card in_headerCardsplus the seam grips;InvalidateVisualthe lanes and overlay; whenfinal, callRebuildHeaders()and rebuild the footer rows (return/master) so their inner layouts re-measure - T021 [US3] In
src/managed/Nota.App/ArrangementView.csadd the column seam grip: a transparent 6 pxBorderwithCursor = SizeWestEast,HorizontalAlignment = Left,Margin.Left = HeaderW − 3, spanning the arrangement's full height (from the overview row through the footer) on the outer layout grid, on top. Drag →SetHeaderWidth(startW + dx, final: false), release →final: true, double-click →SetHeaderWidth(228, true). Update its margin insideSetHeaderWidth. It must not block the lanes' left-edge clip gestures beyond its 3 px overlap - T022 [US3] In
src/managed/Nota.App/ArrangementView.cshandle the window shrinking: on the view'sSizeChanged, re-clamp_headerWso the lanes keep ≥ 240 px (the lanes shrink first, then the headers clamp), without overwriting the user's stored width unless it no longer fits - T023 [US3] Check narrow widths in
src/managed/Nota.App/ArrangementView.cs: at 160 px the standard and large cards must not overlap — the input/MIDI combo shrinks (star column), the dB readout and type tag hide below a width threshold, and the name ellipsises; the group bar and footer rows likewise
Checkpoint: The width works independently of height.
Phase 6: User Story 4 — Headers that adapt to their size (P2)
Goal: the large layout above 112 px (compact and standard were delivered in Foundational).
Independent Test: quickstart #9 (all heights × widths), FR-010 scenario 4 reachability.
- T024 [US4] In
src/managed/Nota.App/ArrangementView.csaddBuildLargeCardusing the shared factories from T007: row 1 name + type tag; row 2 M / S / ●; row 3 the input combo + monitor chip (audio) or the MIDI-from combo (instrument) at full width; row 4 the volume fader with a dB readout (taller hit area); row 5 a full-width pan bar; the meter at full card height on the right. Lay rows out top-aligned with the Studio spacing fromDESIGN.md; there must be no clipping at 112 px and the layout must look intentional at 256 px (extra space below, nothing stretched oddly) - T025 [US4] In
src/managed/Nota.App/ArrangementView.csmake sure a selected group (which opens from a slim bar) usesTierFor(TrackRowHeight(group))and its builder keeps the disclosure triangle and drops record-arm/input asBuildTrackCarddoes today - T026 [US4] Confirm reachability (FR-010 scenario 4) in
src/managed/Nota.App/ArrangementView.cs: in compact, volume/pan stay reachable from the mixer, and record input / MIDI from from the track context menu (already present). Document anything missing in the PR; add no new controls
Checkpoint: All four stories are complete.
Phase 7: Polish & Cross-Cutting
- T027 [P] Studio design review per
DESIGN.md/ thenota-designskill: the seams highlight subtly on hover (neutralBrush.BorderStrongor similar token, no accent), cursors are right, and compact, standard and large look consistent in all four colour themes - T028 Run every scenario in quickstart.md, with screenshots at heights 30/56/64/128/256 × widths 160/228/480 (headless Avalonia or the in-app hook,
NOTA_DATA_DIRisolated); confirm SC-001…SC-006 - T029 Run the
nota-shortcutsskill: add the gestures from contracts/ui-gestures.md (edge drag, Alt/Option-drag for all, double-click reset, column seam drag and reset) to Preferences → Shortcuts
Nota closing tasks (PR gates)
- T030 Run
scripts/build.sh(orscripts/build-linux.sh/scripts/build-win.ps1) until native + managed + smoke test are green - T031 AGPL-3.0-only SPDX two-line header on the new
src/managed/Nota.App/ArrangementView.Sizing.cs(see CONTRIBUTING.md) - T032 New dependency: N/A (none added)
- T033
CHANGELOG.md[Unreleased]→ Added: resizable track heights (edge drag, Alt-drag for all, presets), resizable track-list width, size-adaptive track headers; reference nota-daw/nota#52 - T034 Run
nota-features(FEATURES.md) andnota-docs(arrangement page EN + RU in../nota-docs, with re-shot screenshots) - T035 Engine behaviour change → smoke test: N/A (UI-only; no engine change)
Dependencies & Execution Order
- Setup (T001) → Foundational (T002–T008) → the user stories.
- US1 (T009–T016): after Foundational. MVP.
- US2 (T017–T019): after US1 (reuses its controller and relayout).
- US3 (T020–T023): after Foundational only (T004); independent of US1/US2, but T015's sidecar already carries
headerWidth— if US3 ships first, move the width parts of T015/T016 here. - US4 (T024–T026): after Foundational (T007). Testable through the US2 presets or by seeding
_trackHeights. - Polish (T027–T035): after the desired stories.
Within a story the tasks are sequential: most edit ArrangementView.cs / ArrangementView.Sizing.cs.
Parallel Opportunities
Most tasks touch the same two files, so true parallelism is limited:
- T012 (
ArrangementView.LaneControl.cs) can run alongside T011 (ArrangementView.cs) once T009/T010 exist. - T014 (
ArrangementView.Tracks.cs) and T016 (MainWindow.Files.cs) can run in parallel with each other after T015's signatures exist. - US3 (T020–T023) and US4 (T024–T026) can run in parallel after Foundational if one person owns
ArrangementView.csmerges. - T027 and the docs tasks T033/T034 can run in parallel at the end.
After T010: T011 (ArrangementView.cs) ‖ T012 (ArrangementView.LaneControl.cs)
After T015: T014 (ArrangementView.Tracks.cs) ‖ T016 (MainWindow.Files.cs)
Implementation Strategy
- MVP: Setup + Foundational + US1 → per-track resizing, saved with the project. Validate quickstart #1–#4, #10–#13.
- +US2: resize all/presets → the issue's height request is complete.
- +US3: width seam.
- +US4: the large layout.
- Polish, docs, build gate,
/speckit-converge.
Notes
- Resizing is never put into undo, and it does not mark the project as having unsaved changes (research R2); the sizes save with the next save.
- Don't commit: the user reviews and commits.
Phase 8: Convergence
- T036 Stop the standard header layout clipping between 56 and ~61 px: its content needs ~61 px of visible height (measured: 67 px including the 6 px top/bottom margins), so at 56–60 px the volume/pan row is cut in half. In
src/managed/Nota.App/ArrangementView.Sizing.csraise the Compact→Standard boundary inTierForfrom 56 to the measured fit (≈62 px, keeping 64 px standard and 30 px compact inside their tiers), or tighten the standard card's vertical margins at low heights insrc/managed/Nota.App/ArrangementView.cs. Then update the 56 px figures inspecs/015-track-list-sizing/data-model.md/research.mdR7 only if the plan's tuning clause is used, and re-run the headless probe (every height 30–256 fits) per FR-010 / SC-003 (partial)