Skip to content

fix(ui): widen split divider gaps to 16px so dividers are easy to grab - #43357

Merged
AmethystLiang merged 13 commits into
mainfrom
AmethystLiang/divider-grab-area-16px
Nov 17, 2026
Merged

AmethystLiang merged 13 commits into
mainfrom
AmethystLiang/divider-grab-area-16px

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Split dividers were hard to grab: the tab-group seam was 6px and the terminal seam 10px. This widens the real gap between split panes to 16px, so the grab area is layout space. It does not overlay pane content, so clicks, scrollbars, tab bars and line numbers next to a seam keep working.

  • Tab-group splits (both orientations): the in-flow gap is 16px (was 6px). The 3px line, its colors and its hover/drag highlight are unchanged.
    • The gap is painted with the editor surface.
    • Beside attached tab strips, the gap continues the strip fill and its bottom border, so two tab bars read as one band.
    • Where splits cross, the child line runs into the center of the parent gap. The parent owns its whole gap for clicks.
  • Terminal pane splits: the divider box is max(16px, thickness + 6px). The Settings > Terminal divider thickness (1–32px) still sets the visible line. The line's join extension no longer takes clicks, so a parent divider owns its whole box at crossings.
  • Dragging: the split keeps the seam where it was grabbed relative to the pointer, so a wider box doesn't jump on the first move. If the container moves or resizes mid-drag (sidebar, window or DevTools dock), the seam realigns under the pointer on the next pointer move. A normal release after a drag also realigns it, using the release position. While the pointer is held still, the seam moves with the layout until one of those events. Clamps, minimum sizes, pointer capture, cancellation and commit-on-release are unchanged.
  • Unchanged: DevTools docks (6px), the left/right sidebar edges, the Markdown outline and the diff file tree.

Also removes a CI e2e route that pointed at a spec deleted in #43014.

Panes next to a seam are slightly smaller: 10px per tab split, and 16 - (thickness + 6) px per terminal split when thickness is under 10px. Saved split ratios keep their meaning and restore unchanged.

Testing

  • pnpm tc, pnpm lint, pnpm check:changed (includes unit tests).
  • New unit tests for the drag ratio mapper: zero displacement at unequal ratios, exact displacement, container moving or resizing mid-drag, clamps, out-of-range restored ratios.
  • Dev app on macOS, in light, dark, window material and a high-contrast token override (not an installed theme), compared against main with the same layout:
    • Geometry: pane rects and seam hit areas, plus junction ownership in both nesting orders at divider thickness 1/4/10/16/32.
    • Dragging: drag from both box edges, clamps, terminal double-click equalize and minimum size, and mid-drag container resize for both orientations and both DevTools docks.
    • Drops:
      • tab drag-and-drop and "New split" drop zones next to a gap;
      • file drops swept across each gap at sampled offsets on both builds;
      • one drop-accepting web page next to a gap.
    • Persistence and paint: saved ratios after reload, and the gap paint beside tab strips.

Risk

Low. The change is renderer CSS and split-drag geometry only, with no data or IPC changes. To back it out, revert this PR; saved split ratios are unaffected either way.

Visual proof: before/after captures were reviewed but aren't attached, because they show local machine paths. The measured pixel and geometry results are summarized under Testing.

Known gaps and follow-ups

  • Not exercised:
    • a real OS (Finder) drag; file drops were driven through Chromium's drag events;
    • Linux, Windows, touch;
    • installed plugin themes;
    • performance under load.
  • File drops on the gap: the visible gap is a no-drop strip, as the old 6px tab / 10px terminal gap was, but it's now 16px wide.
    • Points that were pane space next to a seam on main now fall in the gap, so a file dropped there does nothing.
    • In the sampled layouts, the panes beside a seam still accepted drops at their new edge. That includes a terminal pane, an editor group and a drop-accepting embedded web page.
    • Surfaces without a drop owner, such as a terminal group's tab strip, don't accept drops, as on main.
  • Existing visuals, not changed here:
    • The terminal split line is faint (about 1.3:1) and doesn't change on hover.
    • Dragging looks the same as hover.
    • The 3px line can anti-alias on half-pixel positions, as before.
  • Small visual step: there is a slight two-tone step where a stacked gap meets the tab-strip band of a side-by-side gap.

Performance

Mostly CSS and layout geometry; no performance measurement or load trace was taken.

  • Gap size: the gap is a larger fixed flex size; no new layout work outside drags.
  • Drag mapper:
    • During an active tab-split or DevTools-dock drag, each delivered pointer move reads the container's getBoundingClientRect(). A normal release after a drag reads it once more. This replaces the per-drag ResizeObserver.
    • The read follows the previous move's flex writes, so it can force a layout per pointer move while dragging; its cost is unmeasured.
    • Nothing runs outside an active drag.
    • No timers, polling, IPC or store writes; ratios still commit once on release.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes add a shared minimum hit-area size for split dividers and update split-ratio calculations during dragging and pointer release. Tab-group split containers use nested clipping with a clip margin based on the hit-area size. Resize handles can use wide styling and an optional tab band. Divider pseudo-elements ignore pointer events, and the wide divider line can extend along its length.

Merge Risk: Minimal · up to 9ec2f

Split dividers get a larger grab area, and drag ratios now follow the pointer even when the container moves. No concrete defect or performance regression was found. Real-world drag performance under load was not measured, but nothing here warrants holding the merge.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description follows the template well. It has a clear Summary, a Testing section with specific commands and manual checks on macOS, a Risk section with a Low level and a backout plan, and a Known … Add an ELI5 section in plain language. Link an actual issue with 'Fixes #'. Attach BEFORE and AFTER visuals for the UI change, or attach a video, instead of stating they were not attached. Add the AI Disclosure section, or state tha…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: widening split divider gaps to 16px so dividers are easier to grab. The changeset widens the tab-group split gap from 6px to 16px and the terminal divider box to max(1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: widening split divider gaps to 16px so dividers are easier to grab. The changeset widens the tab-group split gap from 6px to 16px and the terminal divider box to max(16px, thickness + 6px), which matches the title. The title is specific and uses the fix(ui) convention.

Full details: Description check

Explanation

The description follows the template well. It has a clear Summary, a Testing section with specific commands and manual checks on macOS, a Risk section with a Low level and a backout plan, and a Known gaps section. It also has a Performance section, which the template does not require. Several template sections are missing or incomplete. The 'ELI5' section is absent. 'Linked Issue' has no 'Fixes #' reference; the objectives name PR #43357 but no linked issue is given. 'Visual Proof' is not supplied: the author says before/after captures were reviewed but not attached, and gives a reason that does not match the template's 'N/A' option or its required BEFORE/AFTER attachment. The 'AI Disclosure' and 'Agent skill upstream boundary' sections are absent. The testing checklist items are not ticked. The 'Review' and 'Notes' sections are absent. The 'What Changed' and 'Why' sections are present in substance, but the 'Why' section does not explain the alternatives considered.

Resolution

Add an ELI5 section in plain language. Link an actual issue with 'Fixes #<number>'. Attach BEFORE and AFTER visuals for the UI change, or attach a video, instead of stating they were not attached. Add the AI Disclosure section, or state that the author is a StablyAI team member. Complete the Agent skill upstream boundary checkbox. Explain why the chosen approach beats the alternatives in the Why section. Tick the testing checklist items that apply, and confirm the test anti-pattern checklist item.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6b94fba3-b984-4300-8708-fbfe201ac7e3
Commits

Reviewing files that changed from the base of the PR and between 7160736 and 9ec2f3d.

Files selected for processing: 1

  • config/scripts/workflow/source-routing/pr-feature-area-e2e-source-routes.mjs
Files with no reviewable changes: 1

  • config/scripts/workflow/source-routing/pr-feature-area-e2e-source-routes.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@AmethystLiang
AmethystLiang force-pushed the AmethystLiang/divider-grab-area-16px branch from 7160736 to 9ec2f3d Compare November 17, 2026 01:22
@AmethystLiang
AmethystLiang merged commit 5c9cae2 into main Nov 17, 2026
42 checks passed
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.

1 participant