Skip to content

feat(winui-sync): Catch up ports on onboarding - #26474

Merged
MartinZikmund merged 11 commits into
masterfrom
dev/mazi/winui-sync-onboard-catchup
Nov 14, 2026
Merged

MartinZikmund merged 11 commits into
masterfrom
dev/mazi/winui-sync-onboard-catchup

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #26473

PR Type:

  • 🤖 Project automation

What changed? 🚀

Onboarding an area to the WinUI Port Sync used to record the port's current baseline and leave the whole catch-up to the weekly workflow. The workflow's port agent has a 3 USD cap per area, runs no tests, and is meant for small incremental diffs. Now the /winui-sync-onboard skill does the catch-up locally and records the area at the latest stable release in the same PR, so the workflow only ever ports what later releases change.

New flow in .claude/skills/winui-sync-onboard/SKILL.md:

  • Phase 1 – theme XAML. seed-area.ps1 now finds a control's theme XAML and adds it to the entry: Uno's FluentTheme copies and, for core controls, the upstream controls/dev/CommonStyles/<Name>_themeresources.xaml they come from. A file belongs to the area when its MUX Reference header names an upstream file of the area, or by name (folder areas: the folder's own XAML, not test pages; file areas: <Name>_Partial implies the CommonStyles file, case-insensitively, _perf2026 variants excluded). -NoThemeXaml opts out. Header scans read .xaml too.
  • Phase 2 – where the port stands. The header-derived baseline is now the catch-up's starting point. The outlier rules are unchanged; stale outlier files are brought up to date instead of only reported.
  • Phase 4 – catch-up. Works from a scratch copy of areas.json (the repository's manifest is written once, at the latest tag, so a starting-point entry is never left behind), sizes the diff with detect.ps1, and renders the workflow's own prompt.md for the area (Expand-SyncPrompt), so the port rules and the Ported / Not applicable / Skipped report are the same as CI's. Locally the session may run tests, commit, port larger dependencies and change project files (called out in the PR). Strings are mirrored with Sync-AreaStrings. Skipped items get their own issue, since the baseline moves past them.
  • Phase 5 – line-by-line review. Every upstream file at the latest tag is paired with its Uno file(s) and compared member by member, statement by statement. Each member is matches, differs and marked, differs and unmarked (a gap to fix), missing (port it), or Uno-only. Ported tests are checked for missing or disabled methods. Reviewed files get their MUX Reference header bumped to the latest tag, so headers become trustworthy for later seeds. Large areas may split the review across subagents per file pair; only the main session edits.
  • Phase 6 – workaround audit. Every deviation in the area (TODO Uno, #if HAS_UNO, // Uno specific, // Uno workaround, platform #ifs, OperatingSystem.Is*(), Uno-only members, disabled tests) is judged obsolete (removed, with build and tests as proof), still needed (concrete reason, tried without it when cheap) or unclear (kept and reported). Disabled tests are re-enabled and rerun.
  • Phase 7 – verify and record. Strict build (without UnoFastDevBuild), the control's runtime tests, WinUI parity tests where behaviour is unclear, the real entry written at the latest tag, then detection must show no remaining change.
  • Phase 8 – commits reuse the workflow's messages, with a separate refactor(<id>): Remove obsolete Uno workarounds commit between the fix and test commits.
  • Track-only mode keeps the old behaviour for areas too large to catch up in one session; it never moves the baseline.
  • New rules: an area is recorded at the latest tag only together with the catch-up and review; workarounds are removed only with evidence; every remaining difference from upstream carries a /winui-port marker.

build/winui-sync/README.md describes the new onboarding flow.

Existing areas: tabview, breadcrumbbar and selectorbar now list their FluentTheme styles (their upstream XAML is already inside the mapped folders and their baselines predate Uno's copies, so nothing is skipped). navigationview and buttons got theirs in their open sync PRs, #26456 and #26470, after checking every copy matches WinUI 2.6.5; buttons also gained the six upstream CommonStyles files, so the area now tracks the button styles at all.

Tracked headers carry no version: once an area is tracked, areas.json records its version, so MUX Reference headers in it name only the upstream file. Remove-MuxReferenceVersion drops , tag ... / , commit ... from header comments (BOM and line endings kept); onboarding runs it after writing the entry, the port agent's prompt no longer bumps tags and removes any it finds, and code-style.md / /winui-port state the exception. Applied here to TabView, BreadcrumbBar and SelectorBar (45 files, one header line each); NavigationView (#26456), buttons (#26470) and SplitButton (#26476) got theirs on their branches.

PR Checklist ✅

Other information ℹ️

  • Runtime (local): the skill's prompt-rendering snippet (Get-SyncAreas → Get-LatestStableTag → Expand-SyncPrompt) was run against the tracked buttons area and a full WinUI clone; it produced the per-file diff commands from the area's baseline to winui3/release/2.6.5.
  • Runtime (tooling): 118 Pester tests pass, including new ones for theme XAML detection (header match, headerless name match, CommonStyles casing, perf variants, test pages, names with digits and underscores) and for seed-area.ps1 adding and -NoThemeXaml omitting them.
  • Runtime (real clone): detection run against all five tracked areas found exactly their styles (4 NavigationView, 2 each for BreadcrumbBar/SelectorBar/TabView, 6 CommonStyles pairs for buttons, two of them headerless).
  • First full onboarding: chore(winui-sync): Onboard SplitButton at WinUI 2.6.5 #26476 onboards SplitButton with the new flow (catch-up, line-by-line review, workaround audit, 10/10 runtime tests, entry at 2.6.5 with the theme XAML added by detection).
  • Tooling code changed too: WinUISync.psm1 (Find-AreaThemeXaml, XAML headers in Get-MuxReferences), seed-area.ps1 (theme XAML mapping, -NoThemeXaml) and areas.json.
  • The skill references markers measured in today's ported code (TODO Uno and #if HAS_UNO are the most common) and the conventions of the /winui-port skill.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw

Onboarding now brings the port up to the latest stable WinUI release locally before recording the area at that release: it ports the diff since the port's baseline, reviews the whole port line by line against the release, re-justifies or removes each Uno workaround with evidence, and runs the control's tests. The weekly workflow then only ports later releases. A track-only mode keeps the old behaviour for areas too large for one session.

Closes #26473

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
Copilot AI balanced review requested due to automatic review settings November 14, 2026 09:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions github-actions Bot added area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation labels Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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


Review of #26474: catch-up on onboarding

Verdict: ship. I found 0 blocking issues and posted no inline comments.

The change is Markdown only, in the skill and the README. I checked the PowerShell calls in the new Phase 4 and Phase 7 against build/winui-sync/WinUISync.psm1:

  • Get-LatestStableTag -UpstreamRepo, Get-SyncAreas -ManifestPath and Set-AreaBaseline -ManifestPath -Id -Sha match the module's signatures.
  • Expand-SyncPrompt takes -TemplatePath, -Area, -TargetTag, -TargetSha, -UpstreamRepo and -UpstreamDir, as the skill uses it.
  • Sync-AreaStrings takes -UpstreamRepo, -Ref and -UpstreamStrings. I did not check -UnoStrings, because the grep hit cut off after the third parameter.

I did not run the new flow. The PR description says the same: only the prompt-rendering snippet was run.

Non-blocking suggestions

  • Subagent notice (Phase 5, step 6). "Tell the user how many subagents you are about to start" could stall an unattended session. Consider "say so in the report if no one is there to confirm".
  • Skipped-items issue (Phase 4). Phase 4 requires filing one, but Phase 8 only says to push and open a PR when the user asks. Say whether the skill may file the issue without being asked. It is outward-facing, and the baseline move depends on it.
  • Baseline moves after the review (Phase 7). The baseline moves to the latest tag only after the review, the audit and the tests pass, which is the right order. Add that a failed Phase 7 means falling back to track-only or leaving areas.json at the starting point. Otherwise a partial run could be committed at the latest tag, the failure mode the new rule warns about.
  • Manual checks. The line-by-line review and the workaround audit have no automated check. The "detection shows no change" step only proves the baseline moved. That is fine for a skill, but the first onboarded area should be reviewed carefully, as the PR notes.

@mergify

mergify Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

The catch-up works from a scratch copy of areas.json, so a starting-point entry is never left in the repository's manifest; the real entry is written once, at the latest tag. Also maps the control's FluentTheme XAML and, for core controls, its upstream CommonStyles file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
Copilot AI balanced review requested due to automatic review settings November 14, 2026 09:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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


Review of #26474: catch-up on onboarding

Verdict: ship, with a few non-blocking suggestions. I found 0 blocking issues. I posted no inline comments. The change is Markdown only, in the skill and the README. I did not run the new flow.

Non-blocking suggestions

  • Failed Phase 7. The skill never says what to do when Phase 7 fails after the review. Say that areas.json stays untouched, or that the run falls back to track-only at the starting point. The scratch manifest already keeps the repository at the starting point. An explicit rule would stop a partial run from being recorded at the latest tag.
  • Skipped-items issue (Phase 4). The skill requires an issue, but Phase 8 says to push and open a PR only when asked. Say whether the skill may file the issue unprompted. The issue is public and outward-facing, and the baseline move depends on it.
  • Subagent notice (Phase 5, step 6). "Tell the user how many subagents you are about to start" could stall an unattended session. Consider "state it in the report if no one is there to confirm".
  • Track-only entry. The Phase 4 track-only note sends the run to "Phase 7, steps 4 and 5", but those steps assume the latest-tag baseline. Detection will show a diff in track-only mode. Say that a diff is expected there.
  • Unattended runs. The review and audit are manual checks with no automated proof. The first onboarded area should get a careful human review, as the PR description already says.

@unodevops

Copy link
Copy Markdown
Contributor

MartinZikmund and others added 3 commits November 14, 2026 11:15
The seed now finds a control's theme XAML and adds it to the entry: Uno's FluentTheme copies, and for core controls the upstream CommonStyles file they come from. A file belongs to the area when its MUX Reference header names an upstream file of the area, or by name (folder areas: the folder's own XAML; file areas: <Name>_Partial implies CommonStyles/<Name>_themeresources.xaml, case-insensitively, perf variants excluded). -NoThemeXaml opts out.

Header scans also read .xaml files now; a XAML file without a header is not reported as missing a commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
Adds the FluentTheme styles of TabView, BreadcrumbBar and SelectorBar to their areas, so the port agent is told where they are. Their upstream XAML is already inside the mapped folders and their baselines predate Uno's copies, so no upstream change is skipped. NavigationView and the button controls get theirs in their open sync PRs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
Copilot AI balanced review requested due to automatic review settings November 14, 2026 10:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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


Review of #26474: catch-up on onboarding

Verdict: ship, with minor fixes. There are 0 blocking issues and 2 minor ones, both posted inline. I did not run the Pester suite or the new onboarding flow.

Cross-cutting concerns

  • The PR description is out of date. It says "Only Markdown changes; no tooling code changed, so the Pester suite is unaffected". The branch now also changes WinUISync.psm1, seed-area.ps1 and areas.json, and adds Pester cases in Seed.Tests.ps1. The added code is Find-AreaThemeXaml, a new -NoThemeXaml switch, and XAML scanning in Get-MuxReferences. Update the description to cover the theme-XAML mapping, and note that the Pester suite should be run. Two earlier bot reviews on this PR called it Markdown-only, so their verdicts did not cover this code.
  • Get-MuxReferences now scans XAML. A XAML file with an old MUX Reference tag can now lower the derived baseline in seed-area.ps1. That seems intended, but say so in the README.
  • Open suggestions from the earlier reviews still apply. The skill still needs a rule for a failed Phase 7, and it should say whether the skill may file the skipped-items issue unprompted.

Comment thread build/winui-sync/seed-area.ps1 Resolved
Comment thread build/winui-sync/WinUISync.psm1 Resolved
MartinZikmund and others added 2 commits November 14, 2026 11:33
The CommonStyles lookup only matched letters, so a _Partial file whose name has a digit or underscore got no theme file. Also restores a missing space in seed-area.ps1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
@unodevops

Copy link
Copy Markdown
Contributor

- A failed Phase 7 writes no entry; the scratch manifest leaves the repository untouched
- The skipped-items issue is filed with the PR; without a PR the items are listed and offered
- An unattended run states the subagent count in its report
- README: theme XAML headers count towards the derived baseline

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
Copilot AI balanced review requested due to automatic review settings November 14, 2026 10:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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


Review of #26474: catch-up on onboarding

Verdict: ship. 0 blocking issues, no new inline comments.

I read the current branch head. I did not run Pester or the onboarding flow.

Earlier inline findings

  • seed-area.ps1: the $scan =@( spacing nit is fixed (seed-area.ps1:50).
  • WinUISync.psm1: the control-name pattern is now (\w+?)_Partial (WinUISync.psm1:177), so names with digits or underscores map. Commit 42727ca adds a test for it.
  • Commit 4a80efe clarifies the failure and issue rules in the skill. This addresses the earlier suggestions about a failed Phase 7 and the skipped-items issue.

Still open

  • PR description. It still says "Only Markdown changes; no tooling code changed, so the Pester suite is unaffected". The branch also changes WinUISync.psm1, seed-area.ps1, areas.json and Seed.Tests.ps1. Please update it. The Pester results it quotes (115 passing) are what to rely on.
  • XAML header scan. Get-MuxReferences now reads .xaml files, so an old MUX Reference header in a XAML file can lower the derived baseline. Add a line to the README saying this is intended.
  • Uncommitted change. .claude/skills/winui-sync-onboard/SKILL.md is modified in the working tree but not pushed, so I did not review it.

@MartinZikmund

Copy link
Copy Markdown
Member Author

Addressed the suggestions from the three review summaries:

  • Failed Phase 7 (all three reviews): fixed in 4a80efe. The repository's areas.json is written only when the build and tests pass; otherwise the run stops and reports, the scratch manifest leaves the repository untouched, and switching to track-only is the user's call.
  • Skipped-items issue (all three): fixed in 4a80efe. It is filed together with the PR; when no PR was asked for, the items are listed in the report and the issue is offered.
  • Subagent notice in unattended runs: fixed in 4a80efe. An unattended run states the count in its report.
  • XAML headers lowering the derived baseline: intended; the README now says so (4a80efe).
  • Out-of-date description: fixed. It covers the theme XAML tooling and no longer says Markdown-only.
  • Track-only detection diff: already covered since d6f4170. The track-only note says detection "shows what the workflow's first run will port".
  • Manual review and audit: no change. chore(winui-sync): Onboard SplitButton at WinUI 2.6.5 #26476 is the first onboarding run, with the review and audit tables in its description for a careful human look.

Tooling tests: 116 pass.

MartinZikmund and others added 3 commits November 14, 2026 11:42
Once an area is tracked, areas.json records its version, so MUX Reference headers in it name only the upstream file. A tag in every header was a second record that drifted (SplitButton's said 1.4.2 for code matching 2.6.5).

- Remove-MuxReferenceVersion drops ', tag <ref>' and ', commit <sha>' from header comments, keeping each file's BOM and line endings
- onboarding runs it after writing the entry
- the port agent no longer bumps tags and removes any it finds
- code-style rule and the winui-port skill state the exception

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
TabView, BreadcrumbBar and SelectorBar: their MUX Reference headers now name only the upstream file; the areas' baselines record the version. One header line per file, 45 files. NavigationView and the button controls get theirs in their open sync PRs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNu2Uow7dC9EJ2fL3Hkw
Copilot AI balanced review requested due to automatic review settings November 14, 2026 10:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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


Review of #26474: catch-up on onboarding

Verdict: ship, with minor notes. There are 0 blocking issues and I posted no inline comments. I read the three commits added since the last review (4a80efef, b2793071, f368a214, dffb2f47). I did not run Pester or the onboarding flow.

Cross-cutting notes

  • PR description is stale again. It still says Phase 5 bumps the MUX Reference header to the latest tag. b2793071 now does the opposite. Remove-MuxReferenceVersion strips , tag … and , commit … from headers once an area is tracked, and the port agent no longer bumps tags. Update the Phase 5 bullet and the "Tooling code changed" list, and mention the new function.
  • Remove-MuxReferenceVersion regex (WinUISync.psm1). The commit branch matches any 7–40 character hex string after commit, but only on comment lines in the first 15 lines. The risk is low, and f368a214 adds tests. I'd add one negative case, such as a header comment that mentions the word "tag" in prose, to lock in that it is left alone.
  • Ordering. Onboarding strips versions after writing the entry, and Get-MuxReferences derives a seed baseline from those versions. That is consistent, because a stripped area is already tracked. Say in the README that re-seeding a tracked area can no longer use header versions, so areas.json is the only record.
  • Local checkout note. The runner's working tree has uncommitted edits to code-style.md, winui-port/SKILL.md and winui-sync-onboard/SKILL.md. They revert parts of the branch, including about 129 lines of the onboarding skill. They are not in the pushed PR, so I ignored them. If they are yours, check that they are not pushed by accident.

@MartinZikmund
MartinZikmund merged commit ce7d821 into master Nov 14, 2026
22 of 36 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/winui-sync-onboard-catchup branch November 14, 2026 10:56
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: catch the port up and review it when onboarding an area

3 participants