Skip to content

Align Windows context menus and connector creation - #816

Merged
coneilen merged 4 commits into
mainfrom
coneilen-microsoft-lane-e-issue-778
Oct 15, 2026
Merged

coneilen merged 4 commits into
mainfrom
coneilen-microsoft-lane-e-issue-778

Conversation

@coneilen

@coneilen coneilen commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Align Windows context-menu ordering and grouping with the supported macOS actions, show project-owned reclaimable Worktrees counts, and remove the duplicate background Create Edge action while preserving connector-drag edge creation. Add a test-only hidden-HWND semantic fallback for exact native menu item information; visual verification remains deferred.

Refs #778.

Changes

  • Order supported node actions, separators, promotion submenu, and Stop Loop wording consistently; keep unsupported actions absent.
  • Tighten the shared test-only expectNativeMenu helper to read IDs, type, state, submenu linkage, and bounded Unicode text through two-pass GetMenuItemInfoW; add a hidden-HWND oracle for six menu targets (39 positions) plus 12 native negative controls, and exact text/property checks for the edge menu. No product behavior, visible popup, foreground/physical input, or paint code changes.
  • Show the clicked project's reclaimable Worktrees count in project/background menus; omit zero or missing counts and keep menu availability independent from the count.
  • Remove background Create Edge and suppress empty global popups; preserve the separate Loop-menu Create Edge action.
  • Migrate connected-stub UIA creation to a uniquely named connector drag, verify locked endpoint IDs, and preserve rejection, correlated creation, edit/CAS, and cancel-no-mutation checks.
  • Preserve deliberate Windows extras, including Edit Details, Wire it up, Mark as entry, and Edit Edge. No shared paint/layout or parity-ledger changes.
  • The six-menu semantic fallback provides source-local native menu evidence for the supported slice; visual verification is explicitly deferred and not claimed here. Per Windows parity: Context menus carry the macOS item set and grouping #778's acceptance criteria, the complete per-card-type/state macOS item/order/separator match remains incomplete: Export Loop…, Import Loops Here…, and Change to Timed… stay absent as unsupported actions; project/background Export All Loops… and Import Loops… are not added, while Worktrees counts are shown. The retained Windows-only extras named above are deliberate, not claimed as removed. Paired-capture visual criteria and full menu parity are not claimed.
  • Rebased the three Lane E implementation commits and the test-only semantic fallback commit onto current main fde702b. git range-diff matched all four one-to-one, and GraphContextMenu.zig remains SHA-256 E09F335E0BA654DFCFE84BABF7F20162FD75C9BD06B14DFBCA6BDDDDE0AEB51B. Main advanced from G2 merge 65194b7 through Give the validation runner contract step headroom over its measured run time #825's validation-tooling changes (15-minute workflow cap and at least 12 minutes for the runner-contract step) and Bind capture admission to coordinator-leased job identity #824's capture-admission tooling changes in four Tools/windows files. This base move changes no product/provider/build inputs. G1/R1/R2 runner fields remain in place. The PR remains limited to the four approved files.

Test plan

RED: & $env:GRAPHCODE_ZIG0152 test src\GraphContextMenu.zig -target x86_64-windows-msvc -lc -luser32 "-I$include" -> 188 passed, 5 failed at runtime (expected command 5113 but found 5109; native menu lengths 9/7, 10/8 and 3/5; removed command 5120 still found). Separate project/background count tests each failed 1/1 because the positive count suffix was absent.
GREEN: & $env:GRAPHCODE_ZIG0152 test src\GraphContextMenu.zig -target x86_64-windows-msvc -lc -luser32 "-I$include" -> pre-fallback head 6ca0c59: All 195 tests passed on the unchanged product patch; registered App native link invocation with only --test-filter "context menu target preparation" -> All 1 test passed on that product patch; pwsh -NoProfile -File Tools\windows\Tests\UiScenario.Tests.ps1 -> 166/166 passed; git range-diff -> all three E commits matched and G1 runner child retained. Supplemental semantic test on working source SHA E09F335E0BA654DFCFE84BABF7F20162FD75C9BD06B14DFBCA6BDDDDE0AEB51B (now commit fae0a7b): $env:TEMP='C:\gcs\semantic-e-r1\scratch'; $env:TMP=$env:TEMP; & 'C:\gcs\ie\tools\zig-0.15.2\zig.exe' test src\GraphContextMenu.zig -target x86_64-windows-msvc -lc -luser32 '-IC:\gcs\ie\capture-head.graphcode-tools\providers\winghostty\include' --test-filter 'semantic fallback six E menus expose exact native item info on hidden HWND' --cache-dir 'C:\gcs\semantic-e-r1\zig-cache' --global-cache-dir 'C:\gcs\semantic-e-r1\zig-global-cache' -> 1/1 passed; six targets/39 positions and 12 expected negative controls. Historical hosted full-root proof from prior head a023630 (source-byte-equivalent historical evidence, not new-head execution): windows-shell unit shard 1, run 38669357363/job 116208586331 (PR event, attempt 1) -> GraphContextMenu root executed 196 tests; the semantic fallback was 6/196 with positive targets=6/observations=39 and negative controls=12, the edge menu test passed at 15/196, and All 196 tests passed. New exact-head hosted proof: windows-shell unit shard 1, run 38673178857/job 116220799384 (PR event, attempt 1, head b1ed0d7) -> GraphContextMenu root executed 196 tests and all 196 passed; semantic fallback was 6/196 with targets=6, observations=39, negative controls=12 (sketch-unwired=12, post-Goal=11); edge menu test passed at 15/196.
REGRESSION: gh pr checks 816 -R scgopi/GraphCode --required -> at v3 publication, 9 required contexts on exact PR-event head b1ed0d7: 7 passed, 0 failed, 2 path-gated skips. Windows shell run 38673178857 attempt 1 passed (unit shards 0–2, integration, packaging contracts, real-product packaging); hardening run 38673178840 attempt 1 passed on windows-2022 and windows-2025; DCO run 38673178842 attempt 1 passed; TDD run 38673178837 attempt 1 passed against the pre-v3 body; Linux and macOS builds skipped by path gate; full pinned Windows validation and gated environment hardening skipped by opt-in configuration. Windows-port run 38673179020 attempt 1 failed in Swift job 116220805294 during the required real zmx empty-list test because the provider build received HTTP response read failure fetching vaxis; attempt 2 was initiated once with gh run rerun 38673179020 -R scgopi/GraphCode --failed. The attempt-2 jobs endpoint repos/scgopi/GraphCode/actions/runs/38673179020/jobs?per_page=100 reports Swift job 116225253342 and aggregator 116226739910 failed, while terminal/contracts 116225255218, privacy 116225290471, and classifier 116225294563 passed; these are the actual jobs reported for that failed-jobs-only retry, not a separate full PR-workflow rerun. The attempt-2 validation contract suite reported 49 executed, 47 passed, 2 failed: lease-bound admission accepted through actual capture command reported “Capture command failed or changed default stdin inheritance”; the nested diagnostic at Invoke-UiCapture.ps1:429 was an Open call with 4 arguments that could not find cases\admission-accepted\runs\d2b6147126a3457aaa957d5d84d79082\process-journal.json. This identifies a missing journal file, not a stdin-inheritance change or malformed JSON; why the file was missing remains unknown. The second failure, actual rehearsal data satisfies the repaired report gate and refuses stale proof, reported “The repaired-core preflight does not prove a nonempty successful exact-source offline rehearsal,” consistent with the failed capture/report evidence; no separate cause is inferred. Both the Swift Windows-port validation step and required real-zmx step were skipped after the attempt-2 contract failure. Under #826, after verifying this diff excludes the four capture-core files, one final failed-jobs-only retry on the unchanged PR head was authorized and run with gh run rerun 38673179020 -R scgopi/GraphCode --failed; attempt 3 completed successfully on the same PR-event head b1ed0d7. Its actual jobs all passed: Swift 116228353984 (including runner-contract verification, Swift Windows-port validation, and the required real zmx empty-list test), terminal/contracts 116228355954, privacy scan 116228355596, changed-path classifier 116228355031, and aggregate windows-spikes 116235065527. The attempt-2 contract failures are an inherited, unrelated Windows-port validation flake, not evidence of an E menu product failure; the missing-journal mechanism remains unknown. The run exposed no uploaded artifacts. At publication, the latest TDD result was still the pre-v3 pass; this body edit triggers a fresh TDD check, whose outcome is reported separately.

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

Not verified

  • No full pinned Windows validation or live UIA run was performed locally. On current head b1ed0d7, Windows shell, hardening, and Windows-port CI passed after attempt 3; attempt-1's provider-fetch failure and attempt-2's two validation-contract failures remain recorded above. Linux and macOS builds are path-gated skips; full pinned Windows validation and gated environment hardening are opt-in skips. The previous a023630 CI remains historical. At v3 publication, the latest TDD pass was still against the pre-v3 body; this is not live UIA evidence or visual parity acceptance.
  • Central visual captures and different-vendor vision review are explicitly deferred. The expanded Promote submenu has no accepted macOS capture and is not claimed visually verified. The strict four-item submenu oracle remains unchanged. No capture was run during this rebase; the focused test is source-local semantic evidence, not visual or whole-issue parity acceptance.
  • The six-menu semantic fallback was added after the product implementation and is supplemental evidence of current native HMENU contents only; no compatible pre-E behavioral RED was run for this fallback. The 195-test GraphContextMenu run predates the shared-helper change; only the named filter was locally run on the test-only source, and the full suite was not rerun locally. It does not establish visible popup rendering, hover, physical input, accessibility, or visual parity.
  • make test and make check are macOS targets and were not run from this Windows lane. On current head b1ed0d7, Linux and macOS builds are skipped by path gating; full pinned Windows validation and gated environment hardening are skipped by opt-in configuration.
  • The first direct UiCaptureDriver run remains a 30/31 failure: the scene component regression saw incomplete current CIM metadata for PID 53232; rollback observed that the process had exited and both stdout/stderr had reached EOF. The one authorized unchanged confirmation passed 31/31; it does not erase the earlier failure, and no further local retry was run. These runs predate the fallback commit.
  • A stopped, disallowed ValidationRunner invocation under a reserved scratch root is not a full-suite pass. Retained local evidence shows hidden native prompt lookup (11) and hit (6) cases executed before the stop; the exact stop/cleanup evidence is preserved locally. These cases were executed, not NotExecuted.
  • The two original self-caused CI menu-oracle failures and the corrected strict four-item proof remain preserved in local evidence. No same-kind oracle failure occurred on the pre-fallback exact head 6ca0c59.
  • zig fmt --check reports the same baseline formatting issue on untouched HEAD copies of both Zig files; no unrelated whole-file reformat was applied.

@coneilen
coneilen force-pushed the coneilen-microsoft-lane-e-issue-778 branch 4 times, most recently from 797e0c7 to 6ca0c59 Compare October 15, 2026 00:20
@coneilen
coneilen force-pushed the coneilen-microsoft-lane-e-issue-778 branch from fae0a7b to a023630 Compare October 15, 2026 02:07
@coneilen
coneilen marked this pull request as ready for review October 15, 2026 02:42
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3129c073-8699-4d55-833b-204a9e80cb17
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3129c073-8699-4d55-833b-204a9e80cb17
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3129c073-8699-4d55-833b-204a9e80cb17
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3129c073-8699-4d55-833b-204a9e80cb17
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
@coneilen
coneilen force-pushed the coneilen-microsoft-lane-e-issue-778 branch from a023630 to b1ed0d7 Compare October 15, 2026 02:51
@coneilen
coneilen merged commit 112d458 into main Oct 15, 2026
31 of 35 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