You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make complementary tiled layouts meet exactly: no uncovered pixel seams and no missed screen edges.
Context
The split helpers in crates/panes-core/src/layout.rs floor each side independently. LeftHalf takes floor(w * split) from the left and RightHalf takes floor(w * (1 - split)) anchored to the right, so on a 1001px-wide work area both floor to 500 and a 1px column at x=500 is covered by neither. The same happens for top/bottom halves and corners on odd heights, and for non-0.5 ratios on many widths. Thirds are worse: third() uses unit = floor(extent / 3), so LastThird ends at 3 * unit, up to 2px short of the screen edge (on portrait screens the gap is at the bottom). Rectangle computes the trailing segment as the remainder (maxX - x) so tiles always meet the edge and each other.
This is core geometry, so Windows inherits the seams as soon as #6 lands.
Scope
Compute the trailing side of complementary splits as the remainder of the leading side: right width = max_x - left_width, bottom height analogously, corners combining both.
Make thirds span edge to edge: middle segments keep the floored unit, the last segment extends to max_x/min_y as appropriate for orientation.
Apply the same remainder rule to two-thirds bands where applicable.
Add tests on odd-dimension screens (e.g. 1001x801) and non-0.5 ratios asserting adjacent tiles share edges exactly and the last tile reaches the screen edge.
Keep rounding deterministic; the executor validation matrix in crates/panes-runtime/tests/command_flow.rs pins expected rects and will need updating for thirds on non-divisible widths.
Reference: Rectangle's LeftRightHalfCalculation.swift and third calculations compute complements from maxX rather than re-flooring.
Acceptance Criteria
Left + right halves cover the full work-area width with no gap or overlap for any width and ratio.
Top + bottom halves and the four corners tile exactly on odd dimensions.
First/center/last thirds cover the full extent with the last third flush against the far edge.
Tests cover odd dimensions, non-0.5 ratios, and portrait orientation.
Goal
Make complementary tiled layouts meet exactly: no uncovered pixel seams and no missed screen edges.
Context
The split helpers in
crates/panes-core/src/layout.rsfloor each side independently.LeftHalftakesfloor(w * split)from the left andRightHalftakesfloor(w * (1 - split))anchored to the right, so on a 1001px-wide work area both floor to 500 and a 1px column at x=500 is covered by neither. The same happens for top/bottom halves and corners on odd heights, and for non-0.5 ratios on many widths. Thirds are worse:third()usesunit = floor(extent / 3), soLastThirdends at3 * unit, up to 2px short of the screen edge (on portrait screens the gap is at the bottom). Rectangle computes the trailing segment as the remainder (maxX - x) so tiles always meet the edge and each other.This is core geometry, so Windows inherits the seams as soon as #6 lands.
Scope
max_x - left_width, bottom height analogously, corners combining both.max_x/min_yas appropriate for orientation.Implementation Notes
crates/panes-runtime/tests/command_flow.rspins expected rects and will need updating for thirds on non-divisible widths.LeftRightHalfCalculation.swiftand third calculations compute complements frommaxXrather than re-flooring.Acceptance Criteria
Validation
cargo fmt --all -- --checkcargo check --workspacecargo clippy --workspace --all-targets -- -D warningscargo test --workspace