Problem
quadraui ships primitives/split_tree.rs (916 lines): SplitTree::layout, hit_test_divider, hit_test_divider_cell, and ratio adjustment.
grep -rn SplitTree src/ → 0 uses anywhere in vimcode.
vimcode instead hand-rolls the same geometry across ~800 lines:
src/render.rs:20485-21008 (524 lines) — DividerGeometry trait, divider_hit_test, divider_ratio_from_pos, divider_to_split, DividerMetrics
src/render.rs:4472-4850 — divider grab/drag routing
- Per-backend metrics tables:
GTK_DIVIDER_METRICS at src/render.rs:4511 (quantize: false), while the TUI builds its own inline at src/tui_main/mouse.rs:2397
Those two metrics tables are one of the per-backend policy forks that keep render.rs from being genuinely neutral — the fork moved into the argument rather than out of existence.
Fix
Adopt SplitTree for divider layout, hit-testing and ratio adjustment on both backends. Delete src/render.rs:20485-21008 and the divider half of :4472-4850. Both metrics tables should collapse into whatever unit parameter SplitTree already takes.
If SplitTree cannot express the quantize-vs-continuous difference the two tables encode, file the quadraui gap and leave this open behind it rather than keeping the local copy.
Acceptance
- Black-box tests required, both backends: drag a window divider and assert the rendered split ratio changes; assert the divider hit zone is where paint put it.
- Assert on rendered output, not on state.
- State in the PR that the new tests fail against unfixed
develop.
Problem
quadraui ships
primitives/split_tree.rs(916 lines):SplitTree::layout,hit_test_divider,hit_test_divider_cell, and ratio adjustment.grep -rn SplitTree src/→ 0 uses anywhere in vimcode.vimcode instead hand-rolls the same geometry across ~800 lines:
src/render.rs:20485-21008(524 lines) —DividerGeometrytrait,divider_hit_test,divider_ratio_from_pos,divider_to_split,DividerMetricssrc/render.rs:4472-4850— divider grab/drag routingGTK_DIVIDER_METRICSatsrc/render.rs:4511(quantize: false), while the TUI builds its own inline atsrc/tui_main/mouse.rs:2397Those two metrics tables are one of the per-backend policy forks that keep
render.rsfrom being genuinely neutral — the fork moved into the argument rather than out of existence.Fix
Adopt
SplitTreefor divider layout, hit-testing and ratio adjustment on both backends. Deletesrc/render.rs:20485-21008and the divider half of:4472-4850. Both metrics tables should collapse into whatever unit parameterSplitTreealready takes.If
SplitTreecannot express the quantize-vs-continuous difference the two tables encode, file the quadraui gap and leave this open behind it rather than keeping the local copy.Acceptance
develop.