Skip to content

Match Windows New Loop sheet to macOS - #914

Merged
coneilen merged 27 commits into
mainfrom
coneilen-new-loop-parity-plan
Oct 22, 2026
Merged

coneilen merged 27 commits into
mainfrom
coneilen-new-loop-parity-plan

Conversation

@coneilen

@coneilen coneilen commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Rebuild the Windows New Loop sheet around the merged SheetFramework so Main, Goal, Timed, Turn, Composite, Templates, validation, and create outcomes follow the current macOS design.

Refs #769

Changes

  • Add the five-type New Loop presentation model and type-specific copy, fields, cadence/schedule composition, recap, keyboard shortcuts, validation reasons, and responsive SheetFramework geometry.
  • Extend the Windows node draft, template library, and wire encoder for Main, heartbeat cadence, goal token budgets, template attribution/follow metadata, and stable client-chosen IDs.
  • Preserve custody, attachment, worktree, context-drift, Escape/focus, DPI, and fixed-footer behavior while adding exact-ID post-create selection/open and non-composite type memory.
  • Add header Templates, applied-template context, goal metric/budget expanders, bounded asynchronous done-check testing, and Save as template flow.

Test plan

RED: & $env:GRAPHCODE_ZIG0152 test src\NativeForms.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 "-IC:\gcp\769\winghostty\include" --test-filter 'new loop:' -> 6/6 executed, 0 passed and 6 failed on missing Main/order/copy/recap and NewNode behavior
GREEN: & $env:GRAPHCODE_ZIG0152 test src\NativeForms.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 "-IC:\gcp\769\winghostty\include" --test-filter 'new loop:' -> all 27 tests passed; the original six RED contracts are green and twenty-one review/regression contracts were added afterward
REGRESSION: & $env:GRAPHCODE_ZIG0152 test src\NativeForms.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 "-IC:\gcp\769\winghostty\include" -> all 380 tests passed

  • & $env:GRAPHCODE_ZIG0152 test src\Forms.zig -> all 179 tests passed.
  • & $env:GRAPHCODE_ZIG0152 test src\TemplateLibrary.zig -> all 190 tests passed.
  • & $env:GRAPHCODE_ZIG0152 test src\Wire.zig -> all 179 tests passed.
  • App-focused native command with --test-filter 'new loop:' -> all 11 tests passed.
  • Full App executable root -> 1,563 executed, 1,541 passed, 22 skipped, 0 failed.
  • pwsh -NoProfile -File Tools\windows\Tests\WindowsShell.Tests.ps1 -ZigExecutable $env:GRAPHCODE_ZIG0152 -Shard 0 -ShardCount 3 -SectionManifest C:\gcs\769\shard0-new-loop-manifest.json -> all 21 assigned sections passed; the registered New Loop sheet root executed 2/2 tests and the issue Windows shell: 20 Zig test files (~95 tests) are never executed by any harness #424 anti-drift guard passed.
  • Focused retained-request regression -> passed with two retained commands, exact create request selection, raw triggerPrompt, and heartbeatIntervalSeconds: 3600; the obsolete 100x50ms last-command poll is absent.
  • Focused post-create isolation regression -> committed head lacked synchronization (RED); current gate first observes the created node's exact hashed workspace-loop-bar plus native Show in Graph, invokes that workspace action, then requires workspace markers gone and positive canvas cards before sketch/custody (GREEN). Exact shard 0 again passed all 21 assigned sections.
  • Focused custody regression -> after Time creation is remembered, the reopened child-submit path selects stable Turn tile 9600 exactly once, waits for owned visible field 9104 plus exact First instruction, then preserves the existing default-instruction/backend/turnBased submission assertions. The first cancel path remains type-agnostic.
  • Focused retained-custody regression -> passed with a create followed by a later recorder-overwriting command; custody wire authority now comes from the unique correlated receivedGraphCommands request, while recorder bytes remain evidence-only. Native instruction typing/readback is recorded as validated.
  • Native accessibility provider reported 224 checks and 0 failures.
  • pwsh -NoProfile -File Tools\windows\Tests\CustodyChild.Tests.ps1 -ZigExecutable $env:GRAPHCODE_ZIG0152 -> GraphContextMenu 2/2, NativeForms 4/4, GraphModel 2/2, App/imported custody 30/30 passed.
  • zig fmt ran on all six changed Zig files; staged diff check and all nine changed-file EOL checks passed with LF.
  • Local live integration retry was blocked before UIA by the scrubbed-startup harness failing to create its daemon rendezvous secret (CreateFileW, code 3); it did not exercise the Templates, recap, stable tile, or Goal validation actions. Fresh CI owns the live verification.
  • Superseded hosted head e802da9f ran every App test green (1,541 passed, 22 skipped, 0 failed) in each unit shard, then all three shards failed only because NewLoopSheet.zig was missing from the issue Windows shell: 20 Zig test files (~95 tests) are never executed by any harness #424 test-root registration; this head adds the required literal test invocation. Its separate live integration passed scrubbed startup (5/5), daemon round-trip, tray, and pre-UIA cleanup before an unrelated sketch/custody card-reveal progress assertion failed.
  • Final-retry hosted head 3f0122d6 proved the New Loop Time create itself: raw triggerPrompt='Summarize new commits', heartbeat cadence, daemon response/application, and rendering all passed. Its one-slot command log was immediately overwritten by the exact-ID outcome command, so the stale create poll consumed about five seconds before custody; this head instead reads the stub's retained request-ID history and does not increase any timeout. The outer failure record's deadlineMilliseconds=0 is diagnostic-only, not issue Capture action poll consumes the whole lease, leaving no budget for cleanup proof #866's capture-worker lease.
  • Hosted heads 8da961fe/7ee1529f/9c3ffcd2 proved retained create dispatch in about 10ms with heartbeat 3600, then exposed an asynchronous exact-ID activation race and destination mismatch. This head waits for the exact created-node workspace and uses its native Show in Graph action, the already-proven workspace return path; it preserves activateLoop, pan progress, and canvas input.
  • Hosted d807e35b proved Turn selection, native instruction typing/readback, backend switching, and stable submit fields; the remaining custody wire mismatch was another one-slot recorder overwrite. This head uses retained custody request history instead. Current main, including Stabilize remote bridge rotation test #916's remote-bridge timing stabilization and Preserve capture cleanup reserve during action polling #917's capture cleanup reserve, was signed-merged non-force.
  • Hosted 95e86fb8 proved custody native typing and submit, then showed the successful exact-ID outcome adds a second correlated graph command. Head a4f1eb01 now requires exact +2 graph/request/response/retained-command deltas, selects the unique create by its applied request ID, and selects one distinct answered request whose canonical wire is exactly the new child's resumeSession; a combined create/resume mutant is refused. The gate then returns from the exact child workspace through native Show in Graph before the final child-card hit test.
  • pwsh -NoProfile -File Tools\windows\Tests\ValidationRunner.Tests.ps1 -> PASS, including UiCaptureDriver 182/182. Final shard 0 rerun -> all 21 assigned sections passed, with App 1,563 executed / 1,546 passed / 17 skipped / 0 failed. Independent review found the distinct-outcome gap; the reviewed fix is included in a4f1eb01.
  • Local short-root integration passed isolation 5/5, shell smoke/stress, scrubbed startup 5/5, daemon round-trip, tray, and pre-UIA cleanup; live UIA then failed earlier on the pre-existing update-banner click before reaching New Loop/custody. Cleanup verified zero owned products.
  • Native GUI screenshots, physical keyboard, Narrator/screen-reader speech, and paired macOS visual review were not run. The PR remains draft and the parity ledger remains Partial pending separately admitted live evidence.

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

coneilen and others added 15 commits October 21, 2026 15:29
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Implement all five loop types on the shared SheetFramework, preserve typed template and wire metadata, and open created loops by their client-chosen IDs.

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>
Pass allocator ownership to template-save results, tolerate reentrant layout before tile creation, and update the SheetFramework cancellation fixture.

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>
Keep the captionless host title compatible with UIA while preserving the visible macOS New Node header.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Keep the native accessible name exact while preserving Ctrl+T and the existing template chooser dispatch.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Keep the owner-drawn recap while publishing dynamic pre-submit text through the native static name.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Keep stable UIA command IDs while matching macOS visual, shortcut, and native focus order.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Reset sheet scrolling and restore stable accessible fields when changing loop types.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Refresh the persistent title label when leaving Main so UI Automation sees the exact optional Name copy.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Prioritize Goal-specific summary and timing validation in the accessible footer and hide Composite-only guidance for other loop types.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Update the persistent paired label when leaving Main so UI Automation sees the exact First instruction copy at stable field 9104.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Expose the approved Goal, Time, and Turn reasons through the accessible footer before generic disabled fallbacks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Keep new timed tasks raw, derive bounded heartbeat seconds, preserve untouched legacy directives, and retain cadence in timed templates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
coneilen and others added 12 commits October 22, 2026 04:15
Wire NewLoopSheet.zig into the sharded Windows shell suite so the issue #424 anti-drift contract executes its tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Use retained daemon command history so the immediate outcome command cannot overwrite Time create evidence or consume the custody gate budget.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Return the connected shell to Graph after the intentional New Loop open outcome so independent custody canvas evidence starts on the correct surface.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Wait for the created loop workspace before returning the connected shell to Graph so custody evidence starts after exact-ID activation settles.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Wait for the exact created-loop workspace, then invoke its native Show in Graph action before independent custody evidence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Normalize only the reopened custody submit path through stable Turn tile 9600 before asserting its first-instruction field.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Set the reopened Turn child instruction in the live gate instead of assuming custody supplies a default value.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Validate custody create wire by correlated request ID and record native instruction editing without relying on the overwritten command recorder.

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>
Use retained custody request authority and the child workspace's native graph return before final rendered-card evidence.

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>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
@coneilen
coneilen marked this pull request as ready for review October 22, 2026 18:32
@coneilen
coneilen merged commit b285c6f into main Oct 22, 2026
27 checks passed
@coneilen
coneilen deleted the coneilen-new-loop-parity-plan branch October 22, 2026 18:33
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