Skip to content

The first track of a session has its lanes 3px out per row, growing down the stack #663

Closed

Description

@thcp

Load the first track after opening the app and each waveform lane sits a little lower than its own fader: 3px on the second row, 6 on the third, 15 by the bottom. Load a second track and it is fine. Go back to the first and it is fine too.

What is actually happening

The hint under the footer, "Clicking 127.0 BPM, 77% of beats sit on a drum hit", is text from the beat analysis. It is display: none while empty and then takes 22px off the wave panel when the analysis lands, roughly a second after the track opens.

Lane heights are divided out of that panel by _applyLaneHeight and then baked into the multitrack as its tracks are built. On the first track of a session that build happens before the hint arrives, so the lanes keep the taller row while the mixer, sized in CSS from --lane-h, follows the shorter one. Every later track is built after the hint already exists, which is exactly why only the first one is ever wrong.

Why it has not been seen until now

The drift only shows if the 22px changes Math.floor(panelH / laneCount). With the footer's waveform strip present the panel is small enough that both sides of the change land on the same number. Remove or shorten anything in the footer and they stop agreeing.

So this is latent rather than visible today, and any change to the footer's height exposes it.

Constraints for whoever fixes it

  • Re-measuring afterwards does not work. A lane's height reaches the DOM through the multitrack's own render, and calling setOptions({ height }) on the wavesurfer afterwards does not move the row it has already built. Tried from the existing resize observer and again on canplay; neither moves anything.
  • That leaves two options: stop the panel changing height after the lanes are built, or delay building them until it has settled.
  • The mixer mirrors the lanes' scrollTop, so the two columns are meant to be geometrically identical. A fix that leaves them nearly identical is not one.

Activity

  1. added
    bugSomething isn't working
    on Sep 22, 2026
  2. self-assigned this
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions