Skip to content

Fix NavigationSplitView overflow at small window with a wide sidebar#154

Closed
rexbron wants to merge 1 commit into
subpop:mainfrom
rexbron:fix-sidebar-min-window-clipping
Closed

Fix NavigationSplitView overflow at small window with a wide sidebar#154
rexbron wants to merge 1 commit into
subpop:mainfrom
rexbron:fix-sidebar-min-window-clipping

Conversation

@rexbron

@rexbron rexbron commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

At the minimum window width, dragging the room-list sidebar wide pushed the split-view content past the window — the sidebar shoved off the left edge and the detail pane spilled past the right, clipping content (the timeline looked like it was clipping its rows).

Cause

The window minimum (700pt) was smaller than rail (52) + sidebar max (360) + a usable timeline. When the user-dragged sidebar plus the detail's content couldn't both fit, NavigationSplitView overflowed the window instead of compressing the (sticky) sidebar. Logging confirmed the detail pane's frame growing past the visible window width while the sidebar was pushed to a negative x. The row heights themselves were always measured correctly — the apparent "row clipping" was content spilling past the window edge.

Fix

Restore the invariant window.min ≥ rail + sidebar.max + timeline.min, balanced across both levers so neither changes much:

  • Sidebar max 360 → 300 (ideal 300 → 280).
  • Window min 700 → 752 (height 500 → 480). Worst case now fits: 52 + 300 + 400 = 752.

The 752×480 minimum also fits a quarter-screen tile on a 14″ MacBook Pro at its default scaled resolution (1512×982 pt → quarter ≈ 756×491), with a few points of margin for macOS tiling gaps, so the window snaps cleanly into a 2×2 grid.

Testing

  • Window at minimum, sidebar dragged to its max → no clipping; sidebar stays fully on-screen, timeline content not cut off.
  • Window tiles cleanly into a quarter on a 14″ MBP (default scaling).

At the minimum window width, dragging the room-list sidebar wide pushed
the split-view content past the window: the sidebar shoved off the left
edge and the detail pane spilled past the right, clipping content (the
timeline appeared to clip its rows). The window minimum (700) was smaller
than rail (52) + sidebar max (360) + a usable timeline, so
NavigationSplitView overflowed instead of compressing the user-dragged
sidebar. Confirmed on main; shrinking the room list manually relieved it.

Restore the invariant window.min >= rail + sidebar.max + timeline.min with
a balanced adjustment:
- Sidebar max 360 -> 300 (ideal 300 -> 280).
- Window min 700 -> 752 (height 500 -> 480), which keeps the worst case
  fitting (52 + 300 + 400 = 752).

The 752x480 minimum is also chosen to fit a quarter-screen tile on a 14"
MacBook Pro at its default scaled resolution (1512x982 pt, quarter ~756x491)
with a few points of margin for macOS tiling gaps, so the window snaps
cleanly into a 2x2 grid.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@subpop

subpop commented Jun 27, 2026

Copy link
Copy Markdown
Owner

I think I fixed this in c808bd1...007fba4

@rexbron

rexbron commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

I think I fixed this in c808bd1...007fba4

I just built main [ffb1ee8] and I agree, the overflow to the left is fixed.

That said, we seem to have lost the compact view for the room list.

Screen.Recording.2026-06-27.at.09.12.32_quash.mp4

@rexbron rexbron closed this Jun 27, 2026
@subpop

subpop commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Oh, that might be a miscalculation because you don't have any spaces. I'll test that.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants