Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds native HMENU evidence for sketch promotion. Test-only: there is no production change.
Why this was a real gap
Two existing tests bracketed the hole without covering it. The sketch-promotion test at
GraphContextMenu.zig:431is plan-only, callingpromotionItems/promotionEnabled/promotionTargetwithout ever invokingbuildMenu, so no menu is created. The native testnative node menu variants expose only eligible actionsdoes build a real menu, but only setscomposite,can_arm,follows_templateandunwired, and never setssketch, so it never builds the "Promote to..." submenu.Nothing built a real native menu containing the promotion submenu.
What the test proves
The new test calls the same private
buildMenuused byshow, attaches the popup to a hidden real HWND, and asserts the full three-state matrix produced by the production gating:It also pins the exact three command IDs, ordering, captions, submenu title, and command mapping. The present-but-disabled state is the one a plan-only test cannot demonstrate.
Scope
App.zig,MainWindow.zig,GraphCanvas.zig,Sidebar.zig, the test runner and the providers are all unchanged. The diff is 77 added test lines with zero deletions, plus a single ledger row.Ledger row 100 stays
Partial: only the native HMENU/HWND clause is retired. The test does not show or select a popup and does not exercise keyboard, UIA, app launch, or real-daemon acceptance and persistence, so those clauses remain.RED: zig test src\GraphContextMenu.zig -target x86_64-windows-msvc -lc -luser32 --test-filter "sketch promotion production popup" (deliberately mutated item-count expectation 4) -> expected 4, found 3; 0 passed; 1 failed.
GREEN: zig test src\GraphContextMenu.zig -target x86_64-windows-msvc -lc -luser32 -> All 176 tests passed.
REGRESSION: zig test src\App.zig -target x86_64-windows-msvc -lc with provider and VT libraries -> All 647 tests passed.