Skip to content

fix(markdown): pin upstream ThemeListener compatibility packages - #224

Merged
YoungSx merged 3 commits into
mainfrom
fix/markdown-native-theme-listener
Sep 24, 2026
Merged

YoungSx merged 3 commits into
mainfrom
fix/markdown-native-theme-listener

Conversation

@YoungSx

@YoungSx YoungSx commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem and change

The non-Windows Markdown control depends on Toolkit 7.1.206. Its ThemeListener dereferences Window.Current.CoreWindow when Skia has a XAML Window but no CoreWindow, so loading or disposing Markdown can raise a dispatcher exception.

Pin the non-Windows UI dependency to unchanged upstream CI artifacts containing Uno.WindowsCommunityToolkit#242. That patch subscribes to the native Window.Activated event and unsubscribes from the captured window. Keep the existing Markdown version; include the three required toolkit packages with exact source mappings, SHA-256 provenance and MIT license.

Upstream PR 242 is still OPEN. These are development CI packages, not a stable release. This Draft preserves the focused candidate; it is NOT ready to merge.

Scope

  • NuGet.config: local source and exact package mappings.
  • SalmonEgg/Directory.Packages.props and application csproj: non-Windows UI dependency override.
  • tools/vendor/uno-toolkit-theme-listener: original packages, provenance and license.
  • The unfinished real-Agent/MCP/form smoke script is excluded; it is unrelated to proving this narrow constructor/disposal fix.

Validation

  • Package ZIP integrity and all three recorded SHA-256 hashes verified.
  • git diff --check passed.
  • Current-base Desktop Release restore succeeded, but application compilation was terminated: MSB6006, csc exited with code 143. Core/Infrastructure/Presentation.Core assemblies were produced; the complete application build did NOT pass. This interrupted run must be repeated before readiness.
  • No new Core behavior or unit tests; application runtime acceptance remains outstanding. Historical builds and clipboard-failing real-Agent runs are not acceptance evidence for this head.

Before marking ready

  • Build a deterministic real Markdown control gate on the current source: load ordinary Markdown, unload/reload, change theme, reactivate the window and dispose without dispatcher errors.
  • Run the same gate with published 7.1.206 (expected ThemeListener failure), this candidate (pass), then remove the override (same expected failure); preserve artifact and source identities.
  • Pass BrowserWasm Release build and real browser Markdown gate. Browser WASM Smoke Gates passed on the rebased head (d301e05).
  • Run Desktop runtime gate and verify theme refresh plus repeated control lifetime handling. Skia Desktop GUI Smoke and Linux Desktop passed on the rebased head.
  • Check clean-cache restore and resolved dependency versions/source mappings; verify Windows retains its native Markdown dependency. Windows MSIX Package passed; NuGet source mapping and vendored SHA-256 provenance unchanged after rebase.
  • Pass affected Android/iOS builds and relevant native smoke checks. Not covered by this run: Android, iOS Simulator, macOS Desktop are skipping under the tiered PR gates (they run on the nightly/native-acceptance schedule, not per-PR). The dependency override affects all non-Windows targets, so these must be confirmed via the nightly native acceptance before/at merge.
  • Review all current-head CI and update evidence before merge. Rebased onto latest main (uno.sdk 6.7.30); 17 checks pass, 0 fail, 4 skipping (Android/iOS/macOS/Deterministic GUI — tiered to nightly).
  • Recheck upstream PR/release status; prefer a published release containing the fix when available. Remove vendored packages, mapping and direct pin when upgrading to that release.

Real-Agent form/URL acceptance is separate follow-up work and must not block or inflate this focused theme fix.

Ready-for-review note (rebased 2026-09-25)

Rebased onto latest main — the Directory.Packages.props overlap with the uno.sdk 6.7.30 upgrade merged cleanly (main's SDK bump and this PR's vendored 7.1.207-dev.4 pin occupy separate lines; no conflict). Per-PR CI is green on the new head.

Known debt carried into merge: three vendored Uno.CommunityToolkit* development .nupkg files remain in tools/vendor/ because upstream Uno.WindowsCommunityToolkit#242 is APPROVED but not yet merged/released. When #242 ships a stable release, a follow-up must remove the vendored packages, the NuGet source mapping and the central pin, and switch to the published dependency.

Outstanding before final merge: Android/iOS/macOS native builds are not exercised by per-PR gates (tiered to the nightly native-acceptance schedule); since the dependency override affects all non-Windows targets, confirm the nightly run is green before merging.

Markdown lifecycle gate evidence (7922deb, reverse-verified)

Gate: scripts/gates/run-skia-desktop-gui-smoke-gates.sh Debug on Linux Skia, same source and command each run.

Dependency state Result Signature
Vendored 7.1.207-dev.4 (contains Uno.WindowsCommunityToolkit#242) pass MarkdownThemeProbe: complete ... passed=True; gate additionally requires passed=True on the complete line
Published 7.1.206 pin fail presenter never materializes; probe faults before theme/reactivation steps
Override removed entirely (transitive 7.1.206) fail same signature

Lifecycle exercised per run: materialized presenter on the seeded markdown conversation, app theme toggle (Dark→Light→Dark), native window reactivation, authoritative selection switch to the seeded plain sibling conversation (unload/dispose) and back (reload of a new presenter instance). Source identities: gate logs the runtime commit and the exact app artifact path; package identity comes from the pinned central version plus the vendored SHA-256 provenance already in tools/vendor.

Upstream recheck (2026-09-23): Uno.WindowsCommunityToolkit#242 is still open (approved, awaiting maintainer merge, no published release), so the vendored pin remains the correct interim form.

@vercel

vercel Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
salmonegg Ready Ready Preview Sep 24, 2026 3:10pm UTC

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@YoungSx
YoungSx marked this pull request as draft September 17, 2026 07:58
@YoungSx

YoungSx commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

已跟进上游进展:
上游 PR unoplatform/Uno.WindowsCommunityToolkit#242 已完成 review 并获 Approved,CI 全绿。因外部贡献者无 write 权限无法通过 Mergify 自动入队,已在 PR 下留言 @ 维护者 @morning4coffe-dev 协助触发入队/合并。

YoungSx and others added 3 commits September 24, 2026 14:57
…rification

Add an in-app MarkdownThemeProbeDriver that exercises the real seeded
markdown conversation end to end: materialized presenter, app theme
toggle, native window reactivation, authoritative selection switch to a
new plain sibling conversation (unload/dispose) and back (reload). The
Skia desktop smoke now enables the probe and requires its complete line
to carry passed=True, so a faulted or failed lifecycle cannot pass on the
bare marker. The probe waits for the NumberBox probe's completion signal
first because that probe owns the content frame while it runs.

Reverse verification on this machine, same gate each time:
- pin 7.1.206 (published ThemeListener): probe faults, presenter never
  materializes, gate fails
- remove the vendored override entirely (transitive 7.1.206): same failure
- vendored 7.1.207-dev.4 containing Uno.WindowsCommunityToolkit#242:
  gate passes with passed=True

Also seed a plain second conversation for the switch, expose the NumberBox
probe's completion to sibling probes, and silence the stale Uno0001
listing on RenderTargetBitmap in the touched capture method with runtime
evidence recorded in the comment.

Co-Authored-By: Claude Code <noreply@anthropic.com>
xUnit2031 flags a Where clause directly before Assert.Single; the
overload with a filtering function is the sanctioned shape.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@YoungSx
YoungSx force-pushed the fix/markdown-native-theme-listener branch from b816915 to d301e05 Compare September 24, 2026 14:59
@YoungSx
YoungSx marked this pull request as ready for review September 24, 2026 15:49
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@YoungSx
YoungSx merged commit 0f1e239 into main Sep 24, 2026
21 checks passed
@YoungSx
YoungSx deleted the fix/markdown-native-theme-listener branch September 24, 2026 15:49

This branch was successfully deployed

1 active deployment
Preview — d301e050 Deployed Sep 24, 2026 by vercel[bot]
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