Skip to content

fix(gui): console toggle pushes editor up and breaks scroll #132

Description

@bwyard

Summary

When the console panel is toggled open or closed, the code editor above it shifts position. After the toggle, the editor cannot be scrolled back to the correct position — the layout breaks until the window is resized or the app is reloaded.

Steps to reproduce

  1. Open Score Studio with a song loaded
  2. Open the console panel (bottom of the screen)
  3. Edit code in the editor — scroll down to see lower lines
  4. Toggle the console closed
  5. The editor jumps up — scroll position is lost and the top of the editor is partially off-screen or clipped

Expected

  • Console toggle should not affect editor scroll position
  • The editor panel height should recalculate smoothly when the console opens/closes
  • No layout shift — flex/grid layout should absorb the height change

Likely location

packages/gui/src/renderer/components/LiveCode/ — the layout container that holds the editor and console as a split. The resize/collapse animation may not be triggering a CodeMirror/Monaco layout recalculation.

Notes

  • This is especially bad when working in long song files — losing scroll position mid-edit breaks flow
  • Check if editor.layout() (Monaco) or equivalent is called after the console height changes
  • May need a ResizeObserver on the editor container to auto-recalculate

Related: the instrument panel and import toggle may have the same class of bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions