Skip to content

Fix DPI192 connector drag UIA gate - #934

Merged
coneilen merged 1 commit into
mainfrom
coneilen-fix-connector-drag-uia
Oct 26, 2026
Merged

coneilen merged 1 commit into
mainfrom
coneilen-fix-connector-drag-uia

Conversation

@coneilen

@coneilen coneilen commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix the Windows live UIA gate's DPI192 connector-to-target drag cutoff without changing GraphCanvas, mouse routing, native edge forms, or #778 context-menu product behavior. The gate now freezes exact owned card geometry after Actual Size and drops within the target card's visible graph/client intersection instead of using an off-viewport full-card center.

Changes

  • Add a strict connector drag snapshot decision that preserves exact source/target identities and order, owned process IDs, non-overlap, viewport intersection, physical-screen coordinates, and absence of a preexisting native form.
  • Reconnect the UIA provider after Actual Size, cache immutable card ID/name/PID/bounds values, and derive the source connector from the exact outgoing side.
  • Intersect the target card with the live graph and client screen rectangles before selecting the native drop point; retain the raw target center in evidence to prove the DPI192 cutoff.
  • Send four held-button mouse-move samples before release while keeping the native Create or edit edge sheet and locked endpoint fields as the success identity.
  • Add DPI192 behavioral coverage for the off-viewport target center plus wrong connector, wrong target, wrong process, logical/physical coordinate mixing, and false-positive preexisting-dialog negatives.

Test plan

RED: pwsh -NoProfile -File Tools\windows\Tests\ValidationRunner.Tests.ps1 -> Get-ConnectorDragSnapshotDecision was not recognized at the DPI192 connector case
GREEN: pwsh -NoProfile -File Tools\windows\Tests\ValidationRunner.Tests.ps1 -> UiScenario 166/166 and UiCaptureDriver 182/182 passed
REGRESSION: pwsh -NoProfile -File Tools\windows\validate.ps1 -Task hardening -> repeated-runs PASS 3/3

  • Focused connector contract -> FOCUSED_CONNECTOR_DRAG_CONTRACT=PASS positive=1 cutoff=1 negatives=6 dpi=192.
  • PowerShell parser checks for Tools\windows\uia-live-gate.ps1 and Tools\windows\Tests\ValidationRunner.Tests.ps1 -> passed.
  • git diff --check and LF checks for both changed files -> passed.
  • Original head 4e07b00c5a94df748b08e279ef371d7832f9c9a0 -> all GitHub checks completed successfully or were intentionally path-gated skipped, including Windows shell integration, three unit shards, packaging, Windows spikes, deterministic hardening on Windows 2022/2025, DCO, TDD evidence, and privacy scan.
  • Rebased patch onto origin/main at 1219d228473238c168d0065def34d3baafc57b27; stable patch ID remained cc28f2557644a6bc85dd404f32e8b950d5f16a4f.
  • pwsh -NoProfile -File Tools\windows\uia-live-gate.ps1 -Shell graphcode-windows\zig-out\bin\graphcode-windows.exe -Zmx D:\gcp-5c0\zmx\zig-out\bin\zmx.exe with TEMP=D:\t5c3 -> connector drag passed at DPI192 with exact locked source/target endpoints; the gate advanced to the later unrelated lane cards do not normalize to the shared 250x96 geometry cutoff before Windows parity: Context menus carry the macOS item set and grouping #778 context-menu coverage.
  • Rebased live evidence: source [1229,853]; old target center [1759,853] outside the client/graph; corrected visible target [1584,853]; no preexisting dialog; coordinate space physical-screen.
  • Rebased local head validated before push: e0353c490d2aa01cbc986d3da20e3a9384b3e24d.

Checklist

  • I have read the Contributing Guidelines
  • I have signed off my commits (git commit -s) per the DCO
  • Tests pass locally (make test)
  • Code follows the existing style (make check)
  • I added the test/contract before the implementation and observed the intended RED failure

Freeze exact connector endpoint geometry after Actual Size, reject foreign coordinate spaces and preexisting dialogs, and drop within the target card's visible graph/client intersection.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
@coneilen
coneilen force-pushed the coneilen-fix-connector-drag-uia branch from 4e07b00 to e0353c4 Compare October 26, 2026 15:40
@coneilen
coneilen merged commit 35f9f01 into main Oct 26, 2026
32 of 34 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