Skip to content

feat: Revamp the SamplesApp shell with Fluent design - #25108

Merged
MartinZikmund merged 81 commits into
masterfrom
dev/mazi/samplesapp-revamp
Oct 10, 2026
Merged

MartinZikmund merged 81 commits into
masterfrom
dev/mazi/samplesapp-revamp

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #25107

PR Type:

✨ Feature

What changed? 🚀

TL;DR

The SamplesApp shell (the sample chooser) and its infrastructure pages (runtime-test runner, Benchmarks, sample Info, Help) are rebuilt as a modern WinUI 3 Fluent app. It follows the WinUI design guidance for layout, controls, the type ramp, theme brushes, the 4 px spacing grid, corner radii and accessibility, and it adapts from a phone in portrait to a wide desktop window.

Individual samples are not touched. Apart from one small Uno.UI fix the new shell surfaced (BreadcrumbBar stored SizeOfSet as a uint, which broke WASM accessibility — see §12), every change lives under src/SamplesApp/**, plus docs. All automation contracts are preserved (element names, launch arguments, the runtime-test runner geometry and its results file). Twelve real bugs found along the way are fixed, each as a fix: commit followed by a test: commit.

Before / after

Before After
01-before-desktop 02-home-light
17-android-before 18-android-home
Desktop (Skia) and Android phone, master Desktop (Skia) and Android phone, this PR
Light Dark
04-sample-light 05-sample-dark
A sample with the browser pane open Same sample, Dark theme

1. Shell layout

The old shell was a hamburger SplitView with one long category list, oversized rows and a toolbar of unlabelled icon buttons. The new shell has three parts:

  • Navigation rail (NavigationView, compact): Home, Library, Runtime tests, Benchmarks, Playground, plus Help and Settings in the footer. Selection follows the current destination.
  • Sample browser pane: the existing SplitView, so IsSplitVisible keeps its meaning. It has a SelectorBar with Recent / Favorites / Library tabs, a Manual tests filter chip, Library → category drill-in with a breadcrumb, and a context menu on every row: Open, Open in new window, Add to favorites, Copy link, Copy type name, View source on GitHub.
  • Header: browser toggle, breadcrumb (Library › Category › Sample), an always-visible search box, and a CommandBar for the current sample.

The sample host sits on a layer card with a top-left corner radius. Samples render unchanged inside it.

Adaptive tiers (VisualStateManager with AdaptiveTrigger):

Tier Width Rail Browser pane Header
Narrow (phones) < 641 hidden; its destinations move into a bottom bar inside the pane overlay, opened by a menu button title only; commands go to overflow; search is a button
Tablet 641–1007 compact rail overlay, light-dismiss breadcrumb hidden; compact search
Wide ≥ 1008 compact rail inline (stays open next to the sample) full breadcrumb, labelled Favorite / Info

Rows are 32 DIP on desktop and 40 DIP on touch heads (Android, iOS, or Simulate touch). Touch targets are at least 40 DIP everywhere.

Search results Row context menu (WinAppSDK)
06-search-results 07-row-context-menu

2. Search

  • Ranked by sample name, category and full type name. Word starts and camel humps count, so btev finds Button_Events. Debounced to 150 ms.
  • Enter opens the top hit. Ctrl+Enter, or the trailing "See all N results" suggestion, shows every result in the pane, grouped by category, with a count and a ✕ to clear. Results are capped at 200, with a footer when more exist.
  • Esc clears the search and goes back; a second Esc moves focus to the sample.

3. Header command bar and description strip

  • Command order: Previous · Next · Reload | Favorite · Info | Quick settings · ⋯ (Copy link, Open in new window, View source, Copy type name, Log view dump, Focus mode).
  • Overflow per tier: wide windows label Favorite and Info, tablet windows show icons only, and phones keep Previous / Next / Reload when there's room.
  • Tool pages (_None samples such as the runner and Help) show a reduced set.
  • Quick settings flyout: theme, RTL, FPS indicator, Simulate touch, damage region, Fluent styles, title bar, "Show sample description", and "All settings…".
  • Description strip below the header: one line, a "More" link that opens Info, and a ✕ that collapses it (persisted).

4. Home (new default start page)

Light Dark
02-home-light 03-home-dark
  • A meta line ("1,472 samples in 136 categories") with platform, TFM and configuration tags.
  • Quick actions: Runtime tests, Playground, Benchmarks (if present), Record screenshots (where supported).
  • Recent, Favorites and Categories card grids that fill the width: 4 columns wide, 2 at 800 px, 1 on phones.
  • The start page can be changed in Settings: Home | Playground | Last sample. Automation launches never show Home (see §11).

5. Settings

Desktop Android
08-settings 21-android-settings

The Settings view lives in the browser pane, so the sample stays live while you change things. It has four card groups:

  • Appearance: theme (System / Light / Dark), right-to-left, Fluent styles, extend into title bar (desktop heads), Mica (where CanUseMica).
  • Diagnostics: FPS indicator, damage region, Simulate touch, Keep popups open on breakpoints (Uno-only options are hidden on WinAppSDK).
  • Sample browser: Manual tests only, start page, Clear favorites, Clear history, Record all screenshots.
  • About: platform, runtime, Uno Platform version, OS, configuration, repository, and Copy diagnostics.

Shell settings are saved under Shell.* keys in ApplicationData.LocalSettings. The existing keys (Samples.Favorites, Samples.LRU, Samples.LatestCategory, ShowFpsIndicator, unitestcontrols_config) are unchanged. RTL is never saved. Recents now keep 20 entries in every configuration; Release used to keep 0.

6. Keyboard shortcuts

All shortcuts go through one dispatcher (ShellCommands.cs). It drives the root KeyboardAccelerators, the tooltips, AutomationProperties.AcceleratorKey and the Help page. Shortcuts are suppressed while a sample's text input or the runtime-test runner has focus, so typing in a sample is never stolen.

Action Shortcut
Search samples Ctrl+F, /, Ctrl+K
See all results Ctrl+Enter (in search)
Previous / next sample Alt+← / Alt+→
Reload sample F5
Sample browser Ctrl+B
Recent / Favorites / Library Ctrl+H or Alt+R / Ctrl+Shift+F / Ctrl+Shift+E
Toggle favorite Ctrl+Shift+D
Sample info Ctrl+I
Copy deep link Ctrl+Shift+L
Runtime tests / Playground / Home Ctrl+T / Ctrl+P / Alt+Shift+H
Settings / Help Ctrl+, / F1
Focus mode F11
Next / previous region F6 / Shift+F6

Shortcuts that collide with the browser are flagged as unsafe on WebAssembly, and Help shows the browser-safe route for each one.

7. Help page (generated)

13-help

Help is generated from ShellCommands, with keycaps, so it can never drift from the real shortcuts. It also has a Command line & deep links section: sample=, theme=, --runtime-tests, --runtime-test-filter, --auto-screenshots, and the WebAssembly query-string form.

8. Runtime-test runner dashboard

Running (WinAppSDK) Finished (WinAppSDK)
10-runner-running 11-runner-finished
  • An InfoBar that is Informational while running (with a determinate progress bar fed by the new PlannedTestCount property), then Success, Warning or Error at the end.
  • Stat cards: Passed, Failed, Inconclusive, Retried. The total and skipped counts sit in the Results header.
  • Failure details card with "1 of N", previous/next and copy.
  • Results grouped by test class, with status glyphs, durations, expandable console output, a Failed only filter and Copy NUnit XML.
  • Options flyout. The splitters are now 1 px lines in the same 5 px cells and can be resized with the keyboard.
  • The grid geometry, every named element and the NUnit results file are unchanged. On CI (IsRunningOnCI) the runner builds no rows and no InfoBar, as before.

On portrait phones (narrower than 600 DIP and taller than wide) the runner switches to a bottom sheet. The side-by-side 50/50 split left both halves about 200 DIP wide there.

  • The test UI host takes the full width above a collapsed bar, so tests get about twice the room and the bar never covers them.
  • Collapsed bar: grab handle, Run / Stop, one-line status with progress, and ✓ ✗ ⚠ ↻ counter chips (each with an automation name such as "Passed: 67").
  • Expanded sheet (75% of the height, acrylic surface): a "tests may be affected" hint while running, the filter and Options, the InfoBar, failure details with a wrapped trace, and single-line result rows with durations. It always shows at least 3 result rows.
  • Open and close by tapping or dragging the handle, with Enter/Space and Esc, or through the ExpandCollapse automation pattern. A drag that starts on Run/Stop never clicks it.
  • The sheet closes itself when a run starts, so injected test input can't hit it. Under CI or automation it never opens.
  • runButton, stopButton and the stat cards are moved into the bar, not duplicated, and they move back on wide layouts. Desktop, tablet and landscape layouts and their CI geometry are unchanged. Only narrow portrait CI lanes see a different host position, which is intended.
Phone: sheet collapsed (idle) Phone: sheet expanded (mid-run)
📸 drop 24-android-runner-sheet-collapsed.png here 📸 drop 25-android-runner-sheet-expanded.png here

9. Sample info panel and Benchmarks

Sample info Benchmarks
09-sample-info 12-benchmarks
  • Sample info: title, tags, description, and a definition list (Type, Link, Launch, Source) where every row has a copy button, plus View source on GitHub and Open in new window. It fits a phone screen.
  • Benchmarks: a class filter, debug logging and Run in one card; a status row with progress, run count and Download results; then a log card and a UI-host card. It stacks vertically below 600 DIP.

10. Phone and narrow layouts

Pane with destinations Sample Landscape Desktop at 360 px
19-android-pane 20-android-sample 23-android-landscape 16-desktop-narrow-360

11. Focus mode, screenshot recording and automation

📸 drop 14-focus-mode.png here

  • F11 focus mode hides all shell chrome. An exit button stays reachable on touch devices.
  • --auto-screenshots (RecordAllTests) now hides the chrome, so every capture is the sample alone at full window size (see reviewer note 1).
  • Automation detection (--runtime-tests, --auto-screenshots, sample= under UI tests, UITEST_RUNTIME_*, UNO_PERF_*): no saved settings are restored or written, no recents are recorded, Home is never shown, and the runner host keeps its CI geometry (unitTestContentRoot origin is unchanged).
  • New launch argument theme=Light|Dark|System. It is additive and can be combined as sample=Buttons/Button_Events&theme=Dark.
The same shell on the WinAppSDK head
15-winappsdk-home

12. Bug fixes found along the way

Each is a fix: commit followed by a test: commit (the test fails before the fix where feasible):

Fix Symptom before
fix: Keep inline sample pane open on click SplitViewBehavior.CloseOnClick closed the pane even in Inline mode, so every pick hid the list on wide windows
fix: Notify all theme flags on theme change IsAppThemeSystem/Light/Dark didn't notify their siblings, so theme radios went stale
fix: Use touch row height in browser pane containers created before the resource changed kept the desktop height
fix: Keep sample host edge visible in dark the host card edge was invisible on the dark page
fix: Keep library list on its category at startup the favorites load replaced the library list on startup
fix: Keep favorite toggle working before browsing the favorite toggle did nothing until the browser had been opened once
fix: Guard sample info copy against null copying an empty field crashed
fix: Start a test run for instance-only runs the first RunTestsForInstance on a fresh runner threw a NullReferenceException
fix: Report benchmark runs that match nothing a filter that matched nothing still reported "Finished"
fix: Run benchmarks to the end on WinAppSDK benchmark runs stopped early on the WinUI head
fix: Keep launch focus on the selected rail item focus landed on the wrong rail item at launch on WinUI
fix: Exit non-zero when runtime tests fail a runtime-test run that threw before writing results exited with code 0 and logged nothing, which CI can't tell from success
fix: Archive benchmarks before reporting Finished BenchmarkDotNetTests could read results before they were archived
fix: Reset restored shell settings for UI tests local UI-test runs inherited saved Mica, Manual tests and other settings
fix: Open a launch-time runner in system theme a runner opened at launch inherited the saved shell theme
fix(breadcrumbbar): Store SizeOfSet as int (Uno.UI) GetSizeOfSet threw InvalidCastException on BreadcrumbBar items; on WASM that aborted the whole semantic DOM build, so every WASM DOM accessibility test failed once the shell's breadcrumb was in the tree
fix(samplesapp): Keep drilled category when manual filter toggles on WinUI, the ListView cleared its selection when the category list was swapped and pushed null back through the TwoWay binding before the remap ran
fix(samplesapp): Resolve shell corner radii as ThemeResource a StaticResource ControlCornerRadius style setter resolved to null on Uno, so tags were square (WinUI's own styles use ThemeResource)
fix(samplesapp): Wait for the shell before setting the test theme the fixed 5 s startup delay was not always enough for the larger shell, so --runtime-tests could crash on a null XamlRoot
fix(samplesapp): Fix the iOS build of ShellThemeBrushes target-typed ? color : null did not compile on the iOS head
fix(samplesapp): Show the platform in About on iOS the iOS trimmer strips TargetPlatformAttribute, so About showed a bare net11.0

13. Code map

Area Files
View model Presentation/SampleChooserViewModel.Shell.cs (shell state, commands, persistence), .Search.cs, SampleSearch.cs (ranking), ShellCommands.cs (shortcut catalogue), ShellEnums.cs, AppInfo.cs, ShellLog.cs. All additions; no existing member renamed or removed
Shell view SampleChooserControl.xaml and the partials .Shell.cs (layout, tiers, chrome states), .Shortcuts.cs, PerfHooks.cs (the UNO_PERF_* hooks, moved verbatim)
New views Views/Controls/Shell/HomeView.xaml, SettingsView.xaml
Resources Views/Styles/Shell/ShellResources.xaml (Light/Dark/HighContrast tokens, card/tag/keycap styles, no Default key), ShellToggleResources.xaml, Views/Helper/ShellThemeBrushes.cs, ShellFunctions.cs (x:Bind helpers)
Infra pages UnitTest/UnitTestsControl.xaml + .Shell.cs, SampleInfoControl.xaml, Benchmarks.Shared/Controls/BenchmarkDotNetControl.xaml, SamplesApp.Shared/Samples/Help/HelpPage.xaml
Launch SamplesApp.Shared/App.Tests.cs (theme=, automation detection, exit code)
Removed the old shell style dictionaries Views/Styles/Application/* and Views/Styles/Controls/*. Each key was checked with a grep across src first
Docs working-with-the-samples-apps.md, creating-runtime-tests.md, creating-tests.md

14. Contracts preserved

Contract Consumers Status
SampleChooserViewModel.Instance API (SetSelectedSample, RunRuntimeTests, RecordAllTests, IsAppThemeLight, …) App.Tests.cs, RuntimeTests, SamplesApp.UITests.Generator unchanged
sampleControl, SplitView, SearchBox, InfoButton, OverflowSettingsButton, OverflowSettingsIcon, ThemeMenuFlyout, SampleInfoFlyoutContent, TabletState SamplesApp.UITests, perf hooks kept, same types
UnitTestsRootControl, runButton, runTestCount, ignoredTestCount, failedTests, failedTestDetails, runningState, testResults, unitTestContentRoot UI tests, CI kept; unitTestContentRoot geometry under --runtime-tests is unchanged
--runtime-tests, --runtime-test-filter, --auto-screenshots, sample=, WASM query string, NUnit results format CI scripts unchanged; theme= is additive
UNO_PERF_OPEN_MENU, UNO_PERF_SCROLL, UNO_LOG_FPS perf tooling working
NavigationView UI tests SamplesApp.UITests scoped to the sample's own NavigationView, because the shell rail is one too

15. Tests

16 new runtime-test classes (SamplesApp.Tests.*, discovered from the SamplesApp assembly like NativeStorageRuntimeTests): Given_ShellLayout, Given_ShellBrowserPane, Given_ShellCommandBar, Given_ShellHomeView, Given_ShellSettingsView, Given_ShellShortcuts, Given_ShellViewModelState, Given_ShellResources, Given_SampleSearch, Given_SampleChooserViewModel, Given_SampleInfoControl, Given_SplitViewBehavior, Given_UnitTestsControl, Given_RunnerBottomSheet, Given_BenchmarkDotNetControl, Given_HelpPage. Together they have 174 [TestMethod]s and 213 [DataRow]s.

16. Validation

Check Skia desktop WinAppSDK Android emulator (Pixel 7, API 35) WebAssembly
Compile ✅ ✅ (BuildProjectReferences=false; a full build-app.ps1 hits a path-too-long error in the local worktree) ✅ Debug ➖ not built locally
App launched and exercised (Light/Dark, 1280/800/360) ✅ ✅ ✅ portrait + landscape ➖
New Given_* classes, filtered run ✅ 341 passed / 0 failed / 1 inconclusive (WinAppSDK-only test); at 360×740: 339 / 0 / 3 ✅ most classes (see below) ➖ ➖
CI-mode runner (-p:CI_Build=true), filtered run ✅ 57/57, results XML written ➖ ➖ ➖
Full runtime suite ➖ left to CI (master baseline on Skia desktop Debug: 8,665 total, 144 failed) ➖ ➖ ➖

Notes for reviewers

  1. Every --auto-screenshots / UI-test snapshot changes once. The shell chrome is now hidden while recording, so the baselines show only the sample, at full window size. This is intentional: from now on, shell changes no longer touch the baselines. Expect the Screenshots Compare Test Run diff to flag every sample once.
  2. Runtime tests were validated with filtered runs only (see §16). The full suite is left to this PR's CI.
  3. WinAppSDK: the earlier Given_ShellHomeView failures are fixed — WinUI realizes repeater items only on screen, leaves an x:Bind template's DataContext alone and gets no keys from KeyboardHelper (the Esc test is now excluded on NativeWinUI, like the existing one in Given_RunnerBottomSheet).
  4. WebAssembly: the Uno.UI BreadcrumbBar fix was validated locally on WASM (net10 publish, Chromium): 67/67 across Given_AccessibleSlider, Given_AccessibleAria, Given_AccessibleDataGrid and Given_WasmAccessibilityLifecycle, which all timed out before it.
  5. HighContrast and UnoIslands were checked by code review and compile only. HC couldn't be forced on Skia desktop. UnoIslandsSamplesApp.Skia builds, but no in-repo host can launch it.
  6. Debug Android needs a local workaround for Android: Kotlin coroutines service registration missing from APK, breaking Dispatchers.Main #24520 to launch; it is not part of this PR.
  7. Known cosmetic issues caused by Uno Platform bugs (listed below): RTL text on Skia lays Latin text out as RTL and flips brackets, and ListViewItem has no Fluent selection pill on Skia.

How to review

The history is a series of self-contained commits that each build; reading them in order works well:

  1. Groundwork: chore: Move shell perf hooks… → feat: Add shell theme resources (fixes, view-model state, search ranking, shortcut dispatcher, resources).
  2. The shell itself: feat: Rebuild shell around rail and browser → feat: Hide shell chrome during recording (phone layout, search results, command bar, Settings, Home, chrome states).
  3. Infra pages: sample info → runtime-test runner → Benchmarks → Help → docs.
  4. Cleanup and review-panel fixes: chore: Remove unused shell styles onward.

Uno Platform issues found during this work

These are recorded for separate filing, not fixed here:

  • Skia: Latin text under FlowDirection=RightToLeft is laid out as an RTL paragraph and its brackets flip (related to RightToLeft TextBlock draws its text at the left edge with the default TextAlignment (WinUI draws it at the right) #24904)
  • Logger.Warn(string, Exception) / LogWarning(string, Exception) silently drop the exception
  • A selected ListViewItem has no Fluent selection indicator pill on Skia
  • Skia ListView ignores GroupStyle headers (ListView Grouping #21019)
  • Skia: a comma-separated FontFamily fallback list is treated as one family name
  • Uno.Fonts.Fluent has no U+E733 ("Blocked") glyph
  • Setting Control.Template on a loaded control doesn't apply the new template
  • HyperlinkButton with string content is underlined on Uno, but not on WinUI 3
  • Reading dict.ThemeDictionaries["Light"][key] from code returns the ambient theme's value
  • FindName misses CommandBar commands in the closed overflow
  • The AutoSuggestBox suggestion popup is shifted left on Android in landscape
  • Suspected: a Collapsed NavigationView stops HighContrastAdjustment from recolouring a TextBox
  • Suspected: leaving a VisualState whose Setter targets Visibility drops an x:Bind value set while the state was active
  • Suspected: a zero-width NavigationView above the content swallows touch PointerExited
  • WASM EnableAccessibility stays flagged on when the initial semantic build throws, so accessibility is dead for the session (hardening; the trigger is fixed here)
  • A {StaticResource ControlCornerRadius} style setter resolves to null while {StaticResource OverlayCornerRadius} in the same file works (worked around here)
  • Suspected: ItemsRepeater.StartBringIntoView() on the repeater itself throws on Uno but works on WinUI
  • WASM Skia text in the runner sometimes drops glyphs (unverified on master)

Open questions for maintainers

  • Single PR or a stack? The commits split cleanly into groundwork / shell / infra pages, so this can be cut into a stack if that's easier to review.
  • Shell self-tests on every lane? The new SamplesApp.Tests.* classes run wherever runtime tests run (Skia desktop, WASM, Android, iOS). Some of them temporarily change the live shell (always restored in finally). Should they get their own category or lane?
  • CommandBar sizing. The header measures its own command widths per tier so the important commands stay visible. Is that acceptable, or should it rely only on CommandBar dynamic overflow?
  • Runner row virtualization. Result rows are grouped in a StackPanel. CI builds no rows, but a full local or WASM run creates thousands. An ItemsRepeater could be a follow-up.
  • F5 / Ctrl+P on WebAssembly. These collide with the browser's reload and print. Help lists alternatives; should the shell skip them entirely in the browser?

PR Checklist ✅

🤖 Generated with Claude Code

https://claude.ai/code/session_01DZqARsYT34zwsK3y97Vr4G

Copilot AI balanced review requested due to automatic review settings October 8, 2026 09:00

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 reached their quota limit.

@github-actions github-actions Bot added area/automation Categorizes an issue or PR as relevant to project automation kind/documentation labels Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

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


Review summary

Verdict: fix-first (light). The change is large, but I found no blocking defects. This was a targeted spot-check, not a line-by-line read of all 15k added lines.

Issues: 0 high, 2 medium or low, both posted inline.

  • Assert.Inconclusive is used widely as a precondition bail-out in the new tests.
  • A blocking .GetAwaiter().GetResult() in a clipboard test hook.

What I checked

  • Async discipline: async void handlers (OpenGitHubClick, ShellRunnerLeaveConfirm_Click, the PerfHooks Loaded handler) all wrap their awaits in try/catch and log failures.
  • Events: I found no event Action.
  • Layering: Every change is under src/SamplesApp/** plus docs, as the description states. No Uno.UI or Generated/ edits.
  • .Result in SampleChooserViewModel.GetAllAssembies: it is inside the #if WINAPPSDK block, so it only affects the WinAppSDK head. I didn't check whether it predates this PR.

Cross-cutting concerns

  • Validation gaps:
    • WebAssembly was never run. Android and iOS ran no runtime tests, and the full runtime suite is deferred to CI.
    • The 3 Given_ShellHomeView failures on WinAppSDK are known but uninvestigated. Please fix them or gate them explicitly before merge. Left as they are, they will fail on that head.
  • Screenshots checklist item: the Screenshots Compare Test Run box is unchecked. The PR expects every baseline to change, so someone needs to confirm that diff before merge.
  • PR description: the screenshot placeholders ("drop … here") still need to be replaced.
  • Runner rows: result rows are built in a StackPanel, so a full local or WASM run creates thousands of elements. That's acceptable as a follow-up, as the description notes.
  • Single PR or stack: I'd lean towards splitting it. The groundwork, shell and infra-page commits are independent, and this PR is hard to review as one piece.

@MartinZikmund
MartinZikmund marked this pull request as draft October 8, 2026 09:08
@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 238132 has failed on Uno.UI - CI.

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 238239 has failed on Uno.UI - CI.

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund marked this pull request as ready for review October 9, 2026 07:35
Copilot AI balanced review requested due to automatic review settings October 9, 2026 07:35

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 reached their quota limit.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

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


Review summary

Verdict: fix-first (light). I found no blocking defects. This was a targeted spot-check of the async, test and layering rules in AGENTS.md, not a line-by-line read of the roughly 15k added lines.

Issues: 0 high, 1 medium, 1 low. I could not post the medium one inline because GitHub rejected the line, so it is described here.

  • Medium: async void OnDownloadResults in src/SamplesApp/Benchmarks.Shared/Controls/BenchmarkDotNetControl.xaml.cs (around line 331) has no try/catch. File.ReadAllBytes(BenchmarkResultArchiveName) throws if the archive doesn't exist, for example when Download is clicked before any run has archived results. The file picker and write calls can throw too. An exception from an async void handler is raised on the UI sync context and crashes the app. Wrap the body in try/catch and log it, and consider enabling Download only when the archive exists. This handler may predate the PR, since I only saw it in a partial read.
  • Low: SampleChooserViewModel.cs:833 calls .AsTask().Result inside the #if WINAPPSDK block. It only affects the WinAppSDK head and I didn't check whether it predates this PR. If it is new, make it async or flag it as an intentional exception.

Already handled in earlier review rounds

  • Blocking clipboard read in Given_SampleInfoControl and the floating-point WaitFor predicates were fixed in 96e828b.
  • The remaining CodeQL notes were answered as intentional by the author. They were Assert.Inconclusive, exact size-change detection, GC.Collect in the benchmark page and the RecentsEnabled condition. I have no objection to the exact size comparisons or to GC.Collect before benchmark runs.
  • Assert.Inconclusive remains in about 12 places (Given_ShellLayout, Given_ShellCommandBar, Given_RunnerBottomSheet, Given_ShellSettingsView, Given_ShellResources, Given_BenchmarkDotNetControl). The author keeps it, citing the existing runtime-test convention. It still silently lowers coverage. Where the precondition can be set up, as other tests in this PR do, prefer that, or use [PlatformCondition].

Cross-cutting concerns

  • WinAppSDK failures: the 3 known Given_ShellHomeView failures on WinAppSDK are uninvestigated. Fix them or gate them before merge.
  • Validation gaps: WebAssembly was never run, and Android and iOS ran no runtime tests. Only filtered runs were done on Skia desktop and WinAppSDK. The full suite depends on CI, and builds 238132 and 238239 on Uno.UI - CI failed. Please confirm the failures are unrelated to this PR.
  • Screenshots checklist: the Screenshots Compare Test Run item is unchecked. The PR expects every baseline to change, so someone should confirm that diff.
  • PR description: the "drop … here" screenshot placeholders (§8 and §11) still need images.
  • Scope: I'd lean towards splitting into a stack of groundwork, shell and infra pages, which are independent and hard to review as one piece. Maintainers should decide.

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 238454 has failed on Uno.UI - CI.

Copilot AI balanced review requested due to automatic review settings October 9, 2026 10:00

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 reached their quota limit.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

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


Review summary

Verdict: fix-first (light). I found no blocking defects. This is a targeted re-check after the latest push, not a line-by-line read of the roughly 15k added lines.

Issues: 0 high, 1 medium, 1 low. Neither could be posted inline. GitHub rejects both lines because they are outside the PR diff, which suggests the code predates this PR.

  • Medium: async void OnDownloadResults in src/SamplesApp/Benchmarks.Shared/Controls/BenchmarkDotNetControl.xaml.cs:331 has no try/catch.
    • File.ReadAllBytes(BenchmarkResultArchiveName) throws if no archive exists yet, e.g. when Download is clicked before any run has archived results.
    • The picker and write calls can also throw.
    • An exception here crashes the app.
    • Wrap the body in try/catch and log with ShellLog. Since this PR adds a Download button to the status row, it is cheap to harden now.
  • Low: SampleChooserViewModel.cs:833 calls .AsTask().Result inside the #if WINAPPSDK block. It only affects the WinAppSDK head and appears to predate this PR. Leave it, or make it async if you are touching that code.

Resolved since the earlier reviews

  • The clipboard GetAwaiter().GetResult() hook and the floating-point WaitFor predicates were fixed in 96e828b.
  • I have no objection to the intentional exact size-change comparisons, the GC.Collect before benchmark runs, or the RecentsEnabled condition. Your replies explain these.
  • The generic catch (Exception) blocks in App.xaml.cs, CopyToClipboard and OpenSourceOnGitHub are acceptable. Each one logs, and each guards a fire-and-forget or async void path where an unhandled exception would crash the app. I would not narrow them.

Cross-cutting concerns

  • Assert.Inconclusive: about 12 uses remain in the new tests. Your rationale (existing runtime-test convention) is reasonable. Where the precondition can be set up, as other tests in this PR do, prefer that over a bail-out, because inconclusive results silently lower coverage.
  • WinAppSDK failures: the 3 known Given_ShellHomeView failures on WinAppSDK are uninvestigated. Fix them or gate them explicitly before merge.
  • CI: builds 238132, 238239 and 238454 on Uno.UI - CI failed. Please confirm the failures are unrelated to this PR. I did not inspect the logs.
  • Validation evidence: this is code review only. I built nothing and ran no tests. The PR's own validation covers filtered Skia desktop and WinAppSDK runs. WebAssembly was never run, and Android and iOS ran no runtime tests.
  • Screenshots checklist: the Screenshots Compare Test Run item is unchecked. The PR expects every baseline to change, so someone needs to confirm that diff.
  • PR description: the "drop … here" screenshot placeholders (§8 and §11) still need images.
  • Scope: I lean towards splitting into a stack of groundwork, shell and infra pages. Maintainers should decide.
  • Out-of-scope file: src/Uno.UI/UI/Xaml/Controls/BreadcrumbBar/BreadcrumbBar.cs and Given_BreadcrumbBar.cs are in the changed files, but the PR description says Uno.UI is untouched. Please update the description or explain why.

@unodevops

Copy link
Copy Markdown
Contributor

Copilot AI balanced review requested due to automatic review settings October 9, 2026 10:58
MartinZikmund and others added 12 commits October 10, 2026 16:42
WinUI boxes the uint count and lets the property system convert it; Uno kept the
uint, so GetSizeOfSet threw InvalidCastException. On WASM that aborted the whole
semantic DOM build once a BreadcrumbBar was in the tree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dpy6FGmTfiTyJWZnteuZZG
A StaticResource ControlCornerRadius setter resolved to null on Uno, leaving tags
square. WinUI's own styles use ThemeResource for these.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dpy6FGmTfiTyJWZnteuZZG
The fixed 5 s startup delay was not always enough for the larger shell, and
setting the theme dereferenced a null XamlRoot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dpy6FGmTfiTyJWZnteuZZG
Scroll the home view rather than bring the repeater itself into view, which Uno
rejects, and walk the runner's height down instead of guessing where each
platform's fonts put the stat strip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dpy6FGmTfiTyJWZnteuZZG
The iOS/tvOS trimmer strips TargetPlatformAttribute, so the target framework
read as a bare net11.0. Fall back to the running OS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dpy6FGmTfiTyJWZnteuZZG
WinUI realizes only the cards inside the window, which CI keeps narrower than
the 1232 grid.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dpy6FGmTfiTyJWZnteuZZG
The async void handler let a missing archive or a picker/IO failure crash the
app. Show it in the status line and log it, like the run handler does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dpy6FGmTfiTyJWZnteuZZG
An earlier test can leave the whole Android window shifted for the soft
keyboard; the guard then flagged a host that only moved back with it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dpy6FGmTfiTyJWZnteuZZG
WinUI can apply the brush after WaitForIdle returns, which made the test fail
on the first CI pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dpy6FGmTfiTyJWZnteuZZG
Copilot AI balanced review requested due to automatic review settings October 10, 2026 14:42
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/samplesapp-revamp branch from 2c5ed0f to 57a6e6e Compare October 10, 2026 14: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 reached their quota limit.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

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


Review summary

Verdict: ship, pending CI and the screenshot diff. HEAD is 57a6e6e3 (test: Wait for the theme brush on the current pane destination). It changes 3 lines in Given_ShellLayout.cs, and an earlier round already covered it. No production code changed. This was code review only: I built nothing and ran no tests, and I did not re-read the rest of the PR.

Issues: 0 high, 0 medium, 0 low. No inline comments.

Still open

  • Screenshots: build 238772 shows skia-windows-screenshots falling from 2458 changed baselines to 174. skia-linux-screenshots is still at 118. The earlier jump to 2458 looks like the expected one-time change from hiding the chrome while recording. The 118 Linux and 174 Windows diffs are what remains to be confirmed.
    • Please check that the changed baselines show only the sample, with no leftover shell chrome. Several of the listed names (Buttons, ButtonClippingTestsControl, CalendarView_Theming, ClipboardTests, DisplayInformation) appear in both sets.
    • Also check whether these are real rendering differences, since a pure chrome change would not explain a partial set. The Screenshots Compare Test Run checklist item is still unchecked.
  • CI: Uno.UI - CI builds 238132, 238239 and 238454 failed earlier. I did not inspect the logs. Please confirm they are unrelated to this PR and that the latest run is green.
  • PR description: the "drop … here" screenshot placeholders in §8 and §11 still need images.
  • Validation gaps: WebAssembly was not run for the shell, and Android ran no runtime tests. The full runtime suite depends on CI.
  • Assert.Inconclusive: I accept your reasoning for the head- and run-mode-dependent uses. Keep the count low, since inconclusive results silently lower coverage.
  • Scope: I still lean towards splitting into a stack of groundwork, shell and infra pages. Maintainers should decide.

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund MartinZikmund added the ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met label Oct 10, 2026
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238784 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DisplayInformation.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • ImageBrushAlignmentXY.png-dark
    • ImageBrushAlignmentXY.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
  • skia-windows-screenshots: 2458 changed over 2486

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AnimatedIconPage.png-dark
    • AppBarButtonWithIconTest.png
    • AppBarButtonWithIconTest.png-dark
    • AppBar_KeyBoard.png
    • ApplicationViewMode.png-dark
    • Application_DispatcherShutdownMode.png
    • AppWindowClosing.png-dark
    • AppWindowPresenters.png-dark
    • AppWindowTitleBar Properties.png-dark
    • ArcSegment.png-dark
    • ArcSegment.png
    • Attributed_text_Simple.png
    • AuthenticationBroker_Demo.png-dark
    • AutoBorderStretchwithbottommargin.png-dark
    • AutoBorderStretchwithleftmargin.png
    • AutoBorderStretchwithtopmargin.png
    • AutomationProperties_AutomationId.png-dark
    • AutomationPropertiesExtensions_Role.png-dark
    • AutomationProperties_AutomationId.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation kind/documentation ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revamp the SamplesApp shell to follow WinUI Fluent design

6 participants