Skip to content

fix: remove ghost pane dividers and prepare winTerm 1.1.2#17

Merged
HelloThisWorld merged 1 commit into
mainfrom
codex/fix-v1.1.2-ghost-divider-lines
Jul 24, 2026
Merged

fix: remove ghost pane dividers and prepare winTerm 1.1.2#17
HelloThisWorld merged 1 commit into
mainfrom
codex/fix-v1.1.2-ghost-divider-lines

Conversation

@HelloThisWorld

Copy link
Copy Markdown
Owner

Summary

Fixes the ghost pane-divider lines visible in winTerm v1.1.1 and prepares the
v1.1.2 stable patch release.

Symptom: a visible divider line could render away from the actual pane
boundary — for example a full-height vertical line inside the larger
right-hand pane while the real vertical split sat farther left. Horizontal
divider overlays could likewise appear outside the split node that owns them.

Root cause: in Pane::_UpdateDividerPlacement() the drag hit target and
pointer target use a leading-edge coordinate system
(HorizontalAlignment::Left / VerticalAlignment::Top plus a margin of
dividerPosition - thickness / 2), but the visible _dividerVisual used a
primary-axis Center alignment with the same leading-edge margin. XAML
re-centers a Center-aligned element inside the space remaining after its
margin, so the visible line landed near
(container + dividerPosition) / 2 instead of dividerPosition — a ghost
line — while dragging still worked at the real boundary.

Fix (2 lines plus comments): the visible divider now uses the same
leading-edge alignment model as the pointer target — vertical dividers align
Left, horizontal dividers align Top — and stays centered on the split
position by subtracting half its own thickness in the margin. One divider now
renders exactly on each logical split boundary for all layouts, ratios, and
nesting depths; nested dividers stay confined to their owning split node.

Related issues

None filed; defect observed in the v1.1.1 release build.

Detailed changes

  • src/cascadia/TerminalApp/Pane.cpp_UpdateDividerPlacement(): vertical
    visible divider HorizontalAlignment::CenterLeft; horizontal visible
    divider VerticalAlignment::CenterTop; explanatory comments. No other
    runtime change.
  • scripts/winterm/test-pane-resizing.ps1 — new divider-placement regression
    boundary that isolates Pane::_UpdateDividerPlacement() without fixed line
    numbers and asserts: (1) vertical and (2) horizontal visible dividers share
    the hit target's leading-edge alignment; (3) the visible line is centered on
    dividerPosition by half its thickness; (4) the primary-axis Center
    pattern cannot silently return on any divider element; (5) the pointer
    target stays wider than the visible line; (6) _CreateDividerVisual() is
    reattached in the split-parent constructor, SwapPanes, _CloseChild,
    _Split, and Restore rebuild paths. The assertions were validated to fail
    against the v1.1.1 sources and pass against this branch.
  • Version metadata 1.1.1 → 1.1.2 (package 1.1.2.0, module 1.1.2, tag
    v1.1.2, channel stable): src/winterm/Branding/version.json,
    ReleaseMetadata.h, Package-winTerm.appxmanifest, WindowsTerminal.rc,
    shell/shared/version.json, winTerm.Shell.psd1 / .psm1,
    package-shell-assets.ps1, test.ps1, verify-branding.ps1,
    verify-version.ps1, WorkspaceDescriptor.h, WorkspaceSerializer.cpp.
  • Release documentation: new docs/releases/1.1.2.md (symptom, alignment
    fix, preserved behavior, unchanged schemas, 1.1.2 asset names, publisher,
    tag, and the unsigned-installer disclosure required unless a trusted
    Authenticode certificate is configured at publication); dated 1.1.2
    CHANGELOG.md entry; README.md current source version, release-note
    link, and build examples now 1.1.2 (stable /releases/latest URL and
    dynamic badge unchanged); docs/current-progress.md refreshed. The 1.1.1
    changelog entry, docs/releases/1.1.1.md, and historical references are
    preserved; StyleCop.Analyzers 1.1.118 is an unrelated NuGet version and
    was not touched.
  • The release workflow's generic guarded v* trigger is unchanged; the
    expected tag continues to derive from version.json.

Preserved behavior: 1-logical-pixel idle divider, centered 12-logical-pixel
pointer target, east-west/north-south cursors, continuous live resize,
minimum-size clamping, 25/33.333/50/66.667/75% snapping, Alt bypass, Escape
and pointer-cancellation rollback, one history record per committed drag,
Undo/Redo/Balance Panes, High Contrast brushes, compact pane headers.
PaneBorderSize, DividerVisibleThickness, and DividerPointerHitThickness
are unchanged. ConPTY, the VT parser, text buffer, renderer core, Unicode
width handling, input protocols, and OpenConsole internals are untouched.
Workspace schema 2, docking model 1, shell protocol 1, theme schema 1,
package identity, winterm.exe alias, privacy boundaries, and Microsoft
Terminal coexistence are unchanged.

Validation performed

Local (Windows 11 x64, Windows PowerShell; no native MSBuild/VS toolchain on
this host):

  • powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File .\scripts\winterm\test-pane-resizing.ps1 -Configuration Release -Platform x64 -SourceOnly — PASS
    (compiled pane-resize tests reported SKIP as handled by the parent suite).
  • powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File .\scripts\winterm\test.ps1 -Suite Smoke -Configuration Release -Platform x64 — PASS
    (includes verify-version.ps1 with all 1.1.2 assertions, branding,
    shell-asset, workspace, and privacy source boundaries; compiled unit tests
    reported SKIP as not part of the Smoke suite).
  • Negative test: the new divider-placement assertions were run against the
    unmodified v1.1.1 Pane.cpp and correctly failed with
    visible 'Center'; they pass on this branch.
  • git diff --check — clean.

Not available locally (no Visual Studio/MSBuild/Windows SDK toolchain on this
host): native Debug/Release compilation, compiled Relevant suite, packaging,
installer/Portable lifecycle, and the manual divider acceptance matrix
(split ratios, nesting, DPI scales, High Contrast states). These are
delegated to the pull-request GitHub Actions runs of
winterm-validation.yml and winterm-full-build.yml; no manual acceptance
case is claimed here.

Release boundary

This PR only updates the intended tag metadata to v1.1.2. The actual
v1.1.2 Git tag and Release must be created only after this PR is
squash-merged, on the exact resulting main commit, so
.github/workflows/release.yml can validate the tag against
version.json. No tag is created from this branch, and no existing tag or
Release is moved or replaced.

Checklist

  • The change is focused and does not include unrelated formatting.
  • Tests were added or updated where appropriate.
  • All tests claimed above actually ran and passed.
  • User-facing behavior and limitations are documented in this repository.
  • Version or schema changes include compatibility and migration notes.
  • Package identity, winterm.exe, and Microsoft Terminal coexistence remain isolated.
  • No command text, terminal output, clipboard content, credentials, or private paths are logged.
  • New source and script files contain the appropriate MIT license header.
  • I did not include generated build output, secrets, certificates, or local absolute paths.

The visible pane divider used a primary-axis Center alignment with a
leading-edge margin, so XAML re-centered it in the space remaining after
the margin and painted a ghost line away from the real split boundary
while the drag hit target stayed correct. The visible divider now shares
the leading-edge coordinate system of its pointer target: vertical
dividers align Left, horizontal dividers align Top, offset by the split
position minus half the visible thickness.

Adds divider-placement regression coverage to test-pane-resizing.ps1,
bumps version metadata to 1.1.2 (package 1.1.2.0, tag v1.1.2), and adds
the 1.1.2 changelog entry and release notes.
@HelloThisWorld
HelloThisWorld marked this pull request as ready for review July 24, 2026 12:31
@HelloThisWorld
HelloThisWorld merged commit 40c8d8e into main Jul 24, 2026
5 checks passed
@HelloThisWorld
HelloThisWorld deleted the codex/fix-v1.1.2-ghost-divider-lines branch July 24, 2026 13:52
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