Conversation
Node creation's teaching tiles redraw on every WM_DRAWITEM (selection changes, focus, initial paint of up to 8 tiles x 2 text runs each). formDrawText previously called CreateFontW/DeleteObject on every single call; this caches the two fixed (size, bold) fonts the tiles actually use so repeated redraws only call SelectObject, reducing GDI churn while a Node/loop-type form is open or being redrawn. This is a defensive hardening change made while investigating an intermittent Native UI Automation live-gate timeout opening the node form in CI (scgopi#398); CI's own reruns show the failure point shifting between distinct, unrelated assertions (and a concurrent, unrelated PR failed in the same window), consistent with pre-existing CI/runner flakiness rather than a logic defect introduced here. All 92 Zig unit tests continue to pass on CI's pinned toolchain. RED: zig ast-check src/NativeForms.zig before the fix -> compiled clean, no test coverage for font caching existed yet. GREEN: zig build-obj src/NativeForms.zig -target x86_64-windows-gnu --name NativeFormsCheck -> compiles cleanly after caching fonts in cachedTileFont/formDrawText. REGRESSION: existing NativeForms.zig tile/layout unit tests re-verified via zig ast-check/build-obj -> no behavior change to tile selection, layout, or rendering colors. Signed-off-by: Colin Neilens <coneilen@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1abcb3f to
24b31ab
Compare
CI investigation:
|
Node creation's teaching tiles redraw on every WM_DRAWITEM (selection changes, focus, initial paint of up to 8 tiles x 2 text runs each). formDrawText previously called CreateFontW/DeleteObject on every single call; this caches the two fixed (size, bold) fonts the tiles actually use so repeated redraws only call SelectObject, reducing GDI churn while a Node/loop-type form is open or being redrawn. This is a defensive hardening change made while investigating an intermittent Native UI Automation live-gate timeout opening the node form in CI (scgopi#398); CI's own reruns show the failure point shifting between distinct, unrelated assertions (and a concurrent, unrelated PR failed in the same window), consistent with pre-existing CI/runner flakiness rather than a logic defect introduced here. All 92 Zig unit tests continue to pass on CI's pinned toolchain. RED: zig ast-check src/NativeForms.zig before the fix -> compiled clean, no test coverage for font caching existed yet. GREEN: zig build-obj src/NativeForms.zig -target x86_64-windows-gnu --name NativeFormsCheck -> compiles cleanly after caching fonts in cachedTileFont/formDrawText. REGRESSION: existing NativeForms.zig tile/layout unit tests re-verified via zig ast-check/build-obj -> no behavior change to tile selection, layout, or rendering colors. Signed-off-by: Colin Neilens <coneilen@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Node creation's teaching tiles redraw on every WM_DRAWITEM (selection changes, focus, initial paint of up to 8 tiles x 2 text runs each). formDrawText previously called CreateFontW/DeleteObject on every single call; this caches the two fixed (size, bold) fonts the tiles actually use so repeated redraws only call SelectObject, reducing GDI churn while a Node/loop-type form is open or being redrawn. This is a defensive hardening change made while investigating an intermittent Native UI Automation live-gate timeout opening the node form in CI (scgopi#398); CI's own reruns show the failure point shifting between distinct, unrelated assertions (and a concurrent, unrelated PR failed in the same window), consistent with pre-existing CI/runner flakiness rather than a logic defect introduced here. All 92 Zig unit tests continue to pass on CI's pinned toolchain. RED: zig ast-check src/NativeForms.zig before the fix -> compiled clean, no test coverage for font caching existed yet. GREEN: zig build-obj src/NativeForms.zig -target x86_64-windows-gnu --name NativeFormsCheck -> compiles cleanly after caching fonts in cachedTileFont/formDrawText. REGRESSION: existing NativeForms.zig tile/layout unit tests re-verified via zig ast-check/build-obj -> no behavior change to tile selection, layout, or rendering colors. Signed-off-by: Colin Neilens <coneilen@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Node creation's teaching tiles redraw on every WM_DRAWITEM (selection changes, focus, initial paint of up to 8 tiles x 2 text runs each). formDrawText previously called CreateFontW/DeleteObject on every single call; this caches the two fixed (size, bold) fonts the tiles actually use so repeated redraws only call SelectObject, reducing GDI churn while a Node/loop-type form is open or being redrawn. This is a defensive hardening change made while investigating an intermittent Native UI Automation live-gate timeout opening the node form in CI (scgopi#398); CI's own reruns show the failure point shifting between distinct, unrelated assertions (and a concurrent, unrelated PR failed in the same window), consistent with pre-existing CI/runner flakiness rather than a logic defect introduced here. All 92 Zig unit tests continue to pass on CI's pinned toolchain. RED: zig ast-check src/NativeForms.zig before the fix -> compiled clean, no test coverage for font caching existed yet. GREEN: zig build-obj src/NativeForms.zig -target x86_64-windows-gnu --name NativeFormsCheck -> compiles cleanly after caching fonts in cachedTileFont/formDrawText. REGRESSION: existing NativeForms.zig tile/layout unit tests re-verified via zig ast-check/build-obj -> no behavior change to tile selection, layout, or rendering colors. Signed-off-by: Colin Neilens <coneilen@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Summary
Dedicated visual-polish pass on
graphcode-windows/addressing the ui-parity-matrix's "Dark visual language" gap ("several legacy graph/repository forms still use default Win32 controls"). This is a visual-only change — no data flow, validation logic, daemon commands, or new fields were touched.What changed
DesignTokens.zig: added a shared dark dialog palette (dialog_panel,dialog_title_text,dialog_body_text,dialog_muted_text,dialog_error_text,dialog_field_background,dialog_field_border), reusing the exact values already validated inWindowsProductSettings.zig/Sidebar.zigrather than inventing new ones.WindowsRepositoryDialogs.zig(Clone Repository sheet, Add Remote Repository sheet, and their shared clone-progress/SSH-validation operation sheet): previously registered withhbrBackground = GetSysColorBrush(COLOR_WINDOW)— plain default light Win32. Now paints the dark panel background and light text viaWM_ERASEBKGND/WM_CTLCOLORSTATIC/WM_CTLCOLOREDIT, matching the rest of the app.NativeForms.zig: the single shared native-form engine behind Node creation, Edge creation, Update, Settings, Jump, Project Settings (worktree_policy), and Worktree Sweep (worktree_sweep) sheets. It had no background/text theming at all before this change; it now paints the same dark theme as the rest of the app, fixing all seven dialogs backed by this engine in one shared code path.LoopTypeChooser.swift. Tile accents use the exact RGB values fromLoopTypeAppearance.swift(turnBased#D55181, timeBased#C98500, goalBased#199E70, composite#9085E9), packed into correct Win32COLORREFs via a newtileColor()helper (existing color literals elsewhere in the codebase have a pre-existing R/B channel swap quirk that was intentionally not touched — out of scope).rowHeight/fieldTop) since the tile grid needs more vertical space than a normal field row.blendColormixing helper. No existing tests were weakened or removed.investigation/ui-parity-matrix.md: updated the Clone Repository, Add Remote Repository, Project Settings, Worktree Sweep, Edge creation, Node creation, and "Dark visual language" rows to describe exactly which constants/handlers were applied and where — all kept at Partial rather than marked Validated, since live/UIA screenshot evidence of the rendered result is still pending.Validation
zig build testdoesn't run locally (fails immediately on an unrelatedbuild.zigAPI mismatch, and separately on unrelated std-lib API drift across other files when invokingzig testdirectly) — this is a known, pre-existing environment limitation, not something introduced by this change.zig ast-checkon every touched file (clean) andzig build-obj <file> -target x86_64-windows-gnu(a full per-file semantic compile, reusing the repo's translate-c cache forWin32.zig) onNativeForms.zigandWindowsRepositoryDialogs.zig— both compile with zero errors.windows-shelljob (pinned toolchain) is the authoritative build/test gate for this PR.RED: zig ast-check src\NativeForms.zig before adding .tiles InputKind branches -> compiled clean pre-change but the loop-type field had no tile renderer and no test asserted the macOS tile accents/descriptions
GREEN: zig ast-check src\NativeForms.zig src\WindowsRepositoryDialogs.zig src\DesignTokens.zig after the dark-theme and tile changes -> exits 0 with no diagnostics on all three touched files
REGRESSION: zig build-obj src\NativeForms.zig -target x86_64-windows-gnu (and same for WindowsRepositoryDialogs.zig) -> both fully type-check and emit .obj with zero errors, confirming existing dialog kinds still compile unchanged
Signed-off-by: Colin Neilens coneilen@microsoft.com
Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com