Skip to content

chore(winui-sync): One manifest file per area - #26653

Merged
MartinZikmund merged 3 commits into
masterfrom
dev/mazi/winui-sync-area-files
Nov 23, 2026
Merged

MartinZikmund merged 3 commits into
masterfrom
dev/mazi/winui-sync-area-files

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: closes #26652

PR Type:

  • 🏗️ Build or CI related changes

What changed? 🚀

The WinUI port sync manifest moves from one file, build/winui-sync/areas.json, to a folder with one file per area, build/winui-sync/areas/<id>.json.

Every onboarding PR used to append its entry to the end of the same JSON array, so each time one merged, every other open onboarding PR conflicted on areas.json and needed a manual rebase (#26601, #26600 and #26612 each needed two in one day). The weekly sync PRs also all edited that one file when moving their baseline. Now an onboarding PR only adds a file and a sync PR only edits its own area's file, so PRs for different areas can't conflict over the manifest.

Tooling (WinUISync.psm1)

Function Change
Get-SyncAreas Reads every *.json in the folder, sorted by name. Rejects a file whose id doesn't match its file name, and a missing folder.
Get-SyncArea (new) Reads one area's file, or returns $null. Used by Publish-SyncArea and the workflow's port job.
Write-SyncArea (new) / Write-SyncAreas Write each area to its own file, in the same canonical shape as before. The id must be lower-case letters and digits, since it is now a file name (it already names the sync/winui/<id> branch).
Set-AreaBaseline Rewrites only the area's own file.
Get-SyncAreaAtRef (new) Reads an area as committed on a sync branch. For branches opened before this change, it falls back to the single areas.json there.
Get-SyncPlan Reads the open sync branch's baseline through Get-SyncAreaAtRef. If the branch has no entry for the area, it now uses master's baseline instead of reporting an error.
Get-CommitGroups Treats any file under the manifest folder as the manifest commit.

Also updated:

  • seed-area.ps1, detect.ps1 and publish.ps1 default to the folder. seed-area.ps1 -Write writes just the new area's file.
  • winui-port-sync.yml reads the area with Get-SyncArea.
  • The agent prompt now names build/winui-sync/areas/. The patch guard needs no change: it already refuses anything outside src/.
  • The README, the /winui-sync-onboard and /winui-port skills, the code-style rule and AGENTS.md describe the folder. The onboarding skill's scratch manifest becomes a copied folder.
  • The historical design docs under specs/winui-port-sync/ are left as written.

Migration

The 18 entries were written out with the module's own Write-SyncAreas and read back. They are field-for-field identical to areas.json before it was deleted.

Validation

  • Pester: build/winui-sync/tests/run.ps1 passes 138, 0 failed (134 before).
    • New tests: misnamed file, missing folder, Get-SyncArea, unsafe ids, Set-AreaBaseline leaving other areas' files untouched, and a sync branch that still has the single-file manifest.
    • Mutation check: with the legacy fallback disabled, exactly that last test fails.
  • Detection on the real repo: detect.ps1 against a full microsoft-ui-xaml clone gives the same plan as master's tooling on master's areas.json. All 18 rows are the same (status, baselines, open PRs fix(buttons): Sync Button controls with WinUI 2.6.5 #26470/fix(breadcrumbbar): Sync BreadcrumbBar with WinUI 2.6.5 #26502/fix(tabview): Sync TabView with WinUI 2.6.5 #26504), with an empty matrix and no errors. Only the row order changes, from manifest order to alphabetical by file name.
  • Workflow: as before, a workflow change is only exercised by a run from master. After merging, a single-area dispatch (selectorbar) will confirm it.

After merging

PR Checklist ✅

🤖 Generated with Claude Code

https://claude.ai/code/session_01TXMNtzaC5dx4oo2ZVG5BHB

MartinZikmund and others added 3 commits November 23, 2026 09:24
build/winui-sync/areas.json becomes build/winui-sync/areas/<id>.json, so
onboarding PRs only add a file and sync PRs only edit their own area's
file: PRs for different areas no longer conflict on the manifest.
Detection still reads a sync branch's baseline from the single-file
manifest when the branch predates the split.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNtzaC5dx4oo2ZVG5BHB
@github-actions github-actions Bot added area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation labels Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 23s —— View job


Review summary

Verdict: looks good, with one low-severity suggestion.

Severity Count
High / Medium 0
Low 1 (inline)

I read the diff of WinUISync.psm1, seed-area.ps1 and the workflow change. I did not run the Pester suite. The 138 passing tests come from the PR description.

  • Manifest split: the folder-per-area design is sound. Get-SyncAreas rejects a file whose id doesn't match its name, a missing folder and duplicate ids. Set-AreaBaseline now rewrites only its own file.
  • Legacy fallback: Get-SyncAreaAtRef reads the new path first, then the single-file areas.json on older sync branches. The Invoke-Git -AllowExitCodes 128 and Get-LastGitExitCode helpers it relies on exist.
  • Cross-cutting note: in the workflow, Get-SyncArea returns $null for an unknown id, so the next line $area.baseline = ... fails with a null-reference error. That matches the old behaviour, but a short explicit check would give a clearer failure for a bad area dispatch input.
  • Housekeeping: the commit style is Conventional Commits. The change adds no event, async or Uno.UI concerns, and the new tests are not skipped or ignored.

@mergify

mergify Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

Comment thread build/winui-sync/WinUISync.psm1 Resolved
@MartinZikmund
MartinZikmund merged commit a0669a8 into master Nov 23, 2026
18 of 20 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/winui-sync-area-files branch November 23, 2026 08:29
MartinZikmund added a commit that referenced this pull request Nov 23, 2026
Moves the branch's baseline into build/winui-sync/areas/buttons.json, which
replaced areas.json on master (#26653).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNtzaC5dx4oo2ZVG5BHB
MartinZikmund added a commit that referenced this pull request Nov 23, 2026
Moves the branch's baseline into build/winui-sync/areas/breadcrumbbar.json, which
replaced areas.json on master (#26653).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNtzaC5dx4oo2ZVG5BHB
MartinZikmund added a commit that referenced this pull request Nov 23, 2026
Moves the branch's baseline into build/winui-sync/areas/tabview.json, which
replaced areas.json on master (#26653).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNtzaC5dx4oo2ZVG5BHB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WinUI Port Sync: one manifest file per area

1 participant