Compare commits

...
Author SHA1 Message Date
poli0981andClaude Opus 5.5 7fc717892b fix(app): hide scroll bars reaches every scroller - a ScrollChanged class handler beside Loaded (beta.17 PR-2)
The owner's screenshot of 0.1.0-beta.16 (2026-10-07): with Settings > Window > Hide scroll bars on, the Dashboard still
drew its scroll bar while Settings did not.

Cause, read in dotnet/wpf: BroadcastEventHelper.OnBroadcastCallback raises Loaded only on elements whose
SubtreeHasLoadedChangeHandler is set, and FrameworkElement.ThisHasLoadedChangeEventHandler counts instance handlers,
style EventSetters, template triggers and FEF handlers - not EventManager class handlers. ScrollBarHiding (beta.14)
had one class handler on ScrollViewer.Loaded, plus a walk of the open windows when the toggle changes; the flag is
applied before the first window, so the walk never helped at start-up. WPF UI 4.3.0's ToggleSwitch, CheckBox and
ProgressRing templates carry a Loaded EventTrigger, so Settings' scroller loaded and was hidden; the Dashboard (cards,
text, borders) never loaded as far as the option knew.

- Services/ScrollBarHiding: a class handler on ScrollViewer.ScrollChangedEvent (handledEventsToo), calling the same
  idempotent Set. Every scroller raises it from its first layout, inside ContextLayoutManager.UpdateLayout, so the
  bar is gone before the first frame; the Loaded handler stays. Doc comment and App.xaml.cs comment corrected.
- ScrollBarHidingTests.AScrollerLaidOutWithNoLoadedEventIsHidden: red before (Auto).
- ScrollBarHidingTests.EverySurfaceShownWithTheOptionOnDrawsNoBar: every page navigated in WPF UI's presenter, the
  first run, About, the user guide, a session's summary and every dialog's content, each shown in a real window off
  the screen with the option on first. Red before: the Dashboard's ScrollViewer, Game detail's sessions DataGrid
  (horizontal), the first run's ListBox and MarkdownView, About's ScrollViewer, the user guide's ListBox and
  MarkdownView. Settings and Logs were already hidden (the control); the check requires Dashboard, Settings, Logs and
  the user guide to have something to scroll.
- ScrollBarHidingTests.WpfRaisesLoadedOnlyWhereASubtreeListensForIt: the harness against WPF - a scroller with its own
  Loaded class handler is not called holding a Border, and is holding a CheckBox.
- Docs: 08_UI §Settings (the false "reaches every scroller" struck and dated), 16_WPFUI_SYNTAX §Gotchas (a class
  handler on Loaded is not a load hook), 14_TESTING, CHANGELOG [Unreleased].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:26:13 +07:00
poli0981andClaude Opus 5.5 23fa7a0fb4 fix(app): text follows a theme switch - SecondaryText/TertiaryText replace ui:TextBlock Appearance (beta.17 PR-1) (#281)
The owner's screenshots of 0.1.0-beta.16 (2026-10-07): after Dark -> Light, Settings' descriptions were light grey on
white; after the way back, dark grey on dark.

Cause, read in WPF UI at tag 4.3.0 (main is the same): TextBlock.OnAppearanceChanged stores
TryFindResource(TextFillColorSecondaryBrush|TertiaryBrush) in the internal AppearanceForeground, and TextBlockMetadata
coerces every TextBlock's Foreground to it. The brush is the one found when the element was made and is never looked
up again, so a text kept the theme it was created under. Pages are transient, so the page in view during a switch -
Settings, where the theme is chosen - showed it.

- Styles/FrameLedger.xaml: SecondaryText and TertiaryText (Foreground by DynamicResource), and the 129
  `ui:TextBlock Appearance=` in 20 files take them (107 Secondary, 22 Tertiary; only TextBlock start tags were
  edited, every ui:Button/ui:Badge Appearance kept).
- ContrastTests.NoTextBlockTakesItsColourFromAppearance: no Appearance on a TextBlock, the attached form, a style
  setter or the code form, in the App. Red before: 129 hits.
- PagesLoadTests.EveryTextFollowsAThemeSwitch (Dark and Light): every page, the first run, About, the user guide, a
  session's summary, every dialog's content, the safety InfoBar and the two custom controls, made under one theme in an
  unshown FluentWindow (only Application.Windows hear a dictionary change), switched, and compared text by text with
  the same surface made fresh. Red before: 146 stale texts each way, all TextFillColorSecondary/Tertiary.
- PagesLoadTests.WpfUisAppearanceStillKeepsTheThemeATextWasMadeUnder: the library's behaviour, kept visible; red the
  day upstream follows a switch.
- PagesLoadTests.Surfaces: one catalogue of every surface over loaded view models, for any check that wants them all.
- Docs: 16_WPFUI_SYNTAX (Text row, theming bullet, a Gotchas entry), 08_UI §Contrast (the fourth hole),
  14_TESTING (a theme switch needs a window), CHANGELOG [Unreleased].

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 09:20:59 +00:00
dependabot[bot]andpoli0981 6f74574e8f Bump Meziantou.Analyzer and Roslynator.Analyzers (#262)
Bumps Meziantou.Analyzer from 3.0.266 to 3.0.294
Bumps Roslynator.Analyzers from 5.0.0 to 5.0.1

---
updated-dependencies:
- dependency-name: Meziantou.Analyzer
  dependency-version: 3.0.294
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: Roslynator.Analyzers
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: poli0981 <127664709+poli0981@users.noreply.github.com>
2026-10-06 11:40:23 +00:00
poli0981andClaude Opus 5.5 cf4a1acc8e release: 0.1.0-beta.16 - the end-to-end suites consent to a run-unique harness copy (the beta.15 chip); beta.15 verified (#280)
* test(e2e): the suites whose host resolves its target by name consent to a run-unique copy of the harness (beta.16, the beta.15 chip)

#269's first CI run lost AgentEndToEndTests.AConsentedBoundedCaptureLandsAsOneHookedRowInTheScratchLedger: exit 6,
TargetAmbiguous - "hook-harness.exe: 1 process(es) with that name could not be read (pid 3684: Only part of a
ReadProcessMemory or WriteProcessMemory request was completed.)". build.ps1 runs the test projects as parallel processes;
another project's hook-harness.exe was still starting (its module list a partial copy), and TargetResolver must count an
unreadable process of the consented executable's NAME. The refusal is right; the suites sharing one name was not. The
[Collection("agent-harness")] only serialises classes inside Agent.Tests.

- AgentEndToEndTests, PartialRecoveryEndToEndTests and CaptureHostEndToEndTests consent to
  hook-harness-<their scratch directory>.exe, a copy of the staged harness beside their data, as PipeEndToEndTests
  already did: StageTarget copies it once per test and registers the directory with HarnessOverlayLogSweep, so its
  overlay logs leave with the run. TargetResolver, the guard and every product rule are unchanged.
- The self-constraint tests pin the copy to the staged hook-harness.exe byte for byte (and the staged one to the test
  binary's directory), so the suites still inject into nothing but our own harness.
- AnotherHookHarnessRunningBesideTheSuiteDoesNotMakeTheTargetAmbiguous runs a second harness beside the capture. Measured
  against the old shared name: "session: TargetAmbiguous", red; green now.
- Suites that attach by pid (ShmDrainIntegrationTests, the native fl_guard_test) were never exposed and keep the name.

Docs: 14_TESTING (test isolation), HANDOFF (the beta.15 trap marked fixed), CHANGELOG (development note).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* release: 0.1.0-beta.16 - the CHANGELOG section, the accuracy block's release line, README's release lines, LIMITATIONS' version, HANDOFF's section, and owner-only item 12 marked passed

VERSION stays 0.1.0: the tag's numeric core. The owner (2026-10-06), after beta.15's release: item 12 passed on real
hardware ("đã chạy và ok"), do the chip beta.15 left, release, and close the session.

Nothing in the app changed since beta.15, and the section says so; "Updating from 0.1.0-beta.15" is the ordinary path.
HANDOFF: beta.15's START HERE is struck; the beta.16 section records the chip, the beta.15 train's merges (#277 and #278
were opened from the pushed branches, so their squash titles are GitHub's defaults; the content is the gated stack's)
and three traps - a session restart that empties gpg-agent's cache before a tag, a strict linear main that makes every
stacked PR rebase and re-run CI, and a desktop app that wakes the session on a red PR but never on a green one. Item 12
is marked passed in the owner-only list; no item is added.

tools/release-notes.ps1 -Version 0.1.0-beta.16 extracts the section (860 characters); accuracy-check is green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 07:13:29 +00:00
poli0981andClaude Opus 5.5 bfd5238360 release: 0.1.0-beta.15 - the CHANGELOG section with how to update from beta.14, the accuracy block's release line, README's release lines, LIMITATIONS' version, HANDOFF's train section with D51-D52 and owner-only item 12 (beta.15 PR-6) (#279)
VERSION stays 0.1.0: the tag's numeric core. The tag waits for the owner's confirmation (asked 2026-10-06).

The [Unreleased] entries of PR-1..PR-5 move under [0.1.0-beta.15] with a summary for the release body; "Updating from
0.1.0-beta.14" says what is different this time: nothing migrates and nothing is shown again, and beta.14's own update
step stops the Agent before Velopack applies - this is the first update where it runs.

HANDOFF: beta.14's START HERE is struck; the beta.15 section carries the request, D51 and D52 (asked before the plan) and
the traps of the train - launch mode's election that never ran because the tests hand-built the session's outcome, the
watcher that reports a process once, a snapshot pid that names whoever holds it now, static choice lists, and the Agent
end-to-end test that lost to another test project's harness (left as a task). Owner-only item 12: the update from
beta.14, a quick restart, a change of language, a launcher, the viewer over a copy, the ja strings.

tools/release-notes.ps1 -Version 0.1.0-beta.15 extracts the section (3583 characters); accuracy-check and notice-check
are green.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 04:37:17 +00:00
41 changed files with 1113 additions and 178 deletions

No files matched your search

+47
View File
@@ -28,6 +28,53 @@ numeric core and does not move; the heading is the full version — corrected 20
## [Unreleased]
### Fixed
- **Text keeps up with a change of theme.** After switching between Light and Dark, the descriptions and captions of the
page in view — Settings above all, where the theme is chosen — kept the old theme's colour: light grey on white, or dark
grey on dark. Every such text now follows the switch, on every page, window and dialog (`08_UI` §Contrast,
`16_WPFUI_SYNTAX` §Gotchas).
- **Hide scroll bars hides every scroll bar.** With Settings ▸ Window ▸ Hide scroll bars on, the Dashboard still drew its
scroll bar — and so did the first run, About, the user guide and a game's wide sessions table; only screens with a
switch or a tick box on them lost theirs. Every scroller follows the option now, and still scrolls with the wheel, the
keyboard and touch (`08_UI` §Settings, `16_WPFUI_SYNTAX` §Gotchas).
## [0.1.0-beta.16] - 2026-10-06
**The sixteenth pre-release: nothing changes in the app.** It is 0.1.0-beta.15 as the owner verified it on real hardware
the same day, with the developers' end-to-end tests made reliable. The same unsigned installer: verify its hash against
`SHA256SUMS.txt`, then *More info → Run anyway*.
**Updating from `0.1.0-beta.15`:** Help ▸ Check for updates, then *Restart to update* with no game running. Nothing in
the database changes and nothing is shown again for you to accept; sessions already stored keep their status.
### Fixed
- **Development: the Agent's and the capture host's end-to-end tests no longer fail when another test project starts
the test harness at the same moment.** Each such suite now records into a copy of the harness under a name of its
own, so the target it asks for is never ambiguous (`14_TESTING`). Nothing in the app changes.
## [0.1.0-beta.15] - 2026-10-06
**The fifteenth pre-release: a quick restart recorded, an anti-cheat check that stays on the game's own programs, a
change of language that reaches every list, and a launcher followed to its game.** The same unsigned installer: verify
its hash against `SHA256SUMS.txt`, then *More info → Run anyway*. What changed for a user:
- **A game started again a few seconds after closing is recorded** — while the session before it was being saved, the
new start used to be turned away and never looked at again.
- **The anti-cheat check stays on the game's own programs.** Windows reuses process numbers, and a program that had
taken over the number of a game's closed launcher could be scanned as part of the game — refusing the session, or
turning the game's measuring off. It no longer is.
- **A change of language reaches every list at once** — the theme and update-channel lists, the Logs page, the Games
sort order, the tray's menu and the Agent's status — without a restart.
- **A game started through its launcher is followed to the game itself** (the Agent's console `launch`).
- **`FrameLedger.exe --data-dir <folder>` opens a copy of a data folder to look at**, with no Agent and nothing on the PC
changed.
**Updating from `0.1.0-beta.14`:** Help ▸ Check for updates, then *Restart to update* with no game running — FrameLedger
stops its Agent before the update is applied. Nothing in the database changes and nothing is shown again for you to
accept; sessions already stored keep their status.
### Added
- **`FrameLedger.exe --data-dir <folder>` opens a copy of a data folder to look at**, for checking a build of your own
+2 -2
View File
@@ -75,8 +75,8 @@
</ItemGroup>
<ItemGroup Label="Analyzers (build-time only)">
<PackageVersion Include="Roslynator.Analyzers" Version="5.0.0" />
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.266" />
<PackageVersion Include="Roslynator.Analyzers" Version="5.0.1" />
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.294" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="18.7.23" />
</ItemGroup>
+1 -1
View File
@@ -5,7 +5,7 @@ hooking on for — and reading the graphics calls the game makes. That is why it
resolution, the upscaler, frame generation and ray tracing apart. It is also where its limits come from. This
page lists them in plain words; each item links to the document that has the details.
*Beta software: this page describes version 0.1.0-beta.14.*
*Beta software: this page describes version 0.1.0-beta.16.*
## Games it will not measure
+3 -3
View File
@@ -10,7 +10,7 @@ anti-cheat, and look after your data, a page each. What FrameLedger cannot do is
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.14`** (2026-10-06), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.16`** (2026-10-06), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
@@ -161,7 +161,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
## Install
> **The latest pre-release is `v0.1.0-beta.14` (2026-10-06); before it `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read `CHANGELOG.md`'s section for the one you install — what it measures, what it does not yet, and how to update — before installing. A source build is `docs/12_BUILD.md`.
> **The latest pre-release is `v0.1.0-beta.16` (2026-10-06); before it `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read `CHANGELOG.md`'s section for the one you install — what it measures, what it does not yet, and how to update — before installing. A source build is `docs/12_BUILD.md`.
1. Download the latest `FrameLedger.App-win-Setup.exe` from [Releases](https://github.com/poli0981/frameledger/releases). It installs into `%LOCALAPPDATA%\FrameLedger.App`; your data stays in `%LOCALAPPDATA%\FrameLedger`, and uninstalling asks before touching it.
2. SmartScreen may warn — releases are not code-signed (free, open-source project). Verify the SHA-256 checksum published with each release, then **More info → Run anyway**.
@@ -208,4 +208,4 @@ GPU telemetry is layered so the project never depends on a proprietary vendor li
---
**Status:** pre-release (beta). Fourteen tagged pre-releases so far; see `CHANGELOG.md` for what each one changed and the accuracy block at the top of this file for what is and is not measured. It is not feature-complete, it certainly still has bugs, and `legal/DISCLAIMER.md` §0 says what that means for you.
**Status:** pre-release (beta). Sixteen tagged pre-releases so far; see `CHANGELOG.md` for what each one changed and the accuracy block at the top of this file for what is and is not measured. It is not feature-complete, it certainly still has bugs, and `legal/DISCLAIMER.md` §0 says what that means for you.
+23 -4
View File
@@ -604,13 +604,19 @@ Tail view of `ui-*.log` / `agent-*.log` (toggle), level filter, search (`ui:Auto
### Settings
> **beta.14 (owner request 2026-10-05: "an option to hide the scroll bars but still scroll").** The Window section has
> **Hide scroll bars** (`ui.hide_scrollbars`, off by default). A bar's visibility is bound inside its scroller's template,
> which no style reaches, so `Services.ScrollBarHiding` sets the scrollers themselves: one class handler on
> `ScrollViewer`'s Loaded (registered at start beside `DialogKeyboard`) reaches every scroller the App shows, those inside a
> DataGrid, a TextBox, a rendered document and a dialog included. While on, an axis that is `Auto` or `Visible` becomes
> which no style reaches, so `Services.ScrollBarHiding` sets the scrollers themselves: ~~one class handler on
> `ScrollViewer`'s Loaded (registered at start beside `DialogKeyboard`) reaches every scroller the App shows~~ class
> handlers on `ScrollViewer`'s ScrollChanged and Loaded (registered at start beside `DialogKeyboard`) reach every scroller
> the App shows *(corrected 2026-10-07, beta.17, the owner's screenshot of the Dashboard with its bar: WPF raises Loaded
> only where a subtree listens for it with a handler of its own, and a class handler is not one — `16_WPFUI_SYNTAX`
> §Gotchas. Settings, full of toggle switches whose template listens, lost its bar; the Dashboard, the first run, About,
> the user guide and a game's wide sessions table kept theirs. Every scroller raises ScrollChanged from its first layout)*,
> those inside a DataGrid, a TextBox, a rendered document and a dialog included. While on, an axis that is `Auto` or `Visible` becomes
> `Hidden` — WPF's "no bar, still scrolls": wheel, keyboard and touch — and its own value is kept on it; a `Disabled` axis is
> never touched (it lays its content out at the viewport's width). The toggle applies to the open windows at once, and off
> puts every kept value back. Tests: `ScrollBarHidingTests` (on hides every bar and the wheel still scrolls; off restores
> each; a scroller that loads later follows), `SettingsViewModelTests.HidingScrollBars…`.
> each; a scroller that loads later follows; since beta.17 a scroller laid out with no Loaded at all, and every page,
> window and dialog shown in a real window with the option on), `SettingsViewModelTests.HidingScrollBars…`.
> **beta.11 (owner request 2026-10-03: "remove the Settings rows that have no button or similar").** Every row has a control
> now: the *Games with hooking on* card shows only while a game has hooking on (its empty sentence is gone); the *Elevation*
@@ -821,6 +827,19 @@ palette per theme, chosen with the theme).
> text against the composited colour painted under it ≥ 4.5:1, each ticked box drawn whole), and
> `AccessibilityTests.NoDataGridCheckBoxColumn` (Compare's checkbox column drew an Aero2 box). Each went red on the
> unfixed XAML before it went green.
>
> **A fourth hole, closed 2026-10-07 (beta.17; the owner's screenshots of Settings after a theme switch: its descriptions
> light grey on white in Light, dark grey on dark in Dark).** Every check above measures a theme as a surface is *made*
> under it; a switch while the surface is on screen is a different question. WPF UI 4.3.0's `ui:TextBlock
> Appearance="Secondary|Tertiary"` — 129 texts in 20 files, nearly every description and caption — looks its brush up
> once and keeps it (`16_WPFUI_SYNTAX` §Gotchas), so the page on screen during a switch kept the old theme's muted text:
> Settings above all, where the theme is chosen. Pages are made again on each navigation, which is why only the page in
> view showed it. Those texts take the `SecondaryText` / `TertiaryText` styles now. Held two ways:
> `ContrastTests.NoTextBlockTakesItsColourFromAppearance` (no `Appearance` on a TextBlock in any form, nor its code form),
> and `PagesLoadTests.EveryTextFollowsAThemeSwitch` (every page, the first run, About, the user guide, a session's
> summary, every dialog's content and the safety InfoBar, made under one theme, switched, and compared text by text with
> the same surface made fresh under the other — both ways). Both went red on the unfixed XAML, the second with 146 stale
> texts each way, before they went green.
### DPI
+25
View File
@@ -63,6 +63,21 @@ cell against that colour in both themes and counts the accent pixels of each tic
paging checks navigate a real page in WPF UI's presenter and send it the wheel. Each was run red against the unfixed XAML
first — a rendered check that cannot fail is the counted-rows check again.
**A theme switch needs a window (beta.17).** A change to `Application.Resources` reaches only the trees of
`Application.Windows`, and a `Window` registers itself there when it is constructed, shown or not. So
`PagesLoadTests.EveryTextFollowsAThemeSwitch` hosts each surface in a `FluentWindow` it never shows, swaps the theme
dictionary as `ApplicationThemeManager.Apply` does, and compares every text's colour with the same surface made fresh
under the new theme. `PagesLoadTests.Surfaces` builds every page, window and dialog content from loaded view models, for
any check that wants all of them. Colours are compared and texts only reported: another test class may change
`Strings.Culture` between the two builds.
**Loaded needs a shown window, and even then it is not raised everywhere (beta.17).** A tree laid out by hand never raises
Loaded, and a shown one raises it only where a subtree listens for it (`16_WPFUI_SYNTAX` §Gotchas) — so a test that calls
`RaiseEvent(Loaded)` proves a handler, never that WPF reaches it. `ScrollBarHidingTests.EverySurfaceShownWithTheOptionOnDrawsNoBar`
shows each surface in a real window, off the screen and never activated, with the option on before anything is built as
at start-up; `WpfRaisesLoadedOnlyWhereASubtreeListensForIt` checks the harness against WPF itself (a scroller holding a
Border is never loaded, one holding a CheckBox is), on CI too.
**A test that sends input must also say which keys are held.** `Keyboard.Modifiers` is the machine's real keyboard, read
from any thread (a fresh background thread's `GetKeyState` reports the machine's NumLock — measured 2026-10-06), so a
wheel test that read it held whatever key a person pressed while the gate ran: `ChartWheelTests`' plain half went red once
@@ -87,6 +102,16 @@ own work item on the STA thread and puts back — and with the keys a parameter,
caused when its run ends, and `tools/test-artifacts-check.ps1` fails the gate for one left behind
(`17_HOOK_ENGINE` §Native logging, 2026-09-15). A new native test binary that starts the harness needs the listener;
a managed test project that stages it gets the sweep from `FrameLedger.DrainFixtures.targets`.
- **Test isolation: a suite whose host resolves its target BY NAME consents to a run-unique copy of the harness**
(beta.16). `build.ps1` runs the test projects as parallel processes, and `TargetResolver` counts every process of the
consented executable's name — an unreadable one too, which is what a `hook-harness.exe` another project is still
starting is (its module list a partial copy). #269's first CI run lost `AgentEndToEndTests` that way:
`TargetAmbiguous`, exit 6. `AgentEndToEndTests`, `PartialRecoveryEndToEndTests` and `CaptureHostEndToEndTests` now copy
the staged harness to `hook-harness-<their scratch directory>.exe` beside their data, as `PipeEndToEndTests` already
did, register that directory with the sweep, and pin the copy to the staged harness byte for byte;
`AnotherHookHarnessRunningBesideTheSuiteDoesNotMakeTheTargetAmbiguous` runs a second harness beside the capture (red
against the shared name: `TargetAmbiguous`). A suite that attaches by pid (`ShmDrainIntegrationTests`, the native
`fl_guard_test`) is not exposed and keeps the staged name.
- Guard integration: harness loads a **dummy DLL named like an anti-cheat module** → injection refused pre-launch; loaded late → safety unhook. (A renamed harmless DLL, not real anti-cheat software.)
## Hook overhead measurement (NFR-1, per release)
+22 -3
View File
@@ -121,7 +121,7 @@ Code-behind wires services once: `navigationService.SetNavigationControl(RootNav
| Need | Use | Not |
|---|---|---|
| Button | `ui:Button` with `Appearance="Primary/Secondary/Danger"`, `Icon="{ui:SymbolIcon Play24}"` | bare `Button` |
| Text | `ui:TextBlock` with `FontTypography="Caption/Body/BodyStrong/Subtitle/Title"` | hardcoded FontSize |
| Text | `ui:TextBlock` with `FontTypography="Caption/Body/BodyStrong/Subtitle/Title"`; muted text with `Style="{StaticResource SecondaryText}"` or `TertiaryText` (beta.17) | hardcoded FontSize; `Appearance="Secondary"` on a TextBlock (§Gotchas) |
| Text input | `ui:TextBox` (`PlaceholderText`, `Icon`) | native TextBox |
| Numbers | `ui:NumberBox` (`Minimum/Maximum/SmallChange`, `SpinButtonPlacementMode="Compact"` — needs ≥ 4.3.0) | TextBox + parsing |
| Toggle | `ui:ToggleSwitch` | CheckBox for on/off settings |
@@ -143,7 +143,7 @@ Native `Menu`, `TabControl`, `ComboBox`, `Slider`~~, `ListView`~~ are fine — t
## Theming & brushes
- Colors **only** via `{DynamicResource …}` theme keys, e.g. `TextFillColorPrimaryBrush`, `TextFillColorSecondaryBrush`, `ControlFillColorDefaultBrush`, `CardBackgroundFillColorDefaultBrush`, `ApplicationBackgroundBrush`, `AccentTextFillColorPrimaryBrush`, `SystemFillColorCriticalBrush`. `DynamicResource` always (theme can change at runtime); `StaticResource` for theme brushes is a review-blocking bug.
- Colors **only** via `{DynamicResource …}` theme keys, e.g. `TextFillColorPrimaryBrush`, `TextFillColorSecondaryBrush`, `ControlFillColorDefaultBrush`, `CardBackgroundFillColorDefaultBrush`, `ApplicationBackgroundBrush`, `AccentTextFillColorPrimaryBrush`, `SystemFillColorCriticalBrush`. `DynamicResource` always (theme can change at runtime); `StaticResource` for theme brushes is a review-blocking bug. *(Added 2026-10-07: so is a property that looks like a theme colour but is looked up once — `ui:TextBlock Appearance`, §Gotchas.)*
- **`ui:Badge` `Appearance="Info"` / `Caution` / `Danger` / `Success` are NOT theme colours.** Their backgrounds are
`Palette*Brush` from WPF UI's `Palette.xaml` — one fixed Material palette shared by both themes — under the theme's
text: Info is white on `#03A9F4` in dark (2.6:1), measured 2026-09-16 on the Games card. ~~Use `Secondary` (theme
@@ -254,10 +254,29 @@ On startup and on `ApplicationThemeManager.Changed`: for every live plot set fig
- [ ] **A scroll bar's visibility is bound inside its scroller's template** (`ComputedVerticalScrollBarVisibility`), so a style
on `ScrollBar` or `ui:DynamicScrollBar` cannot hide it. Set the scroller's own `ScrollBarVisibility` to `Hidden` — no
bar, and the wheel, the keyboard and touch still scroll (`ui:PassiveScrollViewer` treats only `Disabled` as "cannot
scroll") — as `Services.ScrollBarHiding` does for `ui.hide_scrollbars` (beta.14).
scroll") — as `Services.ScrollBarHiding` does for `ui.hide_scrollbars` (beta.14), reaching each scroller from a class
handler on `ScrollChanged` since beta.17 rather than from `Loaded` alone (next item).
- [ ] **A class handler on `Loaded` is not a load hook.** WPF raises Loaded only on an element whose subtree listens for it
with a handler of its own — an instance handler, a style's `EventSetter`, a template's trigger
(`BroadcastEventHelper.OnBroadcastCallback` walks only into `SubtreeHasLoadedChangeHandler`;
`FrameworkElement.ThisHasLoadedChangeEventHandler`) — and `EventManager.RegisterClassHandler` counts as none of them.
WPF UI 4.3.0's `ToggleSwitch`, `CheckBox` and `ProgressRing` templates carry a Loaded trigger, so a scroller over those
loads and a scroller over plain cards and text never does: `ScrollBarHiding` hid Settings' bar and not the Dashboard's
(beta.17). To reach every instance, hook an event the element raises itself — a scroller's `ScrollChanged` comes from its
first layout. `ScrollBarHidingTests.WpfRaisesLoadedOnlyWhereASubtreeListensForIt` keeps the behaviour visible, and a test
that raises Loaded with `RaiseEvent` proves the handler, never that it is reached.
- [ ] **No dialog in 4.3.0 closes on Esc.** Neither `ContentDialog.cs` nor `MessageBox.cs` at the 4.3.0 tag handles a
key (read 2026-09-15), and `ContentDialog.CloseButtonText` DEFAULTS to "Close" — an empty string is how a dialog
says it has no Close button. `MessageBox.Close()` is `[Obsolete("Use Close with MessageBoxResult instead")]` while no
such overload is public; the Close button's own path is `TemplateButtonCommand.Execute(MessageBoxButton.Close)`.
`Services/DialogKeyboard` registers one class handler on `Window` (bubbling `KeyDown`, so a dropdown's Esc wins) and
closes through those paths; `AccessibilityTests.EscapeClosesTheOpenDialogWithNoResult` holds it (`08_UI` §Accessibility).
- [ ] **`ui:TextBlock Appearance` keeps the theme a text was made under (4.3.0).** `TextBlock.OnAppearanceChanged` stores
`TryFindResource(…)` in the internal `AppearanceForeground`, and `TextBlockMetadata` coerces every TextBlock's `Foreground`
to it — the brush found when the element was made, never looked up again (read at tag 4.3.0, 2026-10-07; `main` is the
same). After a theme switch the page on screen kept the old theme's secondary text: light grey on white, dark grey on dark
(the owner's screenshots of Settings, beta.17). The property also inherits, so the attached form on a container pins every
text under it. Muted text takes `Style="{StaticResource SecondaryText}"` or `TertiaryText` (`Styles/FrameLedger.xaml`,
`DynamicResource`). `ContrastTests.NoTextBlockTakesItsColourFromAppearance` refuses every form in the App's XAML and code,
`PagesLoadTests.EveryTextFollowsAThemeSwitch` renders every surface through a switch both ways, and
`PagesLoadTests.WpfUisAppearanceStillKeepsTheThemeATextWasMadeUnder` turns red the day upstream follows a switch.
+82 -1
View File
@@ -1907,7 +1907,7 @@ than N/A (`FlShmHandshake.AdapterLuid`'s own comment), and a finding on the PC i
**Owner-only, added to the list below:** item 10.
## **START HERE** — 2026-10-06, the beta.14 train: contrast and the wheel, the update audit, crash reporters, assembly metadata, new measurements
## ~~**START HERE**~~ — 2026-10-06, the beta.14 train: contrast and the wheel, the update audit, crash reporters, assembly metadata, new measurements *(struck the same day: the head is §beta.15 below)*
*Status is `CHANGELOG.md` `[0.1.0-beta.14]`; this is what no other file carries. The owner's list (2026-10-05, with a
screenshot of the import list in the dark theme): the contrast, a review of the update logic, games recorded as crashed
@@ -1970,6 +1970,75 @@ PR-7 the metrics' Agent half (schema 0019), PR-8 their App half, PR-9 the releas
**Owner-only, added to the list below:** item 11.
## ~~**START HERE**~~ — 2026-10-06, the beta.15 train: the five chips beta.14 left *(struck the same day: the head is §beta.16 below)*
*Status is `CHANGELOG.md` `[0.1.0-beta.15]`; this is what no other file carries. The owner's request (2026-10-06): "Xong
beta14, tổng hợp 5 chip thành 1 bản beta15" — the five findings the beta.14 train spawned as tasks instead of fixing in
its own scope. Six stacked PRs — PR-1 the choice lists follow the language, PR-2 launch mode's election, PR-3 a restart
during finalize, PR-4 the scan set's creation times (D51), PR-5 the App's viewer (D52), PR-6 the release.*
**Decisions (owner, 2026-10-06, asked before the plan — do not re-ask):**
- **D51 — the scan set cuts a parent/child link only when it is proven wrong**: both creation times read and the child
created before the process whose pid it names as its parent. An unread time keeps the link (rule 2, fail closed), equal
times keep it, and each pid is walked once (`fl_guard_scanset.cpp`; `19_SAFETY` item 1 carries the rule and its one
residual, a clock set backwards between a parent's start and its child's).
- **D52 — the App's `--data-dir` is a viewer over a copy**: no Agent is started or contacted (its composition holds no
pipe client, launcher, update check or Run-entry writer — `Services.MachineFacingServices`), every control that would
ask the Agent or change the PC is disabled, and the profile's own folder is refused however it is spelled. D6 is
unchanged; the full alternative (an Agent `--serve --data-dir`) would have changed D6, the pipe's per-user name and the
hello.
**Traps met on the way:**
- **Launch mode's election had never run** (since #150): a refused launch returned its outcome without the launcher's
pid, so the orchestrator stopped before its first `election:` line — and its tests hand-built an outcome that already
carried a pid. A test of one half that hand-builds what the other half returns proves the half, not the pair
(`CaptureSessionLaunchTests` now asserts what the session itself returns).
- **The watcher reports a process once.** "One session per executable at a time" turned a restarted game away and nothing
looked at it again; the orchestrator remembers the newest such process per executable and starts it when the running
session ends, if it is then the executable's only process — a multi-process game's helper is not a restart.
- **A pid in a snapshot names whoever holds it now.** Creation times are the evidence (`GetProcessTimes`, under the
module scan's own read-only right), compared strictly: a parent and a child can share one tick of the clock.
- **Static choice lists keep the language they were built in**; a list read once into a `static` field, the tray's
menu built once and the pill's text written once all needed a way back (`ILanguageFollower`, called by the shell's
rebuild).
- **An Agent end-to-end test can lose to another project's harness**: `build.ps1` runs the test projects as parallel
processes, and a `hook-harness.exe` another project was still starting made `TargetResolver` refuse with
`TargetAmbiguous` (#269's first CI run; the re-run passed). The refusal is right and the test isolation is not — left
as a task, not fixed in this train. *(Fixed in beta.16: the by-name suites consent to a run-unique copy of the
harness — `14_TESTING` §hook-harness, test isolation.)*
**Owner-only, added to the list below:** item 12.
## **START HERE** — 2026-10-06, 0.1.0-beta.16: beta.15 verified, and the chip it left
*Status is `CHANGELOG.md` `[0.1.0-beta.16]`; this is what no other file carries. The owner, after beta.15's release
(2026-10-06): owner-only item 12 passed on real hardware ("đã chạy và ok"), do the chip beta.15 left, release, and close
the session. One PR carries the test isolation and the release. Nothing in the app changed, so no owner-only item is
added.*
- **The chip:** a suite whose host resolves its target BY NAME (`TargetResolver`) — the Agent's end-to-end and
partial-recovery suites, the capture host's — consents to a run-unique copy of the harness, as the pipe suite already
did, so another project's `hook-harness.exe` starting at the same moment can no longer make the target ambiguous
(`14_TESTING` §hook-harness). `AnotherHookHarnessRunningBesideTheSuiteDoesNotMakeTheTargetAmbiguous` runs a second
harness beside the capture and was red against the shared name (`TargetAmbiguous`), measured before the fix.
- **The beta.15 train's merges, for the record:** #274–#276 and #279 carry the PRs' own titles; #277 (PR-4, the scan
set, D51) and #278 (PR-5, the viewer, D52) were opened by the owner from the pushed branches, so their squash commits
are titled "Beta15/pr4 guard" and "Beta15/pr5 viewer" and list every commit of the branch. Their content is the gated
stack's: main's tree matched it after each merge.
**Traps met on the way:**
- **A session restart restarts gpg-agent**, so the first signature after it asks for the passphrase again, whatever the
cache said a minute before; pinentry-qt gives up in about half a minute with nobody at the desk (`git tag -s` failed
with "signing failed: Timeout"). Ask the owner for `echo x | gpg --clearsign` right before a tag.
- **main is strict and linear**: each PR of a stack must be rebased onto the squash of the one before and run CI again.
`git rebase --update-refs --onto origin/main <merged branch> <tip>` moves every branch of the stack at once and drops
a commit main already carries (it dropped PR-4 and PR-5 when the owner had merged them from the branches).
- **The desktop app forbids polling CI** (no `gh` loop, Monitor or ScheduleWakeup): it wakes the session on a failure, a
conflict or a review comment, never on green, so a green PR waits for the owner's word or the owner's auto-merge.
## Owner-only — no PR can close these
1. **§S23-2 — branch protection.** `Rules / validate` is not a required status check on
@@ -2046,6 +2115,18 @@ PR-7 the metrics' Agent half (schema 0019), PR-8 their App half, PR-9 the releas
against the DLSS mode, the clocks, fan and limits. (h) The `ja` strings marked `review`. (i) **The Privacy Policy 2.7
wording — before PR-5 and PR-7 merge.**
12. ~~**beta.15 on real hardware.**~~ **Passed 2026-10-06** — the owner ran it on real hardware and reported it OK ("đã
chạy và ok"). *(The item as written:)* (a) **The update from beta.14:** Help ▸ Check for updates, then *Restart to update*
with no game running — the first update in which beta.14's own step stops the Agent before Velopack applies; the
`velopack:` lines in `ui-*.log` say what was downloaded. (b) **A quick restart:** close a hooked game and start it again
within a few seconds; both sessions are recorded. (c) **A change of language:** English ↔ Tiếng Việt in Settings; the
theme and channel lists, the Logs page's lists, the Games sort, the tray's menu and the Agent pill follow without a
restart. (d) **A launcher:** `FrameLedger.Agent.exe --console launch --exe <a launcher that starts the game>`; the
log has `election:` lines and the session is the game's. (e) **The viewer:** copy the data folder with SQLite's backup
(`12_BUILD` §Debugging) and start `FrameLedger.exe --data-dir <copy>`; the banner names the folder, the pill reads
*Viewer — no Agent*, the switches are off, and the installed App runs beside it untouched. (f) The `ja` strings
marked `review`.
**Answered 2026-08-05, do not re-ask:** remove `gameguard` and keep `guard` (approved
over a red `Rules` gate, with the reasoning recorded in the merge commit); vendor NVAPI
headers **and** `amd64/nvapi64.lib`; Windows 11 is the **measurement scope** only —
+1 -1
View File
@@ -12,7 +12,7 @@
HTML comments are not part of the block.
-->
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.14`** (2026-10-06), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.16`** (2026-10-06), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
+1 -1
View File
@@ -114,7 +114,7 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.14`** (2026-10-06), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.16`** (2026-10-06), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
+2 -1
View File
@@ -77,7 +77,8 @@ public partial class App : System.Windows.Application
HookCrashHandlers();
// 08_UI §Accessibility (P4 PR-8): Esc closes the open ContentDialog or MessageBox, before any window exists.
DialogKeyboard.Register();
// beta.14: ui.hide_scrollbars reaches every scroller as it loads, those in a control's template too.
// beta.14: ui.hide_scrollbars reaches every scroller as it is laid out (beta.17: not only as it loads), those in a
// control's template too.
ScrollBarHiding.Register();
_run = DiagReport.Requested(e.Args) ? DiagAsync() : RunAsync();
}
@@ -20,6 +20,6 @@
</Grid.ColumnDefinitions>
<sp:WpfPlot x:Name="Histogram" Grid.Column="0" />
<sp:WpfPlot x:Name="Percentiles" Grid.Column="2" />
<ui:TextBlock x:Name="Note" Grid.Row="1" Grid.ColumnSpan="3" Margin="0,4,0,0" Appearance="Tertiary" TextWrapping="Wrap" Visibility="Collapsed" />
<ui:TextBlock x:Name="Note" Grid.Row="1" Grid.ColumnSpan="3" Margin="0,4,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Visibility="Collapsed" />
</Grid>
</UserControl>
@@ -15,7 +15,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ui:TextBlock x:Name="Note" Grid.Row="0" Margin="0,0,0,4" Appearance="Tertiary" TextWrapping="Wrap" Visibility="Collapsed" />
<ui:TextBlock x:Name="Note" Grid.Row="0" Margin="0,0,0,4" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Visibility="Collapsed" />
<sp:WpfPlot x:Name="Plot" Grid.Row="1" />
</Grid>
</UserControl>
@@ -11,7 +11,7 @@
where the upscaler's parameters never were. -->
<Grid>
<sp:WpfPlot x:Name="Plot" />
<ui:TextBlock x:Name="NotMeasured" Appearance="Secondary" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"
<ui:TextBlock x:Name="NotMeasured" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{x:Static res:Strings.Chart_RenderScale_NotMeasured}" Visibility="Collapsed" />
</Grid>
</UserControl>
@@ -33,7 +33,7 @@
<Border Padding="12" CornerRadius="6" Background="{DynamicResource SystemFillColorCautionBackgroundBrush}">
<ui:TextBlock Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{x:Static vm:FirstRunViewModel.LegalSummary}" TextWrapping="Wrap" />
</Border>
<ui:TextBlock Margin="0,10,0,0" Appearance="Secondary" Text="{x:Static vm:FirstRunViewModel.LegalBody}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,10,0,0" Style="{StaticResource SecondaryText}" Text="{x:Static vm:FirstRunViewModel.LegalBody}" TextWrapping="Wrap" />
</StackPanel>
<ListBox Grid.Row="1"
Grid.Column="0"
@@ -48,10 +48,10 @@
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="0,0,0,6" Orientation="Horizontal">
<!-- beta.12 (D45): the GPL is the user's licence, for information; Accept covers the other three. -->
<ui:TextBlock Margin="0,0,12,0" VerticalAlignment="Center" Appearance="Secondary" TextWrapping="Wrap" MaxWidth="460"
<ui:TextBlock Margin="0,0,12,0" VerticalAlignment="Center" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" MaxWidth="460"
Text="{x:Static res:Strings.FirstRun_Doc_InformationNote}"
Visibility="{Binding ViewModel.SelectedDocument.RequiresAcceptance, Converter={StaticResource InverseBoolToVis}}" />
<ui:TextBlock VerticalAlignment="Center" Appearance="Secondary" Text="{Binding ViewModel.SelectedDocument.Version}" />
<ui:TextBlock VerticalAlignment="Center" Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.SelectedDocument.Version}" />
<ui:HyperlinkButton Margin="12,0,0,0"
Command="{Binding ViewModel.OpenOnlineCommand}"
Content="{x:Static res:Strings.FirstRun_Legal_Online}"
@@ -72,7 +72,7 @@
<!-- Step 2: Agent setup, the facts as the Agent reports them. -->
<StackPanel Grid.Row="1" Margin="0,12,0,0" Visibility="{Binding ViewModel.IsAgentStep, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:FirstRunViewModel.AgentBody}" TextWrapping="Wrap" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:FirstRunViewModel.AgentBody}" TextWrapping="Wrap" />
<Grid Margin="0,16,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -104,18 +104,18 @@
<!-- Step 3: the hooking explainer — the consent dialog's reviewed tier paragraphs, and what "off" means. -->
<ScrollViewer Grid.Row="1" Margin="0,12,0,0" Visibility="{Binding ViewModel.IsExplainerStep, Converter={StaticResource BoolToVis}}">
<StackPanel>
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:FirstRunViewModel.ExplainerIntro}" TextWrapping="Wrap" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:FirstRunViewModel.ExplainerIntro}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,16,0,4" FontTypography="BodyStrong" Text="{x:Static res:Strings.Tier_Hooked}" />
<ui:TextBlock Text="{x:Static vm:FirstRunViewModel.ExplainerHooked}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,16,0,4" FontTypography="BodyStrong" Text="{x:Static res:Strings.Tier_NotHooked}" />
<ui:TextBlock Text="{x:Static vm:FirstRunViewModel.ExplainerNotHooked}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,16,0,0" Appearance="Secondary" Text="{x:Static vm:FirstRunViewModel.ExplainerOff}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,16,0,0" Style="{StaticResource SecondaryText}" Text="{x:Static vm:FirstRunViewModel.ExplainerOff}" TextWrapping="Wrap" />
</StackPanel>
</ScrollViewer>
<!-- Step 4: the import placeholder. -->
<StackPanel Grid.Row="1" Margin="0,12,0,0" Visibility="{Binding ViewModel.IsImportStep, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:FirstRunViewModel.ImportBody}" TextWrapping="Wrap" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:FirstRunViewModel.ImportBody}" TextWrapping="Wrap" />
</StackPanel>
<!-- Buttons: Decline/Accept on the gate; Back/Next on the middle steps; Finish at the end; Close in read-only mode. -->
@@ -32,7 +32,7 @@
AutomationProperties.Name="{x:Static vm:AgentAdminDialogViewModel.AcceptText}"
Content="{x:Static vm:AgentAdminDialogViewModel.AcceptText}"
IsChecked="{Binding Accepted, Mode=TwoWay}" />
<ui:TextBlock Margin="0,12,0,0" HorizontalAlignment="Right" Appearance="Tertiary" Text="{x:Static vm:AgentAdminDialogViewModel.Version}" />
<ui:TextBlock Margin="0,12,0,0" HorizontalAlignment="Right" Style="{StaticResource TertiaryText}" Text="{x:Static vm:AgentAdminDialogViewModel.Version}" />
</StackPanel>
</ui:PassiveScrollViewer>
</UserControl>
@@ -20,11 +20,11 @@
<ui:TextBlock TextWrapping="Wrap" Text="{x:Static vm:BugBundleOptionsViewModel.Intro}" />
<StackPanel Visibility="{Binding HasCrashDump, Converter={StaticResource BoolToVis}}">
<CheckBox Margin="0,12,0,0" IsChecked="{Binding IncludeCrashDump}" Content="{Binding DumpLabel}" />
<ui:TextBlock Margin="28,4,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:BugBundleOptionsViewModel.DumpDetail}" />
<ui:TextBlock Margin="28,4,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:BugBundleOptionsViewModel.DumpDetail}" />
</StackPanel>
<StackPanel Visibility="{Binding HasLastSession, Converter={StaticResource BoolToVis}}">
<CheckBox Margin="0,12,0,0" IsChecked="{Binding IncludeLastSession}" Content="{Binding SessionLabel}" />
<ui:TextBlock Margin="28,4,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:BugBundleOptionsViewModel.SessionDetail}" />
<ui:TextBlock Margin="28,4,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:BugBundleOptionsViewModel.SessionDetail}" />
</StackPanel>
</StackPanel>
</UserControl>
@@ -30,6 +30,6 @@
</ui:PassiveScrollViewer>
</Border>
<ui:HyperlinkButton Padding="0" Content="{x:Static vm:BugReportPreviewViewModel.ShowZipText}" Command="{Binding ShowZipCommand}" />
<ui:TextBlock Margin="0,10,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:BugReportPreviewViewModel.DragInstruction}" />
<ui:TextBlock Margin="0,10,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:BugReportPreviewViewModel.DragInstruction}" />
</StackPanel>
</UserControl>
@@ -32,7 +32,7 @@
<ui:TextBlock Margin="0,14,0,0" FontWeight="SemiBold" Text="{x:Static vm:ConsentDialogViewModel.AntiCheat}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,8,0,0" Text="{x:Static vm:ConsentDialogViewModel.Terms}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,18,0,6" Appearance="Secondary" Text="{Binding TypeToConfirm}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,18,0,6" Style="{StaticResource SecondaryText}" Text="{Binding TypeToConfirm}" TextWrapping="Wrap" />
<ui:TextBox x:Name="Acknowledgement"
AutomationProperties.Name="{Binding TypeToConfirm}"
Text="{Binding Typed, UpdateSourceTrigger=PropertyChanged}"
@@ -18,13 +18,13 @@
session runs; the sweep is the Agent's and asks first. Buttons are disabled while an action runs.
-->
<StackPanel>
<ui:TextBlock MaxWidth="700" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Maintenance_Intro}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="700" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Maintenance_Intro}" TextWrapping="Wrap" />
<ui:CardControl Margin="0,12,0,0" Icon="{ui:SymbolIcon ShieldCheckmark24}">
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Maintenance_Integrity_Label}" />
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Maintenance_Integrity_Body}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Maintenance_Integrity_Body}" TextWrapping="Wrap" />
</StackPanel>
</ui:CardControl.Header>
<ui:Button MinWidth="120" Command="{Binding CheckIntegrityCommand}" Content="{x:Static res:Strings.Maintenance_Integrity_Button}" />
@@ -34,7 +34,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Maintenance_Backup_Label}" />
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Maintenance_Backup_Body}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Maintenance_Backup_Body}" TextWrapping="Wrap" />
</StackPanel>
</ui:CardControl.Header>
<ui:Button MinWidth="120" Command="{Binding BackUpCommand}" Content="{x:Static res:Strings.Maintenance_Backup_Button}" />
@@ -44,7 +44,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Maintenance_Sweep_Label}" />
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Maintenance_Sweep_Body}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Maintenance_Sweep_Body}" TextWrapping="Wrap" />
</StackPanel>
</ui:CardControl.Header>
<ui:Button MinWidth="120" Command="{Binding SweepCommand}" Content="{x:Static res:Strings.Maintenance_Sweep_Button}" />
@@ -54,7 +54,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Maintenance_Compact_Label}" />
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Maintenance_Compact_Body}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Maintenance_Compact_Body}" TextWrapping="Wrap" />
</StackPanel>
</ui:CardControl.Header>
<ui:Button MinWidth="120" Command="{Binding CompactCommand}" Content="{x:Static res:Strings.Maintenance_Compact_Button}" />
@@ -22,7 +22,7 @@
Visibility="{Binding NameDetected, Converter={StaticResource BoolToVis}}">
<TextBlock Style="{StaticResource TagPillText}" Text="{x:Static vm:EditGameViewModel.DetectedBadge}" />
</Border>
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:EditGameViewModel.NameLabel}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:EditGameViewModel.NameLabel}" />
</DockPanel>
<ui:TextBox Margin="0,4,0,12" AutomationProperties.Name="{x:Static vm:EditGameViewModel.NameLabel}" Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}" />
@@ -31,7 +31,7 @@
Visibility="{Binding PublisherDetected, Converter={StaticResource BoolToVis}}">
<TextBlock Style="{StaticResource TagPillText}" Text="{x:Static vm:EditGameViewModel.DetectedBadge}" />
</Border>
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:EditGameViewModel.PublisherLabel}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:EditGameViewModel.PublisherLabel}" />
</DockPanel>
<ui:TextBox Margin="0,4,0,12" AutomationProperties.Name="{x:Static vm:EditGameViewModel.PublisherLabel}" Text="{Binding Publisher, UpdateSourceTrigger=PropertyChanged}" />
@@ -40,11 +40,11 @@
Visibility="{Binding VersionDetected, Converter={StaticResource BoolToVis}}">
<TextBlock Style="{StaticResource TagPillText}" Text="{x:Static vm:EditGameViewModel.DetectedBadge}" />
</Border>
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:EditGameViewModel.VersionLabel}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:EditGameViewModel.VersionLabel}" />
</DockPanel>
<ui:TextBox Margin="0,4,0,12" AutomationProperties.Name="{x:Static vm:EditGameViewModel.VersionLabel}" Text="{Binding Version, UpdateSourceTrigger=PropertyChanged}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:EditGameViewModel.NotesLabel}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:EditGameViewModel.NotesLabel}" />
<ui:TextBox Margin="0,4,0,0" MinHeight="72" AutomationProperties.Name="{x:Static vm:EditGameViewModel.NotesLabel}" AcceptsReturn="True" TextWrapping="Wrap" Text="{Binding Notes, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
</UserControl>
@@ -68,7 +68,7 @@
<ui:HyperlinkButton Padding="4,0" Content="{x:Static res:Strings.Import_SelectAll}" Command="{Binding SelectAllCommand}" xmlns:res="clr-namespace:FrameLedger.App" />
<ui:HyperlinkButton Padding="4,0" Content="{x:Static res:Strings.Import_SelectNone}" Command="{Binding SelectNoneCommand}" xmlns:res="clr-namespace:FrameLedger.App" />
</StackPanel>
<ui:TextBlock Appearance="Secondary" VerticalAlignment="Center" Text="{Binding SelectedText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" VerticalAlignment="Center" Text="{Binding SelectedText}" />
</DockPanel>
</Grid>
</UserControl>
@@ -13,7 +13,7 @@
MinWidth="360">
<!-- FR-8.3: the override beside the measurement, never over it (06_DATA_MODEL: session_annotations.*_override). -->
<StackPanel>
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:TriStateOverrideViewModel.Body}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:TriStateOverrideViewModel.Body}" />
<RadioButton Margin="0,12,0,0" GroupName="Override" Content="{x:Static vm:TriStateOverrideViewModel.KeepText}" IsChecked="{Binding UseMeasured}" />
<RadioButton Margin="0,4,0,0" GroupName="Override" Content="{x:Static vm:TriStateOverrideViewModel.YesText}" IsChecked="{Binding Yes}" />
<RadioButton Margin="0,4,0,0" GroupName="Override" Content="{x:Static vm:TriStateOverrideViewModel.NoText}" IsChecked="{Binding No}" />
+4 -4
View File
@@ -14,7 +14,7 @@
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Style="{StaticResource PageRoot}">
<ui:TextBlock FontTypography="Title" Text="{x:Static vm:CompareViewModel.Header}" />
<ui:TextBlock Margin="0,16,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:CompareViewModel.EmptyText}"
<ui:TextBlock Margin="0,16,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:CompareViewModel.EmptyText}"
Visibility="{Binding ViewModel.IsEmpty, Converter={StaticResource BoolToVis}}" />
<Grid Margin="0,16,0,0" Visibility="{Binding ViewModel.IsEmpty, Converter={StaticResource InverseBoolToVis}}">
@@ -24,7 +24,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:TextBlock Grid.Column="0" FontTypography="Subtitle" Text="{x:Static vm:CompareViewModel.PickHeader}" />
<ui:TextBlock Grid.Column="1" Margin="0,0,16,0" VerticalAlignment="Center" Appearance="Secondary" Text="{Binding ViewModel.SelectedText}" />
<ui:TextBlock Grid.Column="1" Margin="0,0,16,0" VerticalAlignment="Center" Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.SelectedText}" />
<ui:Button Grid.Column="2" Appearance="Primary" Command="{Binding ViewModel.CompareCommand}" IsEnabled="{Binding ViewModel.CanCompare}"
Content="{x:Static vm:CompareViewModel.RunText}" Icon="{ui:SymbolIcon ArrowSwap24}" />
</Grid>
@@ -83,7 +83,7 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type vm:CompareCandidateViewModel}">
<ui:TextBlock Margin="4,0" Appearance="Secondary" FontTypography="Caption" TextWrapping="Wrap" Text="{Binding Label}" />
<ui:TextBlock Margin="4,0" Style="{StaticResource SecondaryText}" FontTypography="Caption" TextWrapping="Wrap" Text="{Binding Label}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
@@ -92,7 +92,7 @@
<DataTemplate DataType="{x:Type vm:CompareRowViewModel}">
<Border BorderThickness="0,0,0,1" BorderBrush="{DynamicResource ControlStrokeColorDefaultBrush}" Padding="0,6">
<DockPanel>
<ui:TextBlock DockPanel.Dock="Left" Width="140" Appearance="Secondary" Text="{Binding Metric}" />
<ui:TextBlock DockPanel.Dock="Left" Width="140" Style="{StaticResource SecondaryText}" Text="{Binding Metric}" />
<ItemsControl ItemsSource="{Binding Cells}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
+13 -13
View File
@@ -24,16 +24,16 @@
<TextBlock Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{Binding ViewModel.Live.TierText}" />
</Border>
</StackPanel>
<ui:TextBlock Margin="0,8,0,0" Appearance="Secondary" Text="{x:Static vm:LiveCaptureViewModel.IdleText}"
<ui:TextBlock Margin="0,8,0,0" Style="{StaticResource SecondaryText}" Text="{x:Static vm:LiveCaptureViewModel.IdleText}"
Visibility="{Binding ViewModel.Live.IsActive, Converter={StaticResource InverseBoolToVis}}" />
<StackPanel Margin="0,8,0,0" Visibility="{Binding ViewModel.Live.IsActive, Converter={StaticResource BoolToVis}}">
<ui:TextBlock FontTypography="BodyStrong" Text="{Binding ViewModel.Live.GameName}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.Live.ElapsedText}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:LiveCaptureViewModel.WaitingText}"
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.Live.ElapsedText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:LiveCaptureViewModel.WaitingText}"
Visibility="{Binding ViewModel.Live.WaitingForFrames, Converter={StaticResource BoolToVis}}" />
<StackPanel Margin="0,8,0,0" Visibility="{Binding ViewModel.Live.IsHeld, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Text="{x:Static vm:LiveCaptureViewModel.HeldText}" TextWrapping="Wrap" />
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.Live.HeldReason}" TextWrapping="Wrap" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.Live.HeldReason}" TextWrapping="Wrap" />
</StackPanel>
<controls:FpsReadout Margin="0,8,0,0" Model="{Binding ViewModel.Live.Readout}"
Visibility="{Binding ViewModel.Live.IsHeld, Converter={StaticResource InverseBoolToVis}}" />
@@ -45,9 +45,9 @@
Visibility="{Binding ViewModel.Live.RtActive, Converter={StaticResource BoolToVis}}">
<TextBlock Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}" Text="{x:Static vm:LiveCaptureViewModel.RtOnText}" />
</Border>
<ui:TextBlock Margin="0,0,16,0" Appearance="Secondary" Text="{Binding ViewModel.Live.GpuTempText}" />
<ui:TextBlock Margin="0,0,16,0" Appearance="Secondary" Text="{Binding ViewModel.Live.CpuTempText}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.Live.MemoryText}" />
<ui:TextBlock Margin="0,0,16,0" Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.Live.GpuTempText}" />
<ui:TextBlock Margin="0,0,16,0" Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.Live.CpuTempText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.Live.MemoryText}" />
</WrapPanel>
</StackPanel>
</StackPanel>
@@ -57,19 +57,19 @@
<UniformGrid Margin="0,12,0,0" Columns="3">
<ui:Card Margin="0,0,6,0">
<StackPanel>
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:DashboardViewModel.TotalsGames}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:DashboardViewModel.TotalsGames}" />
<ui:TextBlock FontTypography="Subtitle" Text="{Binding ViewModel.GamesTrackedText}" />
</StackPanel>
</ui:Card>
<ui:Card Margin="6,0,6,0">
<StackPanel>
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:DashboardViewModel.TotalsPlaytime}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:DashboardViewModel.TotalsPlaytime}" />
<ui:TextBlock FontTypography="Subtitle" Text="{Binding ViewModel.PlaytimeText}" />
</StackPanel>
</ui:Card>
<ui:Card Margin="6,0,0,0">
<StackPanel>
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:DashboardViewModel.TotalsThisWeek}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:DashboardViewModel.TotalsThisWeek}" />
<ui:TextBlock FontTypography="Subtitle" Text="{Binding ViewModel.ThisWeekText}" />
</StackPanel>
</ui:Card>
@@ -110,7 +110,7 @@
<!-- recent sessions -->
<ui:TextBlock Margin="0,20,0,0" FontTypography="Subtitle" Text="{x:Static vm:DashboardViewModel.RecentHeader}" />
<ui:TextBlock Margin="0,8,0,0" Appearance="Secondary" TextWrapping="Wrap"
<ui:TextBlock Margin="0,8,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
Text="{x:Static vm:DashboardViewModel.EmptyText}"
Visibility="{Binding ViewModel.RecentEmpty, Converter={StaticResource BoolToVis}}" />
<ItemsControl Margin="0,8,0,0" ItemsSource="{Binding ViewModel.Recent}">
@@ -132,8 +132,8 @@
<Border Grid.Column="1" Style="{StaticResource Pill}" Margin="8,0">
<TextBlock Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{Binding TierText}" />
</Border>
<ui:TextBlock Grid.Column="2" Appearance="Secondary" VerticalAlignment="Center" Margin="4,0,0,0" Text="{Binding DateText}" />
<ui:TextBlock Grid.Column="3" Appearance="Secondary" VerticalAlignment="Center" Margin="12,0" Text="{Binding DurationText}" />
<ui:TextBlock Grid.Column="2" Style="{StaticResource SecondaryText}" VerticalAlignment="Center" Margin="4,0,0,0" Text="{Binding DateText}" />
<ui:TextBlock Grid.Column="3" Style="{StaticResource SecondaryText}" VerticalAlignment="Center" Margin="12,0" Text="{Binding DurationText}" />
<controls:FpsReadout Grid.Column="4" HorizontalAlignment="Right" Model="{Binding Readout}" />
</Grid>
</ui:CardAction>
+35 -35
View File
@@ -20,7 +20,7 @@
<StackPanel Style="{StaticResource PageRoot}">
<ui:HyperlinkButton Padding="0" Command="{Binding ViewModel.BackCommand}" Content="{x:Static vm:GameDetailViewModel.BackText}" Icon="{ui:SymbolIcon ArrowLeft24}" />
<ui:TextBlock Margin="0,12,0,0" Appearance="Secondary" TextWrapping="Wrap"
<ui:TextBlock Margin="0,12,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
Text="{x:Static vm:GameDetailViewModel.NotFoundText}"
Visibility="{Binding ViewModel.NotFound, Converter={StaticResource BoolToVis}}" />
@@ -32,14 +32,14 @@
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<ui:TextBlock FontTypography="Title" Text="{Binding ViewModel.Name}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.Subtitle}" />
<ui:TextBlock Appearance="Tertiary" TextTrimming="CharacterEllipsis" Text="{Binding ViewModel.ExecutableText}" ToolTip="{Binding ViewModel.ExecutableText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.Subtitle}" />
<ui:TextBlock Style="{StaticResource TertiaryText}" TextTrimming="CharacterEllipsis" Text="{Binding ViewModel.ExecutableText}" ToolTip="{Binding ViewModel.ExecutableText}" />
<ui:InfoBar Margin="0,6,0,0" IsClosable="False" Severity="Warning"
IsOpen="{Binding ViewModel.ExecutableMissing, Mode=OneWay}"
Message="{Binding ViewModel.ExecutableMissingMessage}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.LastSessionText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.LastSessionText}" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<ui:TextBlock Appearance="Secondary" VerticalAlignment="Center" Margin="0,0,12,0" Text="{x:Static vm:GameDetailViewModel.LifetimeLabel}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" VerticalAlignment="Center" Margin="0,0,12,0" Text="{x:Static vm:GameDetailViewModel.LifetimeLabel}" />
<controls:FpsReadout Model="{Binding ViewModel.Lifetime}" />
</StackPanel>
<ItemsControl Margin="0,10,0,0" ItemsSource="{Binding ViewModel.Chips}">
@@ -72,7 +72,7 @@
<ui:Card Grid.Column="0" VerticalAlignment="Stretch">
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static vm:GameDetailViewModel.SupportsHeader}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Tertiary" TextWrapping="Wrap"
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap"
Text="{x:Static vm:GameDetailViewModel.SupportsEmptyText}"
Visibility="{Binding ViewModel.SupportsEmpty, Converter={StaticResource BoolToVis}}" />
<ItemsControl Margin="0,6,0,0" ItemsSource="{Binding ViewModel.Supports}">
@@ -94,7 +94,7 @@
<ui:Card Grid.Column="2" VerticalAlignment="Stretch">
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static vm:GameDetailViewModel.MeasuredHeader}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.MeasuredEmptyText}" />
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.MeasuredEmptyText}" />
<ItemsControl Margin="0,6,0,0" ItemsSource="{Binding ViewModel.Measured}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
@@ -124,7 +124,7 @@
<ColumnDefinition Width="180" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:TextBlock Grid.Column="0" Appearance="Secondary" TextWrapping="Wrap" Text="{Binding Label}" />
<ui:TextBlock Grid.Column="0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding Label}" />
<ui:TextBlock Grid.Column="1" TextWrapping="Wrap" Text="{Binding Value}" />
</Grid>
</DataTemplate>
@@ -135,13 +135,13 @@
<!-- recording switch (schema 0009, 2026-09-23): off, FrameLedger does not watch for this program at all -->
<ui:CardControl Margin="0,12,0,0" Header="{x:Static vm:GameDetailViewModel.RecordingHeader}" Icon="{ui:SymbolIcon Record24}">
<StackPanel Orientation="Horizontal">
<ui:TextBlock Appearance="Secondary" VerticalAlignment="Center" Margin="0,0,12,0" Text="{Binding ViewModel.RecordingStatusText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" VerticalAlignment="Center" Margin="0,0,12,0" Text="{Binding ViewModel.RecordingStatusText}" />
<ui:ToggleSwitch AutomationProperties.Name="{x:Static vm:GameDetailViewModel.RecordingHeader}"
IsChecked="{Binding ViewModel.RecordSessions, Mode=OneWay}"
Command="{Binding ViewModel.ToggleRecordingCommand}" />
</StackPanel>
</ui:CardControl>
<ui:TextBlock Margin="0,6,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.RecordingBody}" />
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.RecordingBody}" />
<!-- anti-cheat found, shown IN PLACE of the hooking card while such cards are hidden (beta.8, ui.hide_anticheat_hooking) -->
<ui:CardControl Margin="0,12,0,0" Icon="{ui:SymbolIcon ShieldError24}"
@@ -149,7 +149,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static vm:GameDetailViewModel.AntiCheatHeader}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.AntiCheatText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.AntiCheatText}" />
</StackPanel>
</ui:CardControl.Header>
</ui:CardControl>
@@ -160,12 +160,12 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static vm:GameDetailViewModel.ExceptionHeader}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionText}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionInForceText}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionInForceText}"
Visibility="{Binding ViewModel.ExceptionInForceText, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionSuspendedText}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionSuspendedText}"
Visibility="{Binding ViewModel.ExceptionSuspendedText, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionLapseText}"
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionLapseText}"
Visibility="{Binding ViewModel.ExceptionLapseText, Converter={StaticResource NullToCollapsed}}" />
</StackPanel>
</ui:CardControl.Header>
@@ -187,21 +187,21 @@
<StackPanel Visibility="{Binding ViewModel.HookingSectionVisible, Converter={StaticResource BoolToVis}}">
<ui:CardControl Margin="0,12,0,0" Header="{x:Static vm:GameDetailViewModel.HookingHeader}" Icon="{ui:SymbolIcon ShieldTask24}">
<StackPanel Orientation="Horizontal">
<ui:TextBlock Appearance="Secondary" VerticalAlignment="Center" Margin="0,0,12,0" Text="{Binding ViewModel.HookStatusText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" VerticalAlignment="Center" Margin="0,0,12,0" Text="{Binding ViewModel.HookStatusText}" />
<ui:ToggleSwitch AutomationProperties.Name="{x:Static vm:GameDetailViewModel.HookingHeader}"
IsChecked="{Binding ViewModel.HookEnabled, Mode=OneWay}"
IsEnabled="{Binding ViewModel.HookToggleEnabled}"
Command="{Binding ViewModel.ToggleHookingCommand}" />
</StackPanel>
</ui:CardControl>
<ui:TextBlock Margin="0,6,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.HookingBody}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.BlockedText}"
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.HookingBody}" />
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.BlockedText}"
Visibility="{Binding ViewModel.BlockedText, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.NotX64Text}"
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.NotX64Text}"
Visibility="{Binding ViewModel.NotX64Text, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.UnverifiedText}"
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.UnverifiedText}"
Visibility="{Binding ViewModel.UnverifiedText, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Secondary" Text="{x:Static vm:GameDetailViewModel.BusyText}"
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource SecondaryText}" Text="{x:Static vm:GameDetailViewModel.BusyText}"
Visibility="{Binding ViewModel.Busy, Converter={StaticResource BoolToVis}}" />
</StackPanel>
<ui:InfoBar Margin="0,8,0,0" IsClosable="False" Severity="Warning"
@@ -219,13 +219,13 @@
<TabControl Margin="0,20,0,0">
<TabItem Header="{x:Static vm:GameDetailViewModel.TabSessions}">
<StackPanel Margin="0,12,0,0">
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
Text="{x:Static vm:GameDetailViewModel.SessionsEmptyText}"
Visibility="{Binding ViewModel.SessionsEmpty, Converter={StaticResource BoolToVis}}" />
<!-- beta.11 (D39): every hooked session's rate and lows at a glance; a click selects the session below. -->
<StackPanel Visibility="{Binding ViewModel.OverviewVisible, Converter={StaticResource BoolToVis}}">
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static vm:GameDetailViewModel.OverviewHeader}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.OverviewNote}" />
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.OverviewNote}" />
<charts:TrendChart x:Name="Overview" Height="220" MinHeight="200" Margin="0,4,0,8" />
</StackPanel>
<!-- beta.11 (D40): the game, its settings and its consent stay; the confirmation says how many go. -->
@@ -337,14 +337,14 @@
</TabItem>
<TabItem Header="{x:Static vm:GameDetailViewModel.TabFrametime}">
<StackPanel Margin="0,12,0,0">
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.SelectedNote}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.SelectedNote}"
Visibility="{Binding ViewModel.SelectedNote, Converter={StaticResource NullToCollapsed}}" />
<charts:FrametimeChart x:Name="Frametime" Height="320" Visibility="{Binding ViewModel.SelectedHasSeries, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</TabItem>
<TabItem Header="{x:Static vm:GameDetailViewModel.TabDistribution}">
<StackPanel Margin="0,12,0,0">
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.SelectedNote}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.SelectedNote}"
Visibility="{Binding ViewModel.SelectedNote, Converter={StaticResource NullToCollapsed}}" />
<charts:DistributionChart x:Name="Distribution" Height="280" Visibility="{Binding ViewModel.SelectedHasSeries, Converter={StaticResource BoolToVis}}" />
</StackPanel>
@@ -352,14 +352,14 @@
<TabItem Header="{x:Static vm:GameDetailViewModel.TabTrend}">
<StackPanel Margin="0,12,0,0">
<StackPanel Orientation="Horizontal">
<ui:TextBlock Appearance="Secondary" VerticalAlignment="Center" Margin="0,0,8,0" Text="{x:Static vm:GameDetailViewModel.TrendMetricLabel}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" VerticalAlignment="Center" Margin="0,0,8,0" Text="{x:Static vm:GameDetailViewModel.TrendMetricLabel}" />
<ComboBox MinWidth="180" AutomationProperties.Name="{x:Static vm:GameDetailViewModel.TrendMetricLabel}" DisplayMemberPath="Label" ItemsSource="{Binding ViewModel.TrendMetrics}"
SelectedValue="{Binding ViewModel.TrendMetric, Mode=TwoWay}" SelectedValuePath="Value" />
<CheckBox Margin="16,0,0,0" VerticalAlignment="Center" Content="{x:Static vm:GameDetailViewModel.IncludeMidSessionText}"
IsChecked="{Binding ViewModel.IncludeMidSession}" />
</StackPanel>
<!-- beta.11 (D39): more metrics on the same chart; a second unit is drawn against the right axis, a third cannot be ticked. -->
<ui:TextBlock Margin="0,10,0,0" Appearance="Secondary" Text="{x:Static vm:GameDetailViewModel.TrendExtrasLabel}" />
<ui:TextBlock Margin="0,10,0,0" Style="{StaticResource SecondaryText}" Text="{x:Static vm:GameDetailViewModel.TrendExtrasLabel}" />
<ItemsControl ItemsSource="{Binding ViewModel.TrendExtras}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
@@ -372,12 +372,12 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ui:TextBlock Margin="0,4,0,0" Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.TrendExtrasNote}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Tertiary" Text="{Binding ViewModel.TrendExcludedText}"
<ui:TextBlock Margin="0,4,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.TrendExtrasNote}" />
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource TertiaryText}" Text="{Binding ViewModel.TrendExcludedText}"
Visibility="{Binding ViewModel.TrendExcludedText, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.TrendAverageNote}" />
<ui:TextBlock Margin="0,6,0,0" Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.TrendPartialNote}" />
<ui:TextBlock Margin="0,12,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.TrendEmptyMessage}"
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.TrendAverageNote}" />
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.TrendPartialNote}" />
<ui:TextBlock Margin="0,12,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.TrendEmptyMessage}"
Visibility="{Binding ViewModel.TrendEmpty, Converter={StaticResource BoolToVis}}" />
<charts:TrendChart x:Name="Trend" Height="320" Visibility="{Binding ViewModel.TrendEmpty, Converter={StaticResource InverseBoolToVis}}" />
</StackPanel>
@@ -385,16 +385,16 @@
<TabItem Header="{x:Static vm:GameDetailViewModel.TabSensors}">
<StackPanel Margin="0,12,0,0">
<!-- A session that was not hooked has its sensors (beta.8): the tab's own note and visibility, not the frames'. -->
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.SensorsNote}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.SensorsNote}"
Visibility="{Binding ViewModel.SensorsNote, Converter={StaticResource NullToCollapsed}}" />
<charts:SensorsChart x:Name="Sensors" Visibility="{Binding ViewModel.SelectedHasSensors, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</TabItem>
<TabItem Header="{x:Static vm:GameDetailViewModel.TabLatency}" Visibility="{Binding ViewModel.AnyLatency, Converter={StaticResource BoolToVis}}">
<StackPanel Margin="0,12,0,0">
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.SelectedNote}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.SelectedNote}"
Visibility="{Binding ViewModel.SelectedNote, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.LatencyEmptyText}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.LatencyEmptyText}"
Visibility="{Binding ViewModel.HasLatency, Converter={StaticResource InverseBoolToVis}}" />
<ui:TextBlock FontTypography="BodyStrong" Text="{Binding ViewModel.LatencyText}"
Visibility="{Binding ViewModel.HasLatency, Converter={StaticResource BoolToVis}}" />
+5 -5
View File
@@ -61,10 +61,10 @@
Icon="{ui:SymbolIcon Add24}" />
</Grid>
<ui:TextBlock Margin="0,16,0,0" Appearance="Secondary" TextWrapping="Wrap"
<ui:TextBlock Margin="0,16,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
Text="{x:Static vm:GamesViewModel.EmptyText}"
Visibility="{Binding ViewModel.IsEmpty, Converter={StaticResource BoolToVis}}" />
<ui:TextBlock Margin="0,16,0,0" Appearance="Secondary" TextWrapping="Wrap"
<ui:TextBlock Margin="0,16,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
Text="{x:Static vm:GamesViewModel.NoMatchText}"
Visibility="{Binding ViewModel.NoMatch, Converter={StaticResource BoolToVis}}" />
@@ -103,9 +103,9 @@
<TextBlock Style="{StaticResource TagPillText}" Text="{x:Static res:Strings.Games_Card_NotInstalled}" />
</Border>
</WrapPanel>
<ui:TextBlock Margin="0,2,0,0" Appearance="Secondary" Text="{Binding SessionsText}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding PlaytimeText}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding LastPlayedText}" />
<ui:TextBlock Margin="0,2,0,0" Style="{StaticResource SecondaryText}" Text="{Binding SessionsText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding PlaytimeText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding LastPlayedText}" />
</StackPanel>
</ui:CardAction>
</DataTemplate>
+1 -1
View File
@@ -72,7 +72,7 @@
<ui:TextBlock Grid.Row="3"
Margin="0,6,0,0"
Appearance="Secondary"
Style="{StaticResource SecondaryText}"
Text="{Binding ViewModel.Status}" />
</Grid>
</Page>
+27 -27
View File
@@ -24,12 +24,12 @@
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_KillSwitch_Label}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.KillSwitchState}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.KillSwitchState}" />
</StackPanel>
<ui:ToggleSwitch Grid.Column="1" Margin="12,0" AutomationProperties.Name="{x:Static res:Strings.Settings_KillSwitch_Label}" IsChecked="{Binding ViewModel.KillSwitch, Mode=TwoWay}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
</Grid>
</ui:CardExpander.Header>
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_KillSwitch_Body}" TextWrapping="Wrap" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_KillSwitch_Body}" TextWrapping="Wrap" />
</ui:CardExpander>
<!-- beta.11 (owner request 2026-10-03: no row without a control): shown only while a game has hooking on, each with its Turn off. -->
@@ -61,7 +61,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_HideAntiCheatHooking_Label}" />
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Appearance="Secondary" TextWrapping="Wrap"
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
Text="{x:Static res:Strings.Settings_HideAntiCheatHooking_Body}" />
</StackPanel>
</ui:CardControl.Header>
@@ -79,7 +79,7 @@
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Exceptions_Label}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Appearance="Secondary" TextWrapping="Wrap"
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
Text="{x:Static res:Strings.Settings_Exceptions_Body}" />
</StackPanel>
<ui:ToggleSwitch Grid.Column="1" Margin="12,0" AutomationProperties.Name="{x:Static res:Strings.Settings_Exceptions_Label}"
@@ -88,11 +88,11 @@
</ui:CardExpander.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Exceptions_Header}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static res:Strings.Settings_Exceptions_Suspended}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static res:Strings.Settings_Exceptions_Suspended}"
Visibility="{Binding ViewModel.ExceptionsSuspended, Converter={StaticResource BoolToVis}}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static res:Strings.Settings_Exceptions_Checking}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static res:Strings.Settings_Exceptions_Checking}"
Visibility="{Binding ViewModel.ExceptionsChecking, Converter={StaticResource BoolToVis}}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_Exceptions_Empty}"
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_Exceptions_Empty}"
Visibility="{Binding ViewModel.ExceptionGames.Count, Converter={StaticResource ZeroToVisible}}" />
<ItemsControl ItemsSource="{Binding ViewModel.ExceptionGames}" IsEnabled="{Binding ViewModel.ActsOnThisPc}">
<ItemsControl.ItemTemplate>
@@ -104,9 +104,9 @@
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<ui:TextBlock FontTypography="BodyStrong" Text="{Binding Name}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding FindingText}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding StateText}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding LapseText}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding FindingText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding StateText}" />
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding LapseText}"
Visibility="{Binding LapseText, Converter={StaticResource NullToCollapsed}}" />
</StackPanel>
<StackPanel Grid.Column="1" Margin="12,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
@@ -142,7 +142,7 @@
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_VkLayer_Label}" />
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Appearance="Secondary" Text="{Binding ViewModel.VulkanLayerText}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.VulkanLayerText}" TextWrapping="Wrap" />
</StackPanel>
<StackPanel Grid.Column="1" Margin="12,0" Orientation="Horizontal">
<ui:Button Margin="0,0,8,0"
@@ -157,7 +157,7 @@
</StackPanel>
</Grid>
</ui:CardExpander.Header>
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_VkLayer_Note}" TextWrapping="Wrap" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_VkLayer_Note}" TextWrapping="Wrap" />
</ui:CardExpander>
<ui:HyperlinkButton Margin="0,6,0,0"
Command="{Binding ViewModel.OpenSafetyDocsCommand}"
@@ -170,7 +170,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_MinSession_Label}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_MinSession_Body}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_MinSession_Body}" />
</StackPanel>
</ui:CardControl.Header>
<ui:NumberBox MinWidth="140"
@@ -184,7 +184,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Interval_Label}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_Interval_Body}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_Interval_Body}" />
</StackPanel>
</ui:CardControl.Header>
<ui:NumberBox MinWidth="140"
@@ -198,7 +198,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Retention_Label}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_Retention_Body}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_Retention_Body}" />
</StackPanel>
</ui:CardControl.Header>
<ui:NumberBox MinWidth="140"
@@ -218,7 +218,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_DeleteSessions_Label}" />
<ui:TextBlock MaxWidth="560" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Settings_DeleteSessions_Body}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="560" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_DeleteSessions_Body}" TextWrapping="Wrap" />
</StackPanel>
</ui:CardControl.Header>
<ui:Button Appearance="Secondary" Command="{Binding ViewModel.DeleteAllSessionsCommand}" Content="{x:Static res:Strings.Settings_DeleteSessions_Button}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
@@ -231,7 +231,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Agent_RunElevated_Label}" />
<ui:TextBlock MaxWidth="560" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Settings_Agent_RunElevated_Body}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="560" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_Agent_RunElevated_Body}" TextWrapping="Wrap" />
<ui:TextBlock Margin="0,4,0,0" FontTypography="BodyStrong" Text="{Binding ViewModel.ElevationText}" TextWrapping="Wrap"
ToolTip="{x:Static res:Strings.Settings_Agent_Elevation_Body}" />
</StackPanel>
@@ -242,7 +242,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_Agent_Task_Label}" />
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Appearance="Secondary" Text="{Binding ViewModel.TaskText}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.TaskText}" TextWrapping="Wrap" />
</StackPanel>
</ui:CardControl.Header>
<StackPanel Orientation="Horizontal">
@@ -287,7 +287,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_StartWithWindows_Label}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_StartWithWindows_Body}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_StartWithWindows_Body}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_StartWithWindows_Label}" IsChecked="{Binding ViewModel.StartWithWindows, Mode=TwoWay}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
@@ -296,7 +296,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_MinimizeToTray_Label}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_MinimizeToTray_Body}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_MinimizeToTray_Body}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_MinimizeToTray_Label}" IsChecked="{Binding ViewModel.MinimizeToTray, Mode=TwoWay}" />
@@ -306,7 +306,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_FpsDecimals_Label}" />
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Appearance="Secondary" TextWrapping="Wrap"
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
Text="{x:Static res:Strings.Settings_FpsDecimals_Body}" />
</StackPanel>
</ui:CardControl.Header>
@@ -317,7 +317,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_HideScrollBars_Label}" />
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Appearance="Secondary" TextWrapping="Wrap"
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
Text="{x:Static res:Strings.Settings_HideScrollBars_Body}" />
</StackPanel>
</ui:CardControl.Header>
@@ -335,7 +335,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_UpdateChannel_Label}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_UpdateChannel_Body}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_UpdateChannel_Body}" />
</StackPanel>
</ui:CardControl.Header>
<ComboBox MinWidth="140"
@@ -350,7 +350,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_AutoCheck_Label}" />
<ui:TextBlock MaxWidth="560" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Settings_AutoCheck_Body}" TextWrapping="Wrap" />
<ui:TextBlock MaxWidth="560" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_AutoCheck_Body}" TextWrapping="Wrap" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_AutoCheck_Label}" IsChecked="{Binding ViewModel.AutoCheckUpdates, Mode=TwoWay}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
@@ -361,7 +361,7 @@
<ui:CardControl.Header>
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_LogDebug_Label}" />
<ui:TextBlock Appearance="Secondary" Text="{x:Static res:Strings.Settings_LogDebug_Body}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Settings_LogDebug_Body}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_LogDebug_Label}" IsChecked="{Binding ViewModel.LogDebug, Mode=TwoWay}" />
@@ -378,13 +378,13 @@
<ColumnDefinition Width="160" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:TextBlock Grid.Column="0" Appearance="Secondary" Text="{Binding Label}" />
<ui:TextBlock Grid.Column="0" Style="{StaticResource SecondaryText}" Text="{Binding Label}" />
<ui:TextBlock Grid.Column="1" TextWrapping="Wrap" Text="{Binding Value}" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ui:TextBlock Margin="0,8,0,0" Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:SystemInfoViewModel.Note}" />
<ui:TextBlock Margin="0,8,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{x:Static vm:SystemInfoViewModel.Note}" />
<ui:Button Margin="0,8,0,0" Command="{Binding SystemInfo.CopyCommand}" Content="{x:Static vm:SystemInfoViewModel.CopyText}" Icon="{ui:SymbolIcon Copy24}" />
</StackPanel>
</ui:Card>
@@ -10,13 +10,22 @@ namespace FrameLedger.App.Services;
/// <summary>
/// <c>ui.hide_scrollbars</c> (beta.14, owner request 2026-10-05): the App draws no scroll bars, and every scroller still
/// scrolls — with the wheel, the keyboard and touch. A bar's visibility is bound in its scroller's template, so no style can
/// reach it; this sets the scroller's own <see cref="ScrollBarVisibility"/> instead. One class handler on
/// <see cref="ScrollViewer"/>'s <c>Loaded</c>, registered at start beside <see cref="DialogKeyboard"/>, sees every scroller the
/// App shows, those inside a control's template too (a DataGrid's, a TextBox's, a rendered document's, a dialog's). While
/// on, an axis whose bar is <see cref="ScrollBarVisibility.Auto"/> or <see cref="ScrollBarVisibility.Visible"/> becomes
/// reach it; this sets the scroller's own <see cref="ScrollBarVisibility"/> instead, from two class handlers on
/// <see cref="ScrollViewer"/> registered at start beside <see cref="DialogKeyboard"/>, which reach every scroller the App shows,
/// those inside a control's template too (a DataGrid's, a TextBox's, a rendered document's, a dialog's):
/// <list type="bullet">
/// <item><c>ScrollChanged</c>, which every scroller raises from its first layout, when its extent and viewport stop being
/// zero, and again whenever they change — inside the layout pass, so the bar is gone before the first frame is drawn.</item>
/// <item><c>Loaded</c>, which beta.14 relied on alone, wrongly (beta.17, the owner's screenshot: the Dashboard kept its bar).
/// WPF raises Loaded only on an element whose subtree listens for it with a handler of its own — an instance handler, a
/// style's EventSetter, a template's trigger — and a class handler is none of those; WPF UI's toggle switches carry one,
/// so Settings was hidden and the Dashboard, all cards and text, never was. It stays for a scroller that comes back with
/// nothing to lay out again.</item>
/// </list>
/// While on, an axis whose bar is <see cref="ScrollBarVisibility.Auto"/> or <see cref="ScrollBarVisibility.Visible"/> becomes
/// <see cref="ScrollBarVisibility.Hidden"/> — WPF's "no bar, still scrolls" — and its own value is remembered on it;
/// <see cref="ScrollBarVisibility.Disabled"/> is never touched, because a disabled axis lays its content out at the viewport's
/// size and wraps text. Off puts every remembered value back, on screen at once and on the next load for the rest.
/// size and wraps text. Off puts every remembered value back, on screen at once and at the next layout for the rest.
/// </summary>
public static class ScrollBarHiding
{
@@ -32,11 +41,12 @@ public static class ScrollBarHiding
/// <summary>Whether the bars are hidden right now.</summary>
public static bool Hidden => _hidden;
/// <summary>Registers the class handler, once per process.</summary>
/// <summary>Registers the class handlers, once per process.</summary>
public static void Register()
{
if (Interlocked.Exchange(ref _registered, 1) == 0)
{
EventManager.RegisterClassHandler(typeof(ScrollViewer), ScrollViewer.ScrollChangedEvent, new ScrollChangedEventHandler(OnScrollChanged), handledEventsToo: true);
EventManager.RegisterClassHandler(typeof(ScrollViewer), FrameworkElement.LoadedEvent, new RoutedEventHandler(OnLoaded), handledEventsToo: true);
}
}
@@ -96,6 +106,15 @@ public static class ScrollBarHiding
}
}
// ScrollChanged bubbles: a scroller's ancestors that are scrollers hear it too, and each gets the same idempotent check.
private static void OnScrollChanged(object sender, ScrollChangedEventArgs e)
{
if (sender is ScrollViewer viewer)
{
Set(viewer);
}
}
private static void Set(ScrollViewer viewer)
{
Axis(viewer, ScrollViewer.VerticalScrollBarVisibilityProperty, _ownVerticalProperty);
@@ -21,6 +21,22 @@
<Setter Property="Margin" Value="28,20,28,20" />
</Style>
<!--
Secondary and tertiary text (beta.17). These replace `ui:TextBlock Appearance="Secondary|Tertiary"`, which WPF UI
4.3.0 resolves ONCE: TextBlock.OnAppearanceChanged stores TryFindResource(…) in AppearanceForeground and
TextBlockMetadata coerces Foreground to it, so a text kept the theme it was made under. The owner's screenshots of
2026-10-07 showed Settings' descriptions light grey on white after Dark → Light, and dark grey on dark after the way
back. These follow a switch, like every other brush here (DynamicResource). ContrastTests.NoTextBlockTakesItsColourFromAppearance
refuses Appearance on a TextBlock; PagesLoadTests.EveryTextFollowsAThemeSwitch renders every surface through a switch.
-->
<Style x:Key="SecondaryText" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
</Style>
<Style x:Key="TertiaryText" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource TextFillColorTertiaryBrush}" />
</Style>
<Style x:Key="FieldLabel" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
<Setter Property="Margin" Value="0,0,16,6" />
+2 -2
View File
@@ -30,7 +30,7 @@
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Margin="0,12,0,0" MaxWidth="760" HorizontalAlignment="Left">
<ui:TextBlock FontTypography="Title" Text="{x:Static res:Strings.App_Title}" />
<ui:TextBlock x:Name="VersionText" Appearance="Secondary" />
<ui:TextBlock x:Name="VersionText" Style="{StaticResource SecondaryText}" />
<ui:TextBlock Margin="0,8,0,0" TextWrapping="Wrap" Text="{x:Static res:Strings.About_Tagline}" />
<ui:TextBlock Margin="0,20,0,6" FontTypography="Subtitle" Text="{x:Static res:Strings.About_Notices_Header}" />
<ui:TextBlock TextWrapping="Wrap" Text="{x:Static res:Strings.About_Notices_Copyright}" />
@@ -56,7 +56,7 @@
<ui:Button DockPanel.Dock="Right" Margin="12,0,0,0" Click="OnOpenLicencesFolder" Content="{x:Static res:Strings.About_OpenLicencesFolder}" Icon="{ui:SymbolIcon Folder24}" />
<ui:TextBlock VerticalAlignment="Center" TextWrapping="Wrap" Text="{x:Static res:Strings.About_ThirdParty_Body}" />
</DockPanel>
<ui:TextBlock x:Name="NoLicencesFolder" Grid.Row="1" Margin="0,0,0,8" Appearance="Secondary" TextWrapping="Wrap"
<ui:TextBlock x:Name="NoLicencesFolder" Grid.Row="1" Margin="0,0,0,8" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
Text="{x:Static res:Strings.About_NoLicencesFolder}" Visibility="Collapsed" />
<controls:DocumentBrowser x:Name="ThirdParty" Grid.Row="2" />
</Grid>
@@ -26,7 +26,7 @@
<ui:TitleBar Grid.Row="0" Title="{Binding ViewModel.Title}" ShowMaximize="True" ShowMinimize="True" />
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
<StackPanel Style="{StaticResource PageRoot}">
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.NotFoundText}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.NotFoundText}"
Visibility="{Binding ViewModel.NotFound, Converter={StaticResource BoolToVis}}" />
<ui:InfoBar IsClosable="False" Severity="Error" Margin="0,0,0,12"
@@ -39,19 +39,19 @@
Message="{x:Static vm:SessionSummaryViewModel.UnhookedBody}" />
<!-- header line + chips -->
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.Line}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExitLine}" />
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionLine}"
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.Line}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.ExitLine}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionLine}"
Visibility="{Binding ViewModel.ExceptionLine, Converter={StaticResource NullToCollapsed}}" />
<!-- beta.10: how the game was shown, in either tier (03_METRICS §Display mode) -->
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.DisplayLine}"
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.DisplayLine}"
Visibility="{Binding ViewModel.DisplayLine, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.HardwareLine}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.LibrariesLine}"
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.HardwareLine}" />
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.LibrariesLine}"
Visibility="{Binding ViewModel.LibrariesLine, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.DriverProfileLine}"
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.DriverProfileLine}"
Visibility="{Binding ViewModel.DriverProfileLine, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.DriverStateLine}"
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.DriverStateLine}"
Visibility="{Binding ViewModel.DriverStateLine, Converter={StaticResource NullToCollapsed}}" />
<ItemsControl Margin="0,8,0,0" ItemsSource="{Binding ViewModel.Chips}">
<ItemsControl.ItemsPanel>
@@ -82,16 +82,16 @@
<DataTemplate DataType="{x:Type vm:StatCardModel}">
<ui:Card Margin="0,0,8,8">
<StackPanel>
<ui:TextBlock Appearance="Secondary" Text="{Binding Label}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding Label}" />
<ui:TextBlock FontTypography="Subtitle" Text="{Binding Value}" />
<ui:TextBlock Appearance="Tertiary" Text="{Binding Suffix}" Visibility="{Binding Suffix, Converter={StaticResource NullToCollapsed}}" />
<ui:TextBlock Style="{StaticResource TertiaryText}" Text="{Binding Suffix}" Visibility="{Binding Suffix, Converter={StaticResource NullToCollapsed}}" />
</StackPanel>
</ui:Card>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ui:TextBlock Margin="0,8,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.Tier2Text}"
<ui:TextBlock Margin="0,8,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.Tier2Text}"
Visibility="{Binding ViewModel.IsHooked, Converter={StaticResource InverseBoolToVis}}" />
<ui:TextBlock Margin="0,4,0,0" TextWrapping="Wrap" Text="{Binding ViewModel.Tier2Reason}"
Visibility="{Binding ViewModel.IsHooked, Converter={StaticResource InverseBoolToVis}}" />
@@ -111,7 +111,7 @@
<CheckBox Grid.Column="2" Content="{x:Static vm:SessionSummaryViewModel.ShowSensorsText}"
IsChecked="{Binding ViewModel.ShowSensors}" IsEnabled="{Binding ViewModel.HasSensors}" />
</Grid>
<ui:TextBlock Appearance="Tertiary" Text="{Binding ViewModel.DecimationNote}" />
<ui:TextBlock Style="{StaticResource TertiaryText}" Text="{Binding ViewModel.DecimationNote}" />
<charts:FrametimeChart x:Name="Frametime" Margin="0,6,0,0" Height="300" />
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.DistributionHeader}" />
<charts:DistributionChart x:Name="Distribution" Margin="0,6,0,0" Height="260" />
@@ -131,7 +131,7 @@
window's wheel. -->
<StackPanel Visibility="{Binding ViewModel.HasSensorStats, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsHeader}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsNote}" />
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsNote}" />
<StackPanel Margin="0,6,0,0" Grid.IsSharedSizeScope="True">
<Grid>
<Grid.ColumnDefinitions>
@@ -166,14 +166,14 @@
<ui:TextBlock Grid.Column="2" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Median}" />
<ui:TextBlock Grid.Column="3" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Min}" />
<ui:TextBlock Grid.Column="4" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Max}" />
<ui:TextBlock Grid.Column="5" Margin="0,2,0,2" Appearance="Secondary" TextAlignment="Right" Text="{Binding Readings}" />
<ui:TextBlock Grid.Column="5" Margin="0,2,0,2" Style="{StaticResource SecondaryText}" TextAlignment="Right" Text="{Binding Readings}" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</StackPanel>
<ui:TextBlock Margin="0,8,0,0" Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.SensorStatsMissing}"
<ui:TextBlock Margin="0,8,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.SensorStatsMissing}"
Visibility="{Binding ViewModel.SensorStatsMissing, Converter={StaticResource NullToCollapsed}}" />
<!-- annotations -->
@@ -11,6 +11,7 @@ using FrameLedger.Domain.Consent;
using FrameLedger.Domain.Sessions;
using FrameLedger.Infrastructure.Persistence;
using FrameLedger.Infrastructure.Settings;
using FrameLedger.Testing;
namespace FrameLedger.Agent.Tests;
@@ -45,11 +46,17 @@ public sealed class AgentEndToEndTests : IDisposable
private static string Agent => Path.Combine(AppContext.BaseDirectory, "FrameLedger.Agent.exe");
/// <summary>The ONE executable this suite may write a consent record for.</summary>
private static string ConsentedExecutable => Harness;
private readonly string _dataDir = Path.Combine(Path.GetTempPath(), "fl-agent-e2e-" + Guid.NewGuid().ToString("N"));
/// <summary>
/// The ONE executable this suite may write a consent record for: our harness, copied under a run-unique name
/// (beta.16). The Agent resolves its target BY NAME (<c>TargetResolver</c>), and <c>build.ps1</c> runs the test projects as
/// parallel processes: a <c>hook-harness.exe</c> another project was still starting - its module list a partial copy -
/// is an unreadable process of the same name, which the resolver must count, and it refused <c>TargetAmbiguous</c>
/// (#269's first CI run). No other test starts a process of this name.
/// </summary>
private string ConsentedExecutable => Path.Combine(_dataDir, "hook-harness-" + Path.GetFileName(_dataDir) + ".exe");
private string Ledger => Path.Combine(_dataDir, LedgerPaths.DatabaseFileName);
public void Dispose()
@@ -66,13 +73,35 @@ public sealed class AgentEndToEndTests : IDisposable
[Fact]
public void TheTargetAndTheConsentRecordAreBothOurOwnHarness()
{
Path.GetFileName(ConsentedExecutable).Should().Be("hook-harness.exe");
Path.GetDirectoryName(ConsentedExecutable).Should().Be(AppContext.BaseDirectory.TrimEnd(Path.DirectorySeparatorChar));
StageTarget();
Path.GetFileName(Harness).Should().Be("hook-harness.exe");
Path.GetDirectoryName(Harness).Should().Be(AppContext.BaseDirectory.TrimEnd(Path.DirectorySeparatorChar));
Path.GetFileName(ConsentedExecutable).Should().StartWith("hook-harness-");
Path.GetDirectoryName(ConsentedExecutable).Should().Be(_dataDir, "the copy lives in this run's scratch directory and nowhere else");
File.ReadAllBytes(ConsentedExecutable).Should().Equal(File.ReadAllBytes(Harness), "the target IS hook-harness, byte for byte, under another name");
Path.GetFileName(Agent).Should().Be("FrameLedger.Agent.exe");
}
/// <summary>This run's copy of hook-harness, once per test; its overlay logs are this assembly's to remove (<c>17_HOOK_ENGINE</c> §Native logging).</summary>
private void StageTarget()
{
if (File.Exists(ConsentedExecutable))
{
return;
}
File.Exists(Harness).Should().BeTrue(
"hook-harness.exe must be staged beside the test binary (FrameLedger.DrainFixtures.targets). "
+ "This FAILS rather than skipping: an integration test that quietly does nothing when its fixture "
+ "is absent is a gate that cannot fail.");
Directory.CreateDirectory(_dataDir);
HarnessOverlayLogSweep.Own(_dataDir);
File.Copy(Harness, ConsentedExecutable);
}
private async Task<ConsentWriteOutcome> GrantConsentAsync()
{
StageTarget();
ExecutableFingerprint fingerprint = FrameLedger.Infrastructure.Io.ExecutableIdentity.Read(ConsentedExecutable)!.Value;
Directory.CreateDirectory(_dataDir);
LedgerDatabase db = await LedgerDatabase.OpenAsync(Ledger, ct: TestContext.Current.CancellationToken).ConfigureAwait(false);
@@ -98,11 +127,11 @@ public sealed class AgentEndToEndTests : IDisposable
}
}
private static Process StartHarness(string arguments)
private Process StartHarness(string arguments)
{
File.Exists(Harness).Should().BeTrue("hook-harness.exe must be staged beside the test binary (FrameLedger.DrainFixtures.targets); this FAILS rather than skipping");
StageTarget();
File.Exists(Agent).Should().BeTrue("the Agent must be built and copied beside this test");
var p = Process.Start(new ProcessStartInfo(Harness, arguments) { UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true })!;
var p = Process.Start(new ProcessStartInfo(ConsentedExecutable, arguments) { UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true })!;
Thread.Sleep(800);
p.HasExited.Should().BeFalse("the harness must be running before the Agent looks for it");
return p;
@@ -215,9 +244,38 @@ public sealed class AgentEndToEndTests : IDisposable
}
}
/// <summary>
/// beta.16: the collision #269's first CI run hit. Another hook-harness.exe running beside this suite's run - another
/// test project's, or one left over - shares neither the copy's name nor its path, so the Agent's resolver never counts
/// it. Until beta.16 this suite consented to the staged hook-harness.exe itself, and a second one was a second match:
/// TargetAmbiguous, exit 6.
/// </summary>
[Fact]
public async Task AnotherHookHarnessRunningBesideTheSuiteDoesNotMakeTheTargetAmbiguous()
{
(await GrantConsentAsync()).Should().Be(ConsentWriteOutcome.Written);
Process stranger = Process.Start(new ProcessStartInfo(Harness, "--real --hold-presenting 30") { UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true })!;
Process harness = StartHarness("--real --hold-presenting 30");
try
{
using Process agent = StartAgent("capture", "--exe", ConsentedExecutable, "--seconds", "3");
(string output, int exit) = await FinishAsync(agent);
exit.Should().Be(0, output);
output.Should().Contain("SAVED as sessions.id=", output);
output.Should().NotContain("TargetAmbiguous", output);
}
finally
{
Kill(harness);
Kill(stranger);
}
}
[Fact]
public async Task ConsentGrantRefusesRedirectedStdinAndWritesNothing()
{
StageTarget();
using Process agent = StartAgent("consent", "grant", "--exe", ConsentedExecutable);
(string output, int exit) = await FinishAsync(agent);
@@ -10,6 +10,7 @@ using FrameLedger.Domain.Consent;
using FrameLedger.Domain.Sessions;
using FrameLedger.Infrastructure.Persistence;
using FrameLedger.Infrastructure.Recording;
using FrameLedger.Testing;
namespace FrameLedger.Agent.Tests;
@@ -48,11 +49,17 @@ public sealed class PartialRecoveryEndToEndTests : IDisposable
private static string Agent => Path.Combine(AppContext.BaseDirectory, "FrameLedger.Agent.exe");
/// <summary>The ONE executable this suite may write a consent record for.</summary>
private static string ConsentedExecutable => Harness;
private readonly string _dataDir = Path.Combine(Path.GetTempPath(), "fl-agent-recover-" + Guid.NewGuid().ToString("N"));
/// <summary>
/// The ONE executable this suite may write a consent record for: our harness, copied under a run-unique name
/// (beta.16). The Agent resolves its target BY NAME (<c>TargetResolver</c>), and <c>build.ps1</c> runs the test projects as
/// parallel processes: a <c>hook-harness.exe</c> another project was still starting - its module list a partial copy -
/// is an unreadable process of the same name, which the resolver must count, and it refused <c>TargetAmbiguous</c>
/// (#269's first CI run). No other test starts a process of this name.
/// </summary>
private string ConsentedExecutable => Path.Combine(_dataDir, "hook-harness-" + Path.GetFileName(_dataDir) + ".exe");
private string Ledger => Path.Combine(_dataDir, LedgerPaths.DatabaseFileName);
private string PartialDirectory => Path.Combine(_dataDir, "tmp");
@@ -70,7 +77,10 @@ public sealed class PartialRecoveryEndToEndTests : IDisposable
private async Task GrantConsentAsync()
{
Path.GetFileName(ConsentedExecutable).Should().Be("hook-harness.exe", "this suite injects into nothing else");
StageTarget();
byte[] target = await File.ReadAllBytesAsync(ConsentedExecutable, TestContext.Current.CancellationToken).ConfigureAwait(false);
byte[] harness = await File.ReadAllBytesAsync(Harness, TestContext.Current.CancellationToken).ConfigureAwait(false);
target.Should().Equal(harness, "this suite injects into nothing but hook-harness, under a run-unique name");
ExecutableFingerprint fingerprint = FrameLedger.Infrastructure.Io.ExecutableIdentity.Read(ConsentedExecutable)!.Value;
Directory.CreateDirectory(_dataDir);
LedgerDatabase db = await LedgerDatabase.OpenAsync(Ledger, ct: TestContext.Current.CancellationToken).ConfigureAwait(false);
@@ -102,13 +112,27 @@ public sealed class PartialRecoveryEndToEndTests : IDisposable
return Process.Start(psi)!;
}
private static Process StartHarness(string arguments)
/// <summary>This run's copy of hook-harness, once per test; its overlay logs are this assembly's to remove (<c>17_HOOK_ENGINE</c> §Native logging).</summary>
private void StageTarget()
{
if (File.Exists(ConsentedExecutable))
{
return;
}
File.Exists(Harness).Should().BeTrue(
"hook-harness.exe must be staged beside the test binary (FrameLedger.DrainFixtures.targets). "
+ "This FAILS rather than skipping: an integration test that quietly does nothing when its fixture "
+ "is absent is a gate that cannot fail.");
var p = Process.Start(new ProcessStartInfo(Harness, arguments) { UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true })!;
Directory.CreateDirectory(_dataDir);
HarnessOverlayLogSweep.Own(_dataDir);
File.Copy(Harness, ConsentedExecutable);
}
private Process StartHarness(string arguments)
{
StageTarget();
var p = Process.Start(new ProcessStartInfo(ConsentedExecutable, arguments) { UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true })!;
Thread.Sleep(800);
p.HasExited.Should().BeFalse("the harness must be running before the Agent looks for it");
return p;
@@ -33,7 +33,7 @@ public sealed class AccessibilityTests
"Foreground", "Background", "BorderBrush", "Fill", "Stroke", "Color", "CaretBrush", "SelectionBrush",
};
private static string RepoRoot()
internal static string RepoRoot()
{
for (DirectoryInfo? dir = new(AppContext.BaseDirectory); dir is not null; dir = dir.Parent)
{
@@ -53,7 +53,7 @@ public sealed class AccessibilityTests
.Where(static f => !f.Contains(Path.DirectorySeparatorChar + "obj" + Path.DirectorySeparatorChar, StringComparison.Ordinal)
&& !f.Contains(Path.DirectorySeparatorChar + "bin" + Path.DirectorySeparatorChar, StringComparison.Ordinal)))
{
yield return (Path.GetRelativePath(app, file), XDocument.Load(file));
yield return (Path.GetRelativePath(app, file), XDocument.Load(file, LoadOptions.SetLineInfo));
}
}
@@ -74,6 +74,64 @@ public sealed class ContrastTests
offenders.Should().BeEmpty("a Secondary badge keeps the default badge's foreground over a fill it was not chosen for; use Styles/FrameLedger.xaml's TagPill + TagPillText");
}
/// <summary>
/// beta.17 (the owner's screenshots of 2026-10-07: Settings' descriptions light grey on white after Dark → Light, dark grey
/// on dark after the way back). WPF UI 4.3.0's <c>ui:TextBlock Appearance</c> looks its brush up ONCE —
/// <c>OnAppearanceChanged</c> stores <c>TryFindResource(…)</c> and <c>TextBlockMetadata</c> coerces Foreground to it — so a
/// text keeps the theme it was made under. The property inherits, so the attached form on a container pins every text
/// below it, and a style setter or the code form does the same. Colour comes from <c>Styles/FrameLedger.xaml</c>'s
/// <c>SecondaryText</c> / <c>TertiaryText</c>, whose <c>DynamicResource</c> follows a switch.
/// </summary>
[Fact]
public void NoTextBlockTakesItsColourFromAppearance()
{
List<string> offenders = [];
foreach ((string file, XDocument xaml) in AccessibilityTests.AppXaml())
{
foreach (XElement element in xaml.Descendants())
{
if (TakesItsColourFromAppearance(element))
{
offenders.Add($"{file}:{((System.Xml.IXmlLineInfo)element).LineNumber}: <{element.Name.LocalName}>");
}
}
}
string app = System.IO.Path.Combine(AccessibilityTests.RepoRoot(), "src", "FrameLedger.App");
foreach (string file in System.IO.Directory.EnumerateFiles(app, "*.cs", System.IO.SearchOption.AllDirectories)
.Where(static f => !f.Contains(System.IO.Path.DirectorySeparatorChar + "obj" + System.IO.Path.DirectorySeparatorChar, StringComparison.Ordinal)
&& !f.Contains(System.IO.Path.DirectorySeparatorChar + "bin" + System.IO.Path.DirectorySeparatorChar, StringComparison.Ordinal)))
{
string code = System.IO.File.ReadAllText(file);
if (code.Contains("TextColor.", StringComparison.Ordinal) || code.Contains("TextBlock.AppearanceProperty", StringComparison.Ordinal))
{
offenders.Add(System.IO.Path.GetRelativePath(app, file) + ": the code form");
}
}
string.Join(Environment.NewLine, offenders).Should().BeEmpty("WPF UI 4.3.0's TextBlock Appearance keeps the brush of the theme a text was made under (08_UI §Contrast); use Style=\"{StaticResource SecondaryText}\" or TertiaryText");
}
/// <summary>An <c>Appearance</c> on a TextBlock, the attached <c>ui:TextBlock.Appearance</c> on anything, or a style setter for either.</summary>
private static bool TakesItsColourFromAppearance(XElement element)
{
bool isTextBlock = string.Equals(element.Name.LocalName, "TextBlock", StringComparison.Ordinal);
if (element.Attributes().Any(a => (isTextBlock && string.Equals(a.Name.LocalName, "Appearance", StringComparison.Ordinal))
|| a.Name.LocalName.EndsWith("TextBlock.Appearance", StringComparison.Ordinal)))
{
return true;
}
if (!string.Equals(element.Name.LocalName, "Setter", StringComparison.Ordinal) || element.Attribute("Property")?.Value is not { } property)
{
return false;
}
string? target = element.Ancestors().FirstOrDefault(static a => string.Equals(a.Name.LocalName, "Style", StringComparison.Ordinal))?.Attribute("TargetType")?.Value;
return property.EndsWith("TextBlock.Appearance", StringComparison.Ordinal)
|| (string.Equals(property, "Appearance", StringComparison.Ordinal) && target is not null && target.Contains("TextBlock", StringComparison.Ordinal));
}
/// <summary>
/// The pairs the App's own styles compose (<c>Styles/FrameLedger.xaml</c>): the hooking pill OFF (secondary text on the
/// Pill's fill), ON (on-accent text on the accent fill, the ×FG chip's pair), and the warning qualifier (primary text
@@ -0,0 +1,171 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows;
using FrameLedger.App.Charts;
using FrameLedger.App.Controls;
using FrameLedger.App.Dialogs;
using FrameLedger.App.Pages;
using FrameLedger.App.Services;
using FrameLedger.App.ViewModels;
using FrameLedger.App.Windows;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Settings;
using FrameLedger.Application.TriState;
using FrameLedger.Domain.Metrics;
using FrameLedger.Infrastructure.Persistence;
namespace FrameLedger.App.Tests;
public sealed partial class PagesLoadTests
{
private sealed class NoOverride : ITriStateOverridePrompt
{
public Task<TriStateOverrideChoice?> AskAsync(TriStateChipModel chip, CancellationToken ct = default) => Task.FromResult<TriStateOverrideChoice?>(null);
}
/// <summary>
/// Every surface the App draws, built the way the App builds it (beta.17): the six pages over loaded view models, the
/// first run, the three secondary windows, every dialog's content, the safety InfoBar and the two custom controls. The
/// view models load off the STA thread (<see cref="LoadAsync"/>); <see cref="All"/> hands out one builder per surface,
/// called on the STA thread — twice when a check compares a switched instance with a fresh one.
/// </summary>
internal sealed class Surfaces : IDisposable
{
private readonly List<IDisposable> _owned = [];
private Surfaces(ScratchLedger ledger) => Ledger = ledger;
public ScratchLedger Ledger { get; }
public DashboardViewModel Dashboard { get; private set; } = null!;
public GamesViewModel Games { get; private set; } = null!;
public GameDetailViewModel Detail { get; private set; } = null!;
public CompareViewModel Compare { get; private set; } = null!;
public SettingsViewModel Settings { get; private set; } = null!;
public LogsViewModel Logs { get; private set; } = null!;
public SessionSummaryViewModel Summary { get; private set; } = null!;
public FirstRunViewModel FirstRun { get; private set; } = null!;
/// <summary>A game with a frame-generation session and a recorded-only one, every view model loaded over it.</summary>
public static async Task<Surfaces> LoadAsync(ScratchLedger s)
{
ArgumentNullException.ThrowIfNull(s);
GameRow game = await s.GameAsync("Alpha").ConfigureAwait(false);
await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-1), fgMode: "dlssg", native: 62, displayed: 118, factor: 1.9).ConfigureAwait(false);
await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-3), hooked: false).ConfigureAwait(false);
long withFrames = await s.SessionWithFramesAsync(game.Id, DateTimeOffset.UtcNow.AddHours(-5), frames: 600, spikeEvery: 200).ConfigureAwait(false);
var surfaces = new Surfaces(s);
await surfaces.LoadPagesAsync(game.Id).ConfigureAwait(false);
surfaces.Summary = new SessionSummaryViewModel(s.Sessions, s.Games, s.Annotations, new SqliteHardwareSnapshotRepository(s.Db),
new SessionSeriesLoader(s.Sessions), new NoOverride(), new NoSaver(), new NoStrip());
await surfaces.Summary.LoadAsync(withFrames, CancellationToken.None).ConfigureAwait(false);
surfaces.FirstRun = surfaces.Own(new FirstRunViewModel(new LegalGate(new SqliteLegalAcceptanceStore(s.Db), LegalDocuments.Load()), new NoAgent(), readOnly: false));
return surfaces;
}
private async Task LoadPagesAsync(long gameId)
{
ScratchLedger s = Ledger;
var selection = new GameSelection { GameId = gameId };
var nav = new NoNavigation();
var strip = new NoStrip();
var consent = new HookingConsent(new NoAgent(), new NoPrompt());
// The view models load off the STA thread; the pages bind to them on it.
Dashboard = Own(new DashboardViewModel(new NoAgent(), s.Library, selection, nav, new NoSummaries(), strip));
Task pending1 = Dashboard.Pending;
await pending1.ConfigureAwait(false);
Games = new GamesViewModel(s.Library, selection, nav, new AddGameFlow(s.Library, new NoPicker(), selection, nav, strip));
Task pending2 = Games.Pending;
await pending2.ConfigureAwait(false);
Detail = new GameDetailViewModel(s.Library, selection, consent, nav, new NoConfirm(), new NoEdit(), strip, new NoSummaries(),
new SessionSeriesLoader(s.Sessions), new SqliteHardwareSnapshotRepository(s.Db), new SessionSelection(), new NoPicker());
Task pending3 = Detail.Pending;
await pending3.ConfigureAwait(false);
Compare = new CompareViewModel(s.Library, new SessionSeriesLoader(s.Sessions), new NoMixed(), new NoSaver(), strip);
Task pending4 = Compare.Pending;
await pending4.ConfigureAwait(false);
(SettingsViewModel settings, LogsViewModel logs) = await SettingsAndLogsAsync(s, consent, strip).ConfigureAwait(false);
Settings = settings;
Logs = Own(logs);
}
/// <summary>Every surface by name, each with a builder to call on the STA thread.</summary>
public IEnumerable<(string Name, Func<FrameworkElement> Build)> All() => [.. Pages(), .. Windows(), .. Dialogs(), .. Controls()];
/// <summary>The six pages the navigation opens.</summary>
public IEnumerable<(string Name, Func<FrameworkElement> Build)> Pages() =>
[
("Dashboard", () => new DashboardPage(Dashboard)),
("Games", () => new GamesPage(Games)),
("Game detail", () => new GameDetailPage(Detail)),
("Compare", () => new ComparePage(Compare)),
("Settings", () => new SettingsPage(Settings, new SystemInfoViewModel(new FixedHardware(), new NoClipboard(), new NoStrip()))),
("Logs", () => new LogsPage(Logs)),
];
/// <summary>The first run's gate and the secondary windows: About, the user guide, a session's summary.</summary>
public IEnumerable<(string Name, Func<FrameworkElement> Build)> Windows() =>
[
("First run", () => new FirstRunContent(FirstRun)),
("About", () => new AboutWindow(new NoUrlOpener(), new NoTheme(), new AppearanceSettings(new MemorySettings()))),
("User guide", () => new DocumentWindow(Strings.Guide_Title, EmbeddedDocuments.Guide(), new NoUrlOpener(), new NoTheme(), new AppearanceSettings(new MemorySettings()))),
("Session summary", () => new SessionSummaryWindow(Summary, new NoTheme(), new AppearanceSettings(new MemorySettings()))),
];
/// <summary>Every dialog's content, over a view model of its own.</summary>
public IEnumerable<(string Name, Func<FrameworkElement> Build)> Dialogs() =>
[
("Consent", () => new ConsentDialogContent(new ConsentDialogViewModel("Alpha"))),
("Admin mode", () => new AgentAdminDialogContent(new AgentAdminDialogViewModel())),
("Anti-cheat exception", () => new AntiCheatExceptionDialogContent(new AntiCheatExceptionDialogViewModel(new AntiCheatExceptionFacts("Alpha", "NetEase Yidun", "NEP2.dll")))),
("Bug report preview", () => new BugReportPreviewContent(new BugReportPreviewViewModel(new BugReportPreviewModel(@"C:\data\bug-report.zip",
["logs/ui-20261007.log", "system.txt"], new Uri("https://github.com/poli0981/frameledger/issues/new"), "## What happened")))),
("Edit game", () => new EditGameContent(new EditGameViewModel(new GameMetadata { Name = "Alpha" }, provenanceJson: null))),
("Override", () => new TriStateOverrideContent(new TriStateOverrideViewModel(new TriStateChipModel("RT", Tri.Yes, TriStateSource.Measured)))),
("Bug bundle options", () => new BugBundleOptionsContent(new BugBundleOptionsViewModel(new BugBundleOffer(
new CrashDumpInfo(@"C:\data\crashdumps\ui-20261007-010203-42.dmp", DateTimeOffset.UtcNow, 2 * 1024 * 1024), new LastSessionInfo(1, "Alpha", DateTimeOffset.UtcNow))))),
("Database maintenance", () => new DatabaseMaintenanceContent(new DatabaseMaintenanceViewModel(new LedgerMaintenance(Ledger.Db), Ledger.Db.Path, new NoAgent(),
new NoSaver(), new NoMaintenancePrompts(), new RegisteredSettings(new SqliteSettingsStore(Ledger.Db))))),
("Import review", () => new ImportReviewContent(new ImportReviewViewModel(
[
new Application.Import.ImportCandidate(new Application.Import.StoreGame("steam", "1", "A", @"C:\a", @"C:\a\a.exe", null), @"C:\a\a.exe",
AlreadyInLibrary: false, ExecutableGuessed: false),
new Application.Import.ImportCandidate(new Application.Import.StoreGame("steam", "2", "B", @"C:\b", @"C:\b\b.exe", null), @"C:\b\b.exe",
AlreadyInLibrary: true, ExecutableGuessed: false),
])
{ ShowExisting = true })),
];
/// <summary>The safety notice's InfoBar (its own template, Styles/FrameLedger.xaml) and the two custom controls.</summary>
public IEnumerable<(string Name, Func<FrameworkElement> Build)> Controls() =>
[
("Safety InfoBar", NoticeWithAction),
("FPS readout", () => new FpsReadout { Model = FpsPresentation.FromRow(Detail.Sessions[0].Row) }),
("Tri-state chip", () => new TriStateChip { Model = new TriStateChipModel("RT", Tri.NotApplicable, TriStateSource.Measured) }),
];
public void Dispose()
{
foreach (IDisposable owned in _owned)
{
owned.Dispose();
}
}
private T Own<T>(T disposable)
where T : IDisposable
{
_owned.Add(disposable);
return disposable;
}
}
}
@@ -0,0 +1,183 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using FluentAssertions;
using Wpf.Ui.Appearance;
using Wpf.Ui.Markup;
namespace FrameLedger.App.Tests;
/// <summary>
/// A theme switch while a surface is on screen (beta.17, the owner's screenshots of 2026-10-07: Settings' descriptions light
/// grey on white after Dark → Light, dark grey on dark after the way back). Every text of a surface that lived through the
/// switch must be drawn in the colour the same surface gets when it is made fresh under the new theme. The surface is hosted
/// in a <see cref="Window"/> — never shown — because a window registers itself in <c>Application.Windows</c> and only those
/// trees hear that the application's dictionaries changed, which is how <c>ApplicationThemeManager.Apply</c> switches.
/// </summary>
public sealed partial class PagesLoadTests
{
private const int _staleShownPerSurface = 6;
[Theory]
[InlineData(ApplicationTheme.Dark)]
[InlineData(ApplicationTheme.Light)]
public async Task EveryTextFollowsAThemeSwitch(ApplicationTheme createdUnder)
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
using Surfaces surfaces = await Surfaces.LoadAsync(s);
(int Texts, List<string> Stale) result = await OnStaAsync(() =>
{
int texts = 0;
var stale = new List<string>();
foreach ((string name, Func<FrameworkElement> build) in surfaces.All())
{
(int count, List<string> found) = SwitchedAgainstFresh(name, build, createdUnder);
texts += count;
stale.AddRange(found);
}
return (texts, stale);
});
result.Texts.Should().BeGreaterThan(300, "every surface was rendered and holds text");
string.Join(Environment.NewLine, result.Stale).Should().BeEmpty($"a text made under {createdUnder} follows the switch (16_WPFUI_SYNTAX §Gotchas: ui:TextBlock Appearance pins the brush it found first)");
}
/// <summary>
/// The library's half of the beta.17 defect, kept visible: WPF UI 4.3.0's <c>ui:TextBlock Appearance</c> stores the brush it
/// finds when the property is set (<c>TextBlock.OnAppearanceChanged</c> → <c>TryFindResource</c>) and coerces Foreground to
/// it, so the text keeps the theme it was made under; the App's <c>SecondaryText</c> style follows. When the first half
/// fails, upstream follows a switch — the styles may stay, they are plain WPF.
/// </summary>
[Fact]
public async Task WpfUisAppearanceStillKeepsTheThemeATextWasMadeUnder()
{
(Color Pinned, Color Styled, Color Light) colours = await OnStaAsync(() =>
{
var pinned = new Wpf.Ui.Controls.TextBlock { Text = "pinned", Appearance = Wpf.Ui.Controls.TextColor.Secondary };
var styled = new Wpf.Ui.Controls.TextBlock { Text = "styled", Style = (Style)System.Windows.Application.Current.FindResource("SecondaryText") };
var host = new Window { Content = new StackPanel { Children = { pinned, styled } } };
try
{
return Visuals.UnderTheme(ApplicationTheme.Light, () =>
(Solid(pinned.Foreground), Solid(styled.Foreground), Wcag.Resolve(new ThemesDictionary { Theme = ApplicationTheme.Light }, "TextFillColorSecondary")));
}
finally
{
host.Close();
}
});
colours.Styled.Should().Be(colours.Light, "the SecondaryText style follows the switch");
colours.Pinned.Should().NotBe(colours.Light, "WPF UI 4.3.0's Appearance kept the Dark brush; when this fails, upstream fixed it (16_WPFUI_SYNTAX §Gotchas)");
}
/// <summary>
/// One surface made under <paramref name="createdUnder"/> and laid out, the theme switched (Dark → Light inside
/// <see cref="Visuals.UnderTheme"/>, or Light → Dark as it restores), and its texts compared with a fresh instance's under
/// the new theme: the number of texts compared and a line for each one drawn in another colour.
/// </summary>
private static (int Count, List<string> Stale) SwitchedAgainstFresh(string name, Func<FrameworkElement> build, ApplicationTheme createdUnder)
{
if (createdUnder == ApplicationTheme.Dark)
{
(Window host, FrameworkElement switched) = Hosted(build);
try
{
Lay(switched);
return Visuals.UnderTheme(ApplicationTheme.Light, () => CompareWithFresh(name, switched, build));
}
finally
{
host.Close();
}
}
(Window lightHost, FrameworkElement made) = Visuals.UnderTheme(ApplicationTheme.Light, () =>
{
(Window h, FrameworkElement e) = Hosted(build);
Lay(e);
return (h, e);
});
try
{
return CompareWithFresh(name, made, build);
}
finally
{
lightHost.Close();
}
}
private static (int Count, List<string> Stale) CompareWithFresh(string name, FrameworkElement switched, Func<FrameworkElement> build)
{
Lay(switched);
(Window host, FrameworkElement fresh) = Hosted(build);
try
{
Lay(fresh);
List<(string Path, string Text, string Colour)> before = Texts(switched);
List<(string Path, string Text, string Colour)> after = Texts(fresh);
if (before.Count != after.Count)
{
return (before.Count, [$"{name}: {before.Count} texts after the switch, {after.Count} in a fresh one"]);
}
// Texts are reported, never compared: another test class may change Strings.Culture between the two builds.
List<string> stale = [.. before.Zip(after)
.Where(static p => !string.Equals(p.First.Path, p.Second.Path, StringComparison.Ordinal) || !string.Equals(p.First.Colour, p.Second.Colour, StringComparison.Ordinal))
.Select(p => $"{name}: \"{p.First.Text}\" is {p.First.Colour}, made fresh {p.Second.Colour} ({p.First.Path})")];
return (before.Count, stale.Count <= _staleShownPerSurface ? stale : [.. stale.Take(_staleShownPerSurface), $"{name}: … and {stale.Count - _staleShownPerSurface} more"]);
}
finally
{
host.Close();
}
}
/// <summary>A surface in a window that is never shown: itself when it is one, otherwise as the window's content.</summary>
private static (Window Host, FrameworkElement Root) Hosted(Func<FrameworkElement> build)
{
FrameworkElement built = build();
if (built is Window window)
{
return (window, (FrameworkElement)window.Content);
}
// A FluentWindow, as the shell is: its style gives the inherited text colour by theme resource too.
var host = new Wpf.Ui.Controls.FluentWindow { Content = built };
return (host, built);
}
private static void Lay(FrameworkElement root) => Visuals.Layout(root, 1200, 900);
/// <summary>Every TextBlock under <paramref name="root"/> in visual-tree order: where it is, what it says, the colour it is drawn in.</summary>
private static List<(string Path, string Text, string Colour)> Texts(DependencyObject root)
{
var found = new List<(string, string, string)>();
Walk(root, root.GetType().Name, found);
return found;
}
private static void Walk(DependencyObject node, string path, List<(string, string, string)> found)
{
if (node is TextBlock text)
{
found.Add((path, text.Text, text.Foreground is SolidColorBrush solid ? solid.Color.ToString(CultureInfo.InvariantCulture) : text.Foreground?.ToString(CultureInfo.InvariantCulture) ?? "null"));
}
int count = VisualTreeHelper.GetChildrenCount(node);
for (int i = 0; i < count; i++)
{
DependencyObject child = VisualTreeHelper.GetChild(node, i);
Walk(child, string.Create(CultureInfo.InvariantCulture, $"{path}/{child.GetType().Name}[{i}]"), found);
}
}
private static Color Solid(Brush brush) => brush is SolidColorBrush solid ? solid.Color : throw new InvalidOperationException("a text whose foreground is not a solid colour");
}
@@ -1,11 +1,13 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using FluentAssertions;
using FrameLedger.App.Pages;
using FrameLedger.App.Services;
namespace FrameLedger.App.Tests;
@@ -128,4 +130,181 @@ public sealed class ScrollBarHidingTests
result.FirstAfterOff.Should().Be(ScrollBarVisibility.Auto, "and gives it back its own setting on its next load after off");
result.LoadedAfterOff.Should().Be(ScrollBarVisibility.Visible, "a scroller the option never touched keeps what it has");
}
/// <summary>
/// beta.17 (the owner's screenshot of 2026-10-07: the Dashboard kept its bar with the option on). WPF raises Loaded only on
/// an element whose subtree listens for it with a handler of its own — an instance handler, a style's EventSetter or a
/// template's trigger (<c>BroadcastEventHelper</c>, <c>FrameworkElement.ThisHasLoadedChangeEventHandler</c>) — and a
/// class handler is none of those, so a scroller over plain cards and text never loaded as far as the option knew. Laid
/// out with no Loaded at all, a scroller must be hidden all the same.
/// </summary>
[Fact]
public async Task AScrollerLaidOutWithNoLoadedEventIsHidden()
{
(ScrollBarVisibility Axis, Visibility Bar, double Scrollable) result = await PagesLoadTests.OnStaAsync(() =>
{
ScrollBarHiding.Register();
try
{
ScrollBarHiding.Apply(true);
var viewer = new ScrollViewer { Height = 120, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, Content = new Border { Height = 600 } };
Visuals.Layout(viewer, 300, 120);
return (viewer.VerticalScrollBarVisibility, viewer.ComputedVerticalScrollBarVisibility, viewer.ScrollableHeight);
}
finally
{
ScrollBarHiding.Apply(false);
}
});
result.Scrollable.Should().BeGreaterThan(0, "the scroller has something to scroll");
result.Axis.Should().Be(ScrollBarVisibility.Hidden, "the option reaches a scroller when it is laid out, Loaded or not");
result.Bar.Should().NotBe(Visibility.Visible);
}
/// <summary>
/// The option as the owner has it: on at start-up (<c>App.RunAsync</c> applies it before the first window), then every
/// surface shown in a real window off the screen — each page navigated in WPF UI's presenter as the shell does, the
/// secondary windows, the first run, every dialog's content. No scroller that has something to scroll draws a bar. Before
/// beta.17 Settings passed (its toggle switches' template has a Loaded trigger, so its scroller loaded) and the Dashboard
/// did not; Settings and the Dashboard must both be scrollable here, or the check proves nothing.
/// </summary>
[Fact]
public async Task EverySurfaceShownWithTheOptionOnDrawsNoBar()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
using PagesLoadTests.Surfaces surfaces = await PagesLoadTests.Surfaces.LoadAsync(s);
(List<string> Bars, HashSet<string> Scrollable) result = await PagesLoadTests.OnStaAsync(() =>
{
ScrollBarHiding.Register();
ScrollBarHiding.Apply(true);
try
{
var bars = new List<string>();
var scrollable = new HashSet<string>(StringComparer.Ordinal);
foreach ((string name, Func<FrameworkElement> build) in surfaces.Pages())
{
Sweep(name, () => InPresenter(build()), bars, scrollable);
}
foreach ((string name, Func<FrameworkElement> build) in surfaces.Windows().Concat(surfaces.Dialogs()))
{
Sweep(name, build, bars, scrollable);
}
return (bars, scrollable);
}
finally
{
ScrollBarHiding.Apply(false);
}
});
result.Scrollable.Should().Contain(["Dashboard", "Settings", "Logs", "User guide"], "the check is vacuous unless those scroll in a window this small");
string.Join(Environment.NewLine, result.Bars).Should().BeEmpty("ui.hide_scrollbars: no scroller the App shows draws a bar, and the wheel still scrolls it");
}
/// <summary>
/// The harness against WPF itself: a scroller of our own with a Loaded class handler, shown in a real window, is never
/// called while it holds only a Border, and is called once it holds a CheckBox, whose template listens for Loaded. If the
/// first half fails, WPF raises Loaded everywhere and the reason above is gone; if the second fails, the harness does not
/// deliver Loaded and <see cref="EverySurfaceShownWithTheOptionOnDrawsNoBar"/> could not tell Settings from the Dashboard.
/// </summary>
[Fact]
public async Task WpfRaisesLoadedOnlyWhereASubtreeListensForIt()
{
(int WithBorder, int WithCheckBox) loads = await PagesLoadTests.OnStaAsync(() =>
(LoadsOfAProbeHolding(new Border { Height = 40 }), LoadsOfAProbeHolding(new CheckBox { Content = "listens" })));
loads.WithBorder.Should().Be(0, "a class handler does not put an element on WPF's Loaded route");
loads.WithCheckBox.Should().BeGreaterThan(0, "WPF UI's CheckBox template has a Loaded trigger, which does");
}
private sealed class ProbeScrollViewer : ScrollViewer
{
static ProbeScrollViewer() => EventManager.RegisterClassHandler(typeof(ProbeScrollViewer), LoadedEvent, new RoutedEventHandler(static (_, _) => Loads++), handledEventsToo: true);
public static int Loads { get; private set; }
}
private static int LoadsOfAProbeHolding(UIElement content)
{
var probe = new ProbeScrollViewer { Content = content };
int before = ProbeScrollViewer.Loads;
Window window = OffScreen(new Window { Content = probe });
try
{
window.Show();
Visuals.Pump();
return ProbeScrollViewer.Loads - before;
}
finally
{
window.Close();
}
}
/// <summary>A page navigated in WPF UI's presenter, as the shell's NavigationView hosts it.</summary>
private static Grid InPresenter(FrameworkElement page)
{
var presenter = new Wpf.Ui.Controls.NavigationViewContentPresenter();
_ = presenter.Navigate(page);
return new Grid { Children = { presenter } };
}
/// <summary>
/// Shows the surface in a real window off the screen, lets WPF load and lay it out, and notes every scroller that has
/// something to scroll and every one of those that draws a bar.
/// </summary>
private static void Sweep(string name, Func<FrameworkElement> build, List<string> bars, HashSet<string> scrollable)
{
FrameworkElement built = build();
Window window = OffScreen(built as Window ?? new Window { Content = built });
try
{
window.Show();
Visuals.Pump();
if (Visuals.Find<LogsPage>(window) is { } logs)
{
// The tail is empty in a scratch folder; fill it as a log file would.
logs.Tail.Text = string.Join(Environment.NewLine, Enumerable.Range(1, 200).Select(static i => "line " + i.ToString(CultureInfo.InvariantCulture)));
Visuals.Pump();
}
foreach (ScrollViewer viewer in Visuals.FindAll<ScrollViewer>(window))
{
bool vertical = viewer.ScrollableHeight > 0.5;
bool horizontal = viewer.ScrollableWidth > 0.5;
if (vertical || horizontal)
{
_ = scrollable.Add(name);
}
if ((vertical && viewer.ComputedVerticalScrollBarVisibility == Visibility.Visible)
|| (horizontal && viewer.ComputedHorizontalScrollBarVisibility == Visibility.Visible))
{
bars.Add(string.Create(CultureInfo.InvariantCulture,
$"{name}: {(viewer.TemplatedParent ?? viewer).GetType().Name} draws a bar ({viewer.ScrollableWidth:0} x {viewer.ScrollableHeight:0} to scroll)"));
}
}
}
finally
{
window.Close();
}
}
/// <summary>A window shown where nobody sees it and never activated, small enough that the surfaces overflow it.</summary>
private static Window OffScreen(Window window)
{
window.Width = 1000;
window.Height = 420;
window.WindowStartupLocation = WindowStartupLocation.Manual;
window.Left = -20000;
window.Top = -20000;
window.ShowActivated = false;
window.ShowInTaskbar = false;
return window;
}
}
@@ -13,6 +13,7 @@ using FrameLedger.Domain.Sessions;
using FrameLedger.Infrastructure.Persistence;
using FrameLedger.Infrastructure.Recording;
using FrameLedger.Shared;
using FrameLedger.Testing;
namespace FrameLedger.CaptureHost.Tests;
@@ -52,22 +53,30 @@ public sealed class CaptureHostEndToEndTests : IDisposable
private static string Host => Path.Combine(AppContext.BaseDirectory, "FrameLedger.CaptureHost.exe");
/// <summary>This test's scratch directory: the harness copy it consents to, and nothing else.</summary>
private readonly string _scratch = Path.Combine(Path.GetTempPath(), "fl-capturehost-e2e-" + Guid.NewGuid().ToString("N"));
/// <summary>
/// The ONE executable this suite may write a consent record for.
/// The ONE executable this suite may write a consent record for: our harness, copied under a run-unique name
/// (beta.16). The host resolves its target BY NAME (<c>TargetResolver</c>), and <c>build.ps1</c> runs the test projects as
/// parallel processes: a <c>hook-harness.exe</c> another project was still starting - its module list a partial copy -
/// is an unreadable process of the same name, which the resolver must count, and it refused <c>TargetAmbiguous</c>
/// (#269's first CI run). No other test starts a process of this name.
/// </summary>
/// <remarks>
/// Every write goes through here, so "which binary did the suite consent to?" has
/// one answer and one place to change it — and changing it is what the assertion
/// below turns red.
/// </remarks>
private static string ConsentedExecutable => Harness;
private string ConsentedExecutable => Path.Combine(_scratch, "hook-harness-" + Path.GetFileName(_scratch) + ".exe");
/// <summary>The host's own ledger, beside its binary (P2 PR-B): the same SQLite adapter the Agent will use.</summary>
private static string HostLedger => Path.Combine(Path.GetDirectoryName(Host)!, LedgerPaths.DatabaseFileName);
/// <summary>Writes the ONE consent record this suite may write, through the real store, and closes the ledger again.</summary>
private static async Task<ConsentWriteOutcome> GrantConsentAsync()
private async Task<ConsentWriteOutcome> GrantConsentAsync()
{
StageTarget();
ExecutableFingerprint fingerprint = FrameLedger.Infrastructure.Io.ExecutableIdentity.Read(ConsentedExecutable)!.Value;
LedgerDatabase db = await LedgerDatabase.OpenAsync(HostLedger, ct: TestContext.Current.CancellationToken).ConfigureAwait(false);
await using (db.ConfigureAwait(false))
@@ -81,7 +90,7 @@ public sealed class CaptureHostEndToEndTests : IDisposable
}
}
private static async Task<GameConsentRecord> FindConsentAsync()
private async Task<GameConsentRecord> FindConsentAsync()
{
LedgerDatabase db = await LedgerDatabase.OpenAsync(HostLedger, ct: TestContext.Current.CancellationToken).ConfigureAwait(false);
await using (db.ConfigureAwait(false))
@@ -122,26 +131,52 @@ public sealed class CaptureHostEndToEndTests : IDisposable
// output directory. Leaving a consent record there would make the NEXT run of the refusal case
// pass for the wrong reason.
DeleteHostLedger();
try
{
Directory.Delete(_scratch, recursive: true);
}
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
{
// A harness this test killed may still hold its image for a moment; the directory is the temp folder's.
}
}
[Fact]
public void TheTargetAndTheConsentRecordAreBothOurOwnHarness()
{
Path.GetFileName(ConsentedExecutable).Should().Be("hook-harness.exe");
Path.GetDirectoryName(ConsentedExecutable).Should().Be(
StageTarget();
Path.GetFileName(Harness).Should().Be("hook-harness.exe");
Path.GetDirectoryName(Harness).Should().Be(
AppContext.BaseDirectory.TrimEnd(Path.DirectorySeparatorChar));
Path.GetFileName(ConsentedExecutable).Should().StartWith("hook-harness-");
Path.GetDirectoryName(ConsentedExecutable).Should().Be(_scratch, "the copy lives in this test's scratch directory and nowhere else");
File.ReadAllBytes(ConsentedExecutable).Should().Equal(File.ReadAllBytes(Harness), "the target IS hook-harness, byte for byte, under another name");
Path.GetFileName(Host).Should().Be("FrameLedger.CaptureHost.exe");
}
private static Process StartHarness(string arguments)
/// <summary>This run's copy of hook-harness, once per test; its overlay logs are this assembly's to remove (<c>17_HOOK_ENGINE</c> §Native logging).</summary>
private void StageTarget()
{
if (File.Exists(ConsentedExecutable))
{
return;
}
File.Exists(Harness).Should().BeTrue(
"hook-harness.exe must be staged beside the test binary (FrameLedger.DrainFixtures.targets). "
+ "This FAILS rather than skipping: an integration test that quietly does nothing when its "
+ "fixture is absent is a gate that cannot fail.");
+ "This FAILS rather than skipping: an integration test that quietly does nothing when its fixture "
+ "is absent is a gate that cannot fail.");
Directory.CreateDirectory(_scratch);
HarnessOverlayLogSweep.Own(_scratch);
File.Copy(Harness, ConsentedExecutable);
}
private Process StartHarness(string arguments)
{
StageTarget();
File.Exists(Host).Should().BeTrue("the host must be built and copied beside this test");
var p = Process.Start(new ProcessStartInfo(Harness, arguments)
var p = Process.Start(new ProcessStartInfo(ConsentedExecutable, arguments)
{
UseShellExecute = false,
CreateNoWindow = true,