Skip to content

Migrate Debug sidebar to quadraui::MultiSectionView #296

Description

@JDonaghy

Summary

Migrate the vimcode Debug sidebar from per-backend section-walk paint

Why this fixes a real bug

The current Debug sidebar exhibits the breakpoint section > 50%
sizing bug — VARIABLES is cramped, WATCH is squashed against a big
gap, CALL STACK gets ~5 rows, and BREAKPOINTS gets a massive
over-allocation that's mostly empty space.

Migrating to MultiSectionView with SectionSize::EqualShare for all
4 sections gives 25% / 25% / 25% / 25% by construction. The bug is
fixed as a side-effect of the lift, not a separate code path.

Setup

Use the Extensions migration (commits 29c8cbc through 6f9f9de) as
a template:

  • Adapter render::debug_sidebar_to_multi_section_view(dap)
    4 sections (Variables, Watch, Call Stack, Breakpoints), each
    carrying a TreeView body. Sections expanded/collapsed via
    engine.dap_sidebar_section_expanded[i] (or equivalent).
  • ScrollMode::PerSection (each section scrolls independently —
    matches the existing per-section dap_sidebar_scroll[4]).
  • SectionSize::EqualShare for all 4.
  • Per-section scrollbars (scrollbar_size = 1.0 TUI, 8.0 GTK).

Cache body height + max_panel_scroll on engine (dap_sidebar_body_height,
dap_sidebar_max_panel_scroll etc.) so click handlers and drag
handlers consult the same layout the rasteriser used (the structural
fix from b406695).

Files to touch (template)

  • src/render.rs — adapter + DebugSidebarData field updates if any.
  • src/tui_main/panels.rsrender_debug_sidebar calls
    quadraui::tui::draw_multi_section_view.
  • src/tui_main/mouse.rs — Debug click handler routes through
    MultiSectionViewLayout::hit_test().
  • src/gtk/draw.rsdraw_debug_sidebar calls
    quadraui::gtk::draw_multi_section_view.
  • src/gtk/mod.rs — Debug click handler + body-height caching at
    the call site.
  • src/core/engine/mod.rsdap_sidebar_body_height: Cell<f32>
    if needed.

Smoke checklist

  • 4 sections render with chevrons + counts.
  • Sections collapse/expand on chevron click; chevron toggles /.
  • F5/F9/F10/F11 still drive debugger (the existing key handling is
    separate from sidebar paint/click — should be unaffected).
  • Variables tree still expands per-row (TreeView's own expand is
    preserved by composition).
  • Breakpoints section no longer over-allocates.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinfrastructureBuild, CI, distributionuiUI/rendering

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions