Repository navigation
Fix Windows node ids and text dialog initial focus (beta17 Dev Box findings) - #665
Merged
Merged
Conversation
Dev Box qualification of 0.1.78-windows.beta17 found client-chosen node ids were a 48-bit timestamp behind a constant 00000000-0000-4000-8000- prefix, and the shared GraphCodeWindowsDialog (Rename Loop) opened with keyboard focus on its frame instead of the Title edit. Node ids are now random RFC 4122 v4 UUIDs in Swift's uppercase form for both draft and send-time generation. The dialog selects its first field on creation and routes WM_ACTIVATE/WM_SETFOCUS to the remembered control. The empty-title New Loop finding is intended macOS parity (NodeDraft isValid has no title requirement except composites; NewNode fallback), recorded in the parity ledger rather than changed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
3 of 5 tasks
coneilen
added a commit
that referenced
this pull request
Oct 9, 2026
Record the 0.1.78-windows.beta18 candidate at 880e6a3 (#662-#665), its local validation, package, custody and Dev Box handoff identities, and the 57/41 parity count. Move beta17 to history. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
2 of 5 tasks
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.
Summary
Fixes two Windows form/dialog findings from Dev Box qualification of
0.1.78-windows.beta17(4ab2fcf4) and documents a third as intended macOS parity: client-chosen node ids were a timestamp behind a constant00000000-0000-4000-8000-prefix, and the Rename Loop dialog opened with keyboard focus on its frame, so typing did nothing until the Title edit was clicked.Changes
Forms.generateDraftIdnow produces random RFC 4122 version-4 UUIDs (std.crypto.random, version/variant bits set) in Swift's uppercaseuuidStringform.DaemonClient.sendCreateNodeConfiguredand thesendCreateNodeDraftfallback use it instead of the request-id timestamp helper, and the now-unusednext_draftcounter is removed. Request and client correlation ids are unchanged.GraphCodeWindowsDialog(WindowsNativeDialogs.zig) selects the first field's text onWM_CREATE, focuses it after presentation, and routesWM_ACTIVATE/WM_SETFOCUSto the remembered control (saved on deactivation). Window creation and presentation moved intocreateDialogWindow/presentDialogwith no behavior change, so the test can drive the production path. This applies to every caller of the shared dialog, not only Rename Loop.GraphcodeKit/Sources/Domain/NodeDraft.swiftisValidsays "No title requirement:makeNodefalls back to "NewNode"" and only requires a title for composites (untitledFallback = "NewNode").graphcode/Sources/Features/Project/ProjectFeature+NodeForm.swiftthen asks the backend for a title viaTitleSuggestionClient, andgraphcode/Tests/NodeDraftTests.swiftassertsdraft.makeNode().title == "NewNode". WindowsForms.validateNodealready enforces the same composite-onlyEmptyTitlerule. The remaining gap is that Windows does not do the follow-up title suggestion yet. That is recorded in the ledger and left out of scope here.investigation/ui-parity-matrix.md: Loop rename and Node creation sheet rows record the findings, the fix, and the evidence limits. No row changes status.Test plan
All commands below ran from
graphcode-windowswith the bootstrap-pinned Zig 0.15.2 (.graphcode-tools\zig-0.15.2\zig.exe). The include path is.graphcode-tools\providers\winghostty\include. They ran on pre-rebase commit48198b5d. The rebase ontomainonly brought in #662, which touches packaging/uninstall scripts and none of the files changed here.RED: zig test src\Forms.zig --test-filter "zero-filled prefix" -> 0 passed, 1 failed (generated id is lowercase/zero-prefixed: expect at Forms.zig:881 failed); zig test src\DaemonClient.zig --test-filter "create-node wire" -> 0 passed, 1 failed (wire id starts with 00000000-0000-4000-8000-); zig test src\WindowsNativeDialogs.zig --test-filter "keyboard focus" -> 0 passed, 1 failed (TestExpectedEqual: GetFocus() returned a different HWND than the Title edit after ShowWindow activation)
GREEN: same three filtered commands -> 1/1 passed each (Forms, DaemonClient, WindowsNativeDialogs)
REGRESSION: zig test src\Forms.zig -> 159/159 passed; zig test src\Wire.zig -> 159/159 passed; zig test src\DaemonClient.zig -> 186/186 passed; zig test src\WindowsNativeDialogs.zig -> 15/15 passed; zig test src\NativeForms.zig -> 269/269 passed; zig test src\App.zig (full App link line) -> 891/891 passed; pwsh -NoProfile -File Tools\windows\Tests\WindowsShell.Tests.ps1 -> Windows shell scaffold contract: PASS (55 source files wired; 55 of 55 sections executed)
Evidence limits:
WM_CREATE,ShowWindow/SetForegroundWindowactivation,WM_SETFOCUS, andWM_ACTIVATEinactive/active. It does not send physical keystrokes, query UIA focus, or exercise a second app that steals foreground. The creator's Dev Box rerun of D6 (rename by typing) is still required.Tools\windows\validate.ps1 -Task windows-shell -SkipTrayLivedid not complete locally: Pester 6.2 rejects its-Scriptparameter, and with Pester 5.7.1 it stopped at the Worktree Git fixture path budget (this worktree path is too long, as AGENTS.md warns), soWindowsShell.Tests.ps1was run directly. Hosted CI is the authority for the full task.make test/make checkare macOS targets and were not run; this change is Windows-shell only.Checklist
git commit -s) per the DCOmake test) (macOS target, not run; Windows Zig roots above pass)make check) (macOS target, not run)