Skip to content

Add Windows prompt template library, apply, save, and detach workflow - #414

Merged
coneilen merged 2 commits into
mainfrom
coneilen-microsoft-windows-template-parity
Sep 22, 2026
Merged

coneilen merged 2 commits into
mainfrom
coneilen-microsoft-windows-template-parity

Conversation

@coneilen

@coneilen coneilen commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a native Windows prompt-template library that reads project and per-user Markdown templates, searches them from an explicit node-form action, and deterministically fills the typed node draft
  • preserve New Loop's default path to the node form even when saved templates exist, matching the macOS Templates control
  • add Save as Template and followed-template Detach actions with typed daemon encoding
  • cover template application, template-follow detection, detach wire format, WindowsShell contracts, and the explicit picker path in the UIA gate

Validation

RED: git show a6ada6a:graphcode-windows/src/App.zig -> A saved per-user template forced the picker before Create or edit node, so the default New Loop flow did not reach the node form.
GREEN: zig-0.15.2\zig.exe test src\TemplateLibrary.zig -> 61 template library and imported form tests passed, including deterministic goal and timed draft prefill.
GREEN: zig-0.15.2\zig.exe build -Dwinghostty-dir=..\.graphcode-tools\providers\winghostty -Doptimize=ReleaseSafe -> Windows ReleaseSafe shell build passed.
GREEN: pwsh -NoProfile -File Tools\windows\uia-live-gate.ps1 -Shell graphcode-windows\zig-out\bin\graphcode-windows.exe -> New Loop opened Create or edit node, explicit Templates opened the picker, and Enter returned to the node form before the later local toolbar assertion.
REGRESSION: pwsh -NoProfile -File Tools\windows\Tests\WindowsShell.Tests.ps1 -ZigExecutable $env:GRAPHCODE_ZIG0152 -> 97 Windows shell contract tests passed with the pinned Winghostty headers.
REGRESSION: pwsh -NoProfile -File Tools\windows\Tests\ValidationRunner.Tests.ps1 -> validation runner passed.

UI Automation regression resolved

The failed clean-runner windows-shell job established that the mandatory picker was this change's regression: its foreground diagnostics showed Choose a saved template while the existing empty-global New Loop scenario waited for Create or edit node. The shell remained alive and emitted UIA wait diagnostics; this was not the toolbar assertion or a shell crash.

The fix follows macOS: New Loop always opens the node form, and a saved-template library is available only from that form's explicit Templates action. The UIA scenario now proves the default form appears first, invokes the stable native Templates command, opens Choose a saved template, accepts with Enter, and returns to the form. The local interactive run next reaches the previously observed toolbar assertion, after the template workflow has completed; clean CI will revalidate that independent later gate.

@coneilen
coneilen force-pushed the coneilen-microsoft-windows-template-parity branch 3 times, most recently from dc11e24 to 32300e1 Compare September 22, 2026 19:25
coneilen and others added 2 commits September 22, 2026 14:22
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>
@coneilen
coneilen force-pushed the coneilen-microsoft-windows-template-parity branch from 32300e1 to 7bfab82 Compare September 22, 2026 21:22
@coneilen
coneilen merged commit 1994efb into main Sep 22, 2026
10 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