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.rs — render_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.rs — draw_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.rs — dap_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
Summary
Migrate the vimcode Debug sidebar from per-backend section-walk paint
quadraui::MultiSectionView(quadraui: MultiSectionView primitive — eliminate per-backend section-walk drift #293), the second of thethree planned migrations after the primitive shipped.
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
MultiSectionViewwithSectionSize::EqualSharefor all4 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
29c8cbcthrough6f9f9de) asa template:
render::debug_sidebar_to_multi_section_view(dap)—4 sections (Variables, Watch, Call Stack, Breakpoints), each
carrying a
TreeViewbody. Sections expanded/collapsed viaengine.dap_sidebar_section_expanded[i](or equivalent).ScrollMode::PerSection(each section scrolls independently —matches the existing per-section
dap_sidebar_scroll[4]).SectionSize::EqualSharefor all 4.scrollbar_size = 1.0TUI,8.0GTK).Cache body height + max_panel_scroll on engine (
dap_sidebar_body_height,dap_sidebar_max_panel_scrolletc.) so click handlers and draghandlers consult the same layout the rasteriser used (the structural
fix from
b406695).Files to touch (template)
src/render.rs— adapter +DebugSidebarDatafield updates if any.src/tui_main/panels.rs—render_debug_sidebarcallsquadraui::tui::draw_multi_section_view.src/tui_main/mouse.rs— Debug click handler routes throughMultiSectionViewLayout::hit_test().src/gtk/draw.rs—draw_debug_sidebarcallsquadraui::gtk::draw_multi_section_view.src/gtk/mod.rs— Debug click handler + body-height caching atthe call site.
src/core/engine/mod.rs—dap_sidebar_body_height: Cell<f32>if needed.
Smoke checklist
▾/▸.separate from sidebar paint/click — should be unaffected).
preserved by composition).
References
MultiSectionViewprimitive4 separate TreeView instances; this migration unifies them under
one MSV).
becomes inert by construction once MSV layout drives both paint
and click).
(separate engine-level bug; MSV migration may surface it more
cleanly but won't fix it).