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
poli0981andClaude Opus 5.5 690ce3acf8 Beta15/pr5 viewer (#278)
* fix(watch): a game started again while its last session finalizes is recorded when that session ends (beta.15 PR-3)

From the beta.14 audit (chip, folded into beta.15 by the owner). CaptureOrchestrator.Start turned a process away while a
session for its executable was still running ("one at a time"), and ProcessWatcher reports a pid once - so a game
started again during the previous session's finalize (driver profile up to 5 s, a crash reporter waited for up to
2.5 s, the transaction) never got a session. Verified on the code first: path (b), dropped, never picked up.

- The newest turned-away process per executable is remembered (Deferred: the event and the process's start time) and
  started from Reap when that session ends - if the session ended on its own (RunAndReportAsync records the result; a
  cancelled or faulted one starts nothing), the process is the same one (pid and start time) and it is then the
  executable's ONLY process. A helper of a multi-process game (NW.js, Electron) still has the game beside it, so it stays
  turned away, as before.
- The start happens outside the table's lock; the log says "recording it now".

Tests (CaptureOrchestratorTests, FakeRecorder.Pending holding finalize open): the restart is recorded when the session
ends (red before: one request), a helper of a game still running is not, a process that left meanwhile is not. The
existing one-at-a-time test keeps its behaviour.

Docs: 04_CAPTURE §Process watcher, HANDOFF trap, CHANGELOG.

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

* fix(guard): the scan set follows a parent link only while creation times allow it (beta.15 PR-4, D51)

The guard's scan set (19_SAFETY item 1, 20_OPEN_QUESTIONS S16) is the injection target, its ancestors below the first
platform launcher and its descendants, walked over one Toolhelp snapshot that links a process to its parent by pid
alone. Windows reuses pids: once a game's launcher exited, the game named a pid that could belong to anything, and the
walk scanned whatever held it - a protected process refused the session as unreadable, a blocklisted one turned the
game's hooking off for good - and a cycle of reused pids sent the same processes round again.

Owner decision D51: a parent/child link is cut ONLY when it is proven wrong - both creation times read and the child
created before the process whose pid it names as its parent, which no real child can be. A cut ancestor link ends the
ancestor walk; a cut child is not walked, nor anything below it. An unread time keeps the link (fail closed, rule 2),
equal times keep it, and each pid is walked and sent once. The launcher boundary, the depth (16), the frontier (512, one
more refuses) and "a member that cannot be read refuses" are unchanged; no C ABI change.

- fl_guard_scanset.h/.cpp: WalkScanSet, a pure allocation-free walk over snapshot rows with the creation-time callback
  and the sink; ProvenNotItsChild; ProcessCreatedAt (PROCESS_QUERY_LIMITED_INFORMATION + GetProcessTimes, the module
  scan's own read-only right; reads nothing inside the process).
- fl_guard_sources.cpp: EnumerateScanSetImpl builds rows from the snapshot and calls the walk; the static rows lose the
  image names (the launcher flag is computed as they are read). The guard stays non-re-entrant (NativeAntiCheatGuard
  serialises every call).
- The new source is in all three CMake lists (FL_INJECTOR_SOURCES, FrameLedger.Injector, FrameLedger.Guard).
- guard_test.cpp [D51]: the plain tree; a reused parent pid; an "older child"; unread times on either end keep the
  link; equal times; cycles; the limits (missing target, frontier 511/512, depth, a full sink); and the real source
  keeps a child this process just started and reads real creation times.
- 19_SAFETY item 1 amended (with the one residual: a clock set backwards), 20_OPEN_QUESTIONS S16 note, CHANGELOG.

Gate: ./build.ps1 check - ALL GATES PASSED in 289s (32/32 native suites).

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

* feat(app): FrameLedger.exe --data-dir opens a copy of a data folder as a viewer - no Agent started or contacted, nothing on the PC changed (beta.15 PR-5, D52)

From the beta.14 audit (chip, folded into beta.15 by the owner): the App had no --data-dir, so a build of one's own could
only be looked at over the profile's ledger - and a newer build migrates it past what the released one can read. D6
deliberately keeps the Agent's --data-dir under --console, the pipe is one per user and the Agent behind it records into
the profile's ledger, so an App over another ledger that still talked to that Agent would send it the other ledger's game
ids: SetHookEnabled consenting for the wrong game (rule 1), DeleteSessions deleting the wrong game's sessions.

Owner decision D52: the App's --data-dir is a VIEWER over a copy. D6 is unchanged.

- Program.Main reads --data-dir (DataFolderArgument) after Velopack and before the single-instance key, the log or the
  ledger: a folder that exists makes a viewer (UiPaths.UseViewerFolder; the folder is its own single-instance key, so it
  runs beside the profile's App); the profile's own folder (case, separators, a relative path, a junction - resolved as
  the Agent's identity resolves links), a missing folder, a flag with no folder or two flags refuse with a message box,
  exit 2. UiPaths refuses the profile folder a second time.
- MachineFacingServices: everything that reaches past the ledger - the pipe client, the launcher, the connection's hosted
  service, the Run entry, the Agent's maintenance flags, Velopack and the startup update check - is registered in one
  place; a viewer gets ViewerAgentLink (never connected, nothing behind it), ViewerRunAtLogon, ViewerAgentTool and
  ViewerUpdateClient (not installed) and no hosted service at all.
- AgentConnectionState.Viewer: the pill reads "Viewer - no Agent"; a persistent InfoBar names the folder.
- ActsOnThisPc disables, in a viewer: hooking, the exception's grant/withdraw, re-enable, Delete all sessions (game page
  and Settings), the kill switch, the exceptions list and refresh, the admin mode, the logon task and the Vulkan layer
  buttons, Start with Windows, the automatic update check, Help > Check for updates, Tools > Update detection rules and
  the tray's Pause. MainWindowViewModel takes IAgentLink rather than the concrete connection.
- Strings (en/vi/ja; ja marked review): Agent_State_Viewer, Viewer_Banner_*, Viewer_ChangesThisPc_Off, DataDir_*.

Tests: DataFolderArgumentTests (the profile refused in six spellings and through a junction, missing, no value, twice, a
copy inside the profile allowed, UiPaths' second lock), ViewerModeTests (the viewer link sends nothing; the consent dialog
never opens; the viewer composition holds no pipe/launcher/hosted service/registry/Velopack while the profile's still
does; every machine-facing control in the XAML binds ActsOnThisPc), SettingsViewModelTests and GameDetailViewModelTests
(viewer vs profile on the same answers).

Docs: 08_UI §Shell, 12_BUILD §Debugging (how to copy a ledger safely with SQLite's backup), 01_ARCHITECTURE §Data
directory, 10_LOGGING, CONTRIBUTING, CLAUDE.md, HANDOFF (D6 pointer, the owner's-data trap), CHANGELOG.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 01:58:56 +00:00
poli0981andClaude Opus 5.5 f94c76bcb6 Beta15/pr4 guard (#277)
* fix(watch): a game started again while its last session finalizes is recorded when that session ends (beta.15 PR-3)

From the beta.14 audit (chip, folded into beta.15 by the owner). CaptureOrchestrator.Start turned a process away while a
session for its executable was still running ("one at a time"), and ProcessWatcher reports a pid once - so a game
started again during the previous session's finalize (driver profile up to 5 s, a crash reporter waited for up to
2.5 s, the transaction) never got a session. Verified on the code first: path (b), dropped, never picked up.

- The newest turned-away process per executable is remembered (Deferred: the event and the process's start time) and
  started from Reap when that session ends - if the session ended on its own (RunAndReportAsync records the result; a
  cancelled or faulted one starts nothing), the process is the same one (pid and start time) and it is then the
  executable's ONLY process. A helper of a multi-process game (NW.js, Electron) still has the game beside it, so it stays
  turned away, as before.
- The start happens outside the table's lock; the log says "recording it now".

Tests (CaptureOrchestratorTests, FakeRecorder.Pending holding finalize open): the restart is recorded when the session
ends (red before: one request), a helper of a game still running is not, a process that left meanwhile is not. The
existing one-at-a-time test keeps its behaviour.

Docs: 04_CAPTURE §Process watcher, HANDOFF trap, CHANGELOG.

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

* fix(guard): the scan set follows a parent link only while creation times allow it (beta.15 PR-4, D51)

The guard's scan set (19_SAFETY item 1, 20_OPEN_QUESTIONS S16) is the injection target, its ancestors below the first
platform launcher and its descendants, walked over one Toolhelp snapshot that links a process to its parent by pid
alone. Windows reuses pids: once a game's launcher exited, the game named a pid that could belong to anything, and the
walk scanned whatever held it - a protected process refused the session as unreadable, a blocklisted one turned the
game's hooking off for good - and a cycle of reused pids sent the same processes round again.

Owner decision D51: a parent/child link is cut ONLY when it is proven wrong - both creation times read and the child
created before the process whose pid it names as its parent, which no real child can be. A cut ancestor link ends the
ancestor walk; a cut child is not walked, nor anything below it. An unread time keeps the link (fail closed, rule 2),
equal times keep it, and each pid is walked and sent once. The launcher boundary, the depth (16), the frontier (512, one
more refuses) and "a member that cannot be read refuses" are unchanged; no C ABI change.

- fl_guard_scanset.h/.cpp: WalkScanSet, a pure allocation-free walk over snapshot rows with the creation-time callback
  and the sink; ProvenNotItsChild; ProcessCreatedAt (PROCESS_QUERY_LIMITED_INFORMATION + GetProcessTimes, the module
  scan's own read-only right; reads nothing inside the process).
- fl_guard_sources.cpp: EnumerateScanSetImpl builds rows from the snapshot and calls the walk; the static rows lose the
  image names (the launcher flag is computed as they are read). The guard stays non-re-entrant (NativeAntiCheatGuard
  serialises every call).
- The new source is in all three CMake lists (FL_INJECTOR_SOURCES, FrameLedger.Injector, FrameLedger.Guard).
- guard_test.cpp [D51]: the plain tree; a reused parent pid; an "older child"; unread times on either end keep the
  link; equal times; cycles; the limits (missing target, frontier 511/512, depth, a full sink); and the real source
  keeps a child this process just started and reads real creation times.
- 19_SAFETY item 1 amended (with the one residual: a clock set backwards), 20_OPEN_QUESTIONS S16 note, CHANGELOG.

Gate: ./build.ps1 check - ALL GATES PASSED in 289s (32/32 native suites).

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 01:31:21 +00:00
poli0981andClaude Opus 5.5 9c82288192 fix(watch): a game started again while its last session finalizes is recorded when that session ends (beta.15 PR-3) (#276)
From the beta.14 audit (chip, folded into beta.15 by the owner). CaptureOrchestrator.Start turned a process away while a
session for its executable was still running ("one at a time"), and ProcessWatcher reports a pid once - so a game
started again during the previous session's finalize (driver profile up to 5 s, a crash reporter waited for up to
2.5 s, the transaction) never got a session. Verified on the code first: path (b), dropped, never picked up.

- The newest turned-away process per executable is remembered (Deferred: the event and the process's start time) and
  started from Reap when that session ends - if the session ended on its own (RunAndReportAsync records the result; a
  cancelled or faulted one starts nothing), the process is the same one (pid and start time) and it is then the
  executable's ONLY process. A helper of a multi-process game (NW.js, Electron) still has the game beside it, so it stays
  turned away, as before.
- The start happens outside the table's lock; the log says "recording it now".

Tests (CaptureOrchestratorTests, FakeRecorder.Pending holding finalize open): the restart is recorded when the session
ends (red before: one request), a helper of a game still running is not, a process that left meanwhile is not. The
existing one-at-a-time test keeps its behaviour.

Docs: 04_CAPTURE §Process watcher, HANDOFF trap, CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 08:07:35 +07:00
poli0981andClaude Opus 5.5 1712dc503d fix(capture): launch mode's refused outcome carries the launcher's pid, so the descendant election finally runs (beta.15 PR-2) (#275)
From the beta.14 audit (chip, folded into beta.15 by the owner). CaptureSession built the outcome of launch mode's two
guard refusals (LaunchTargetExited, LaunchNoPresentationRuntime) without TargetPid, and
CaptureOrchestrator.ElectAfterLaunchAsync returned at `TargetPid == 0` - before its own "election:" log line - so the
election (#150, 2026-09-10) never ran. The orchestrator's tests built the outcome by hand with the pid, which is why
nothing saw it.

- The refused cue is `refused with { TargetPid = pid, ExitCode = alive.ExitCode }`; the refusal handling moved to
  CaptureSession.RefusedAsync (MA0051 - SessionAsync was at 60 lines).
- ElectAfterLaunchAsync logs an outcome without a launcher pid instead of returning silently.
- CaptureSessionLaunchTests.TheGuardsTwoLaunchRefusalsAreTheirOwnSessionEndReasons asserts the pid (red before: 0).

Reachable from `Agent --console launch` (the App sends no LaunchGame). A real launcher run is still owed (owner-only).
Docs: 04_CAPTURE (corrected in place), spike-notes §14.2, CHANGELOG.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 07:42:32 +07:00
poli0981andClaude Opus 5.5 fd4b2f0d5d fix(app): every list of choices, the tray's menu and the Agent pill follow a change of language at once (beta.15 PR-1) (#274)
From the beta.14 audit (chip, owner: fold the five into beta.15). A change of language rebuilds the window and its
pages, so their own text followed; two kinds did not, until a restart:

- Lists of choices built once in a static and bound with x:Static: Settings' Themes and UpdateChannels (D47's
  "Automatic (Beta)" label too), Logs' Sources and Levels, Games' Sorts. They are instance properties now, bound through
  the view model - built per page, in the language the page opens in (GameDetail's TrendMetrics has worked that way
  since beta.8). Languages stays static: each language in its own words, the same in every language.
- Singletons that outlive the rebuilt window: the tray's menu and tooltip (TrayHost) and the Agent pill and update
  banner (MainWindowViewModel). Both implement ILanguageFollower; ShellHost.Rebuild calls every registered follower once
  the new window is up. The shell's registrations moved to App.AddShell (MA0051).

Tests: LanguageFollowingTests (no view model may keep a static list of labelled choices but the languages - red on the
five lists before), SettingsViewModelTests / GamesViewModelTests / GameDetailViewModelTests (a page opened in Vietnamese
lists Vietnamese choices; the trend selector pinned for the first time), TrayHostTests (the menu relabelled, now in the
strings-culture collection).

Docs: 09_I18N (runtime switching), CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 07:26:19 +07:00
poli0981andClaude Opus 5.5 68f115d57d release: 0.1.0-beta.14 - CHANGELOG section with how to update from beta.13, release lines, HANDOFF train section and owner-only item 11 (beta.14 PR-9) (#272)
VERSION stays 0.1.0: the tag's numeric core. The tag waits for the owner's confirmation, and PR-5 / PR-7 for the owner's
approval of the Privacy Policy 2.7 wording.

"Updating from 0.1.0-beta.13" says the three things a beta.13 user must do differently: choose Beta first (beta.13's
default stable channel finds no pre-release), update with no game running (beta.13 still auto-applies at start), and that
schema 0019 cannot be opened by an earlier version.



docs(handoff): two more traps of the beta.14 train - the 31-character build id ten commits after a tag, and the hosted runner that was never acquired (beta.14 PR-9)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 05:12:48 +07:00
poli0981andClaude Opus 5.5 4130b7cbe4 feat(app): the new measurements as summary cards, a render scale chart, a clocks and fan chart, trend metrics and compare rows labelled (presented) (beta.14 PR-8, D49) (#271)
The App's half of D49 (PR-7 recorded the values). Every value is read from the stored row, never recomputed, and reads
N/A on a session recorded before beta.14.

Summary (SessionSummaryViewModel, the cards in AddFrameCards / AddPacingCards / AddMachineCards):
- Time below 60 FPS, with below 30 and "display under {refresh} Hz" beneath - the refresh share named for the display, as
  it is over the presents the display received - and Frame to frame; both carry (presented) where the lows do.
- VSync (share of frames, tearing allowed beneath), Ray tracing (share of frames, rays per pixel; only where measured),
  Game in focus (foreground over drain ticks), Capture quality (gaps, lost records, faults).
- The 1% Low card carries "displayed: N" where frames were generated - rule 6, beside the game's own, never instead.
- GPU clocks (core, memory; fan and memory temperature beneath), GPU held back (power, heat; NVIDIA only), Frames per watt.

Charts:
- RenderScaleChart over RenderScaleSeries: 100 x sqrt(render / output pixels) as steps, from the render_res blob where the
  resolution varied, a flat line at the row's extent where it did not, a sentence where never measured.
- SensorsChart: the memory temperature on the temperatures plot, in a new palette colour (Chart_SensorTertiary: no
  existing colour was 60 apart from all six beside it - ChartMathTests caught Chart_Histogram == Chart_Native), and a
  Clocks and fan plot - core and memory MHz, fan RPM on the right, the ticks a limit held the card back shaded
  (LimitRuns); collapsed when the session stored none of them.

Trend: nine metrics (time below 60 / refresh, frame to frame, render scale = 100 / upscale_ratio, VSync share, frames per
watt from hooked sessions; core clock, memory temperature, power-limit share from every session), with ms, MHz and FPS/W
axes. Compare: nine rows; the median, lows, stutter, time below 60 and frame to frame carry (presented) in the cell of a
present-only session, the best decided on the number, never the label. The Latency tab is shown only for a game with a
session that measured latency (nothing measures Reflex today). Formats.Share, Milliseconds, FramesPerJoule.

Tests: SessionSummaryViewModelTests (every new card with values, a pre-beta.14 row at N/A, the displayed low),
RenderScaleAndClocksTests (scale arithmetic, steps, flat line, limit runs, both charts drawn on the STA thread),
TrendSeriesBuilderTests, CompareViewModelTests (labels and bests), FormatsTests, GameDetailViewModelTests (Latency tab),
ChartMathTests (the clocks plot's colours too).

Docs: 08_UI (summary, trend, compare, latency), 03_METRICS (render scale over time), legal/ACCURACY.md (one bullet, mirrored
into README and DISCLAIMER by accuracy-check; Disclaimer version unchanged as in beta.13), guide/03-read-your-results,
LIMITATIONS, CHANGELOG. Strings en/vi, ja marked for review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 04:58:54 +07:00
116 changed files with 4686 additions and 409 deletions

No files matched your search

+110
View File
@@ -28,6 +28,109 @@ 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
against real data without touching your own. Such a window starts and contacts no Agent, records nothing and changes
nothing on the PC — the controls that would are disabled, and a banner says whose data it shows. It refuses
FrameLedger's own folder.
### Fixed
- **The anti-cheat check could scan a program that had nothing to do with the game**: Windows reuses process numbers, and
once a game's launcher had closed, the check followed its number to whatever program held it now — a protected one
refused the session, one carrying anti-cheat turned the game's measuring off for good. A program started after the game
is no longer taken for its launcher, nor one started before the game for its child; when FrameLedger cannot read when a
program started, it still scans it, as before.
- **A game started again within a few seconds of closing was not recorded**: while FrameLedger was still saving the
session that had just ended, the new start was turned away ("one session at a time") and never looked at again. It is
recorded now, as soon as the session before it is saved — unless the game's other processes are still running beside
it, as a multi-process game's helpers are.
- **A game started through its launcher was never followed to the game itself** (the Agent's `--console launch`): when
the launcher exited or never drew a frame, FrameLedger was to find the game the launcher had started and record it, and
it never did — the launcher's process id was not passed on, so the search stopped before it began. It is passed on now,
and a launch that ends without one says so in the log.
- **After a change of language some text stayed in the old one** until FrameLedger restarted: the theme and update-channel
lists in Settings, the log and level lists on the Logs page, the sort order on the Games page, the tray icon's menu and
the Agent's status in the title bar. They follow the language at once now.
## [0.1.0-beta.14] - 2026-10-06
**The fourteenth pre-release: a wheel that scrolls, updates that find this channel and wait for your games, crashes told
apart from memory reports, and new measurements.** The same unsigned installer: verify its hash against
`SHA256SUMS.txt`, then *More info → Run anyway*. What changed for a user:
- **The mouse wheel scrolls every page, dialog and chart**; over a chart the wheel scrolls the page and **Ctrl+wheel**
zooms the chart. **Settings ▸ Window ▸ Hide scroll bars** draws no bar and still scrolls. The import list is readable
in the dark theme.
- **Updates come from the channel of the copy you run** — a beta looks for betas — and are never applied on their own
when the App starts; restarting to update waits while a game FrameLedger measured is still running, and says so.
- **A game that crashed reads *crashed*, and only then**: a Windows memory report about a game no longer counts as a
crash, and an Unreal Engine game that opens its crash reporter and closes is recorded as crashed, the reporter named.
- **A game starting up or closing during FrameLedger's anti-cheat check** is read again once instead of refused, and a
check that could not read a game that had already closed ends the session as the game's own exit.
- **New in every session's summary**: time below 30 and 60 FPS and below the monitor's refresh rate, how even the frames
were, VSync and tearing, the graphics card's clocks, fan and memory temperature, how much of the time its power limit
or heat held it back (NVIDIA), frames per watt, and a render scale chart. Trend and Compare have them too.
- **FrameLedger's own programs say what they are** in Explorer and Task Manager (*FrameLedger Agent*).
**Updating from `0.1.0-beta.13`:**
1. **First choose *Beta* in Settings ▸ Updates.** beta.13 looks for stable releases by default, and every release so far
is a pre-release, so it finds nothing until you do. From beta.14 on the channel follows the copy you run.
2. **Update with no game running.** beta.13 still applies a downloaded update the next time the App starts, stopping the
Agent to do it; beta.14 no longer does.
3. **The database is migrated in place** (schema 0019, new columns only). An earlier version cannot open it afterwards.
4. Sessions already stored keep their status — a few may still read *crashed* because Windows logged a memory report
about the game. The Privacy Policy (version 2.7) is shown once for you to accept.
### Added
- **Settings ▸ Window ▸ Hide scroll bars.** No scroll bar is drawn anywhere in the app while it is on, and everything
@@ -46,6 +149,13 @@ numeric core and does not move; the heading is the full version — corrected 20
The session's sensor statistics table shows the new card readings in their own units. The database is migrated in
place (schema 0019), and an earlier version cannot open it afterwards.
- **Where the new measurements are shown:** the session summary has a card for each (the 1% low card also shows the
displayed frames' 1% low when frame generation was counted, beside the game's own), a **Render scale** chart — the
share of the screen's resolution the game rendered at, over the session — and a **Clocks and fan** chart under
Sensors, with the moments the card was held back shaded; the card's memory temperature joins the temperatures chart.
A game's **Trend** has nine more metrics and **Compare** nine more rows, where a figure taken over presents says
*(presented)* beside one taken over the game's own frames. The **Latency** tab is shown only for a game with a session
that measured latency — none does yet.
### Fixed
+3 -1
View File
@@ -113,7 +113,9 @@ src/
# is built as of 2026-09-14 (PR-5 Games/Dashboard, PR-6 summary +
# charts, PR-7 trend/compare, PR-8a Settings/safety notices/Logs/
# --diag, PR-8b tray + the Agent's maintenance flags, PR-9 first run
# + Legal Gate FR-11); Strings.resx en/vi/ja
# + Legal Gate FR-11); Strings.resx en/vi/ja. `--data-dir <copy>`
# (beta.15, D52) = a VIEWER: no Agent started or contacted,
# nothing on the PC changed, the profile's own folder refused
FrameLedger.CaptureHost/ # UNSHIPPED, and since P2 PR-C (2026-09-09) a THIN SHELL: verbs,
# the operator disclosure, the report consumer, and the composition
# of Application.Capture.CaptureSession over Infrastructure's
+5
View File
@@ -27,6 +27,11 @@ That is the whole quality gate, and continuous integration runs the identical sc
checks (licences, the accuracy blocks, the licence headers, the changelog rules, …). `docs/12_BUILD.md` describes each
step and the build profiles. Run it in your main checkout: a fresh `git worktree` cannot configure the native build.
Never point a build of your own at the data FrameLedger records into (`%LOCALAPPDATA%\FrameLedger`): a newer build
migrates the database, and the released one cannot read it back. To look at real data, copy the folder and start
`FrameLedger.exe --data-dir <copy>` — a viewer that starts no Agent and changes nothing on the PC (`docs/12_BUILD.md`
§Debugging says how to copy it safely).
## What a pull request brings with it
The definition of done is the one in `CLAUDE.md`:
+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>
+3 -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.13.*
*Beta software: this page describes version 0.1.0-beta.16.*
## Games it will not measure
@@ -74,6 +74,8 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
## Upscaling and ray tracing
- **The render scale chart** (since 0.1.0-beta.14) is drawn only where the render resolution was measured — the
same games as *Render → output resolution* in the accuracy statement; elsewhere it says it was not measured.
- The upscaler is read from the game's calls: DLSS and NIS through NVIDIA Streamline, and FSR through AMD's
FidelityFX libraries. **Intel XeSS is not read** (its licence forbids it), FSR 2 and upscalers built into the
game are not identified, and Vulkan and OpenGL games read N/A. Where no hook saw DLSS but the NVIDIA driver
+12 -4
View File
@@ -9,8 +9,8 @@ anti-cheat, and look after your data, a page each. What FrameLedger cannot do is
[Limitations](LIMITATIONS.md). Both are in the app too (Help ▸ User guide, Help ▸ Limitations).
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-10-04.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.13`** (2026-10-04), an unsigned installer built from that tag with its
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
> **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
@@ -73,6 +73,14 @@ anti-cheat, and look after your data, a page each. What FrameLedger cannot do is
> and charted. **Not measured at all:** the video-memory budget Windows gives a game, which frame
> spikes were shader compilation, PC latency (Reflex), and HDR. Stutter count and stutter time are
> measured from frame times.
> - **Pacing, VSync and the graphics card (since beta.14):** the share of the time below 30 FPS, below 60 FPS and below
> the monitor's refresh rate, measured from frame times with small margins so that a game held at its limit is not
> counted as below it (a rate less than 2 % under the line reads partly as at it), and how much one frame's time
> differs from the next; for Direct3D titles, how many frames asked to wait for the display and how many allowed
> tearing — what the game asked, not what the driver did; the graphics card's clock speeds, fan speed and memory
> temperature in every session, and, on NVIDIA cards only, how much of the time its power limit or its temperature held
> it back, read once a second; and frames per watt — the game's own frames per second for each watt the graphics card
> drew, never counting generated frames, `N/A` where the game's own frame rate is not known.
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
> frequency-scaled figure Task Manager draws) and how much system memory was in use, read from
> Windows once a second and charted. Processor temperature is read only when the Agent runs as
@@ -153,7 +161,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
## Install
> **The latest pre-release is `v0.1.0-beta.13` (2026-10-04); before it `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**.
@@ -200,4 +208,4 @@ GPU telemetry is layered so the project never depends on a proprietary vendor li
---
**Status:** pre-release (beta). Thirteen 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.
+4
View File
@@ -138,6 +138,10 @@ tmp\<sessionGuid>.partial crash-safety flush of raw buffers, every 60 s (04_C
covers\*.jpg (corrected 2026-10-04: never created — nothing writes games.cover_path)
```
*(beta.15, D52: `FrameLedger.exe --data-dir <folder>` reads a COPY of this folder instead — a viewer that starts and
contacts no Agent and changes nothing on the PC, with its own `logs\` and `crashdumps\` beside the copy; `08_UI` §Shell.
The profile's own folder is refused there.)*
## Key design decisions (ADR)
- **ADR-1 (superseded):** ~~Passive ETW only; injection out of scope.~~ Replaced by ADR-7.
+6
View File
@@ -640,6 +640,12 @@ Tier 2 has none of this: `upscaler = unknown`, ratio `N/A`.
> bookkeeping is per process, not per settings change. **Nothing native changed and no NGX hook was added**: the
> licence bar in `20_OPEN_QUESTIONS` stands.
**The render scale over time (beta.14, D49).** The session summary draws `100 × √(render pixels / output pixels)` — the
per-axis scale, `100 / upscale_ratio` — as steps over the session: from the `render_res` blob where the resolution
varied (the finalizer stores it only then), a flat line at the row's extent where it did not, and a sentence where the
upscaler's parameters were never measured (`App.Charts.RenderScaleSeries`). The Trend and Compare read the row's
`upscale_ratio`, the dominant extent.
## RT / PT / RR — evidence-based tri-state
Tri-state `Yes | No | N/A` per session with `source` (`measured | manual | inherited`).
+12 -1
View File
@@ -154,7 +154,13 @@ which makes the notification more important than it was, not less.
> row's path with its drive letter changed (an RPG Maker `Game.exe` has the same bytes in every game); and the
> running-session table is keyed by the executable's path, so a re-imported or merged entry's new id cannot start a
> second session for the same executable. The launch election registers its session there too, and skips a child the
> watcher already records. **Behaviour change:** a game whose folder moved (not its drive letter) records nothing until
> watcher already records. *(beta.15, 2026-10-06:)* a process turned away by that rule — "one at a time" — was never
> recorded, because the watcher reports a pid once: **a game started again while its last session was still finalizing**
> (the driver profile, a crash reporter waited for, the transaction — seconds) got no session at all. The orchestrator
> now remembers the newest such process per executable and starts its session when the running one ends, if that one
> ended on its own (not cancelled with the host), the process is the same (pid and start time) and it is then the
> executable's ONLY process — a helper of a game still running has the game beside it and stays turned away, as before
> (`CaptureOrchestratorTests`: the restart recorded, the helper not, a process that left meanwhile not). **Behaviour change:** a game whose folder moved (not its drive letter) records nothing until
> *Change executable* points its entry at the new file. `ProcessTree` reads ppid chains with the one rule that defeats pid
> reuse: a child that started before its parent is not its child. `DescendantElection` picks the newest-started
> descendant whose image is tracked — a launcher's consent does not extend to what it spawns, so the elected image
@@ -208,6 +214,11 @@ which makes the notification more important than it was, not less.
> that spawns the real game and quits lands on the first, and re-electing the descendant is the Agent's
> (P2, §Process watcher) — **built 2026-09-10 (PR-F)**: the Agent's `--console launch` hands either
> answer to `DescendantElection` and runs an attach-mode session against the newest tracked descendant.
> *(Corrected 2026-10-06, beta.15: **it never ran until beta.15.** The refused outcome carried no `TargetPid`, and
> `CaptureOrchestrator.ElectAfterLaunchAsync` returned at `TargetPid == 0` — before its own `election:` log line — on every
> launch since #150; the orchestrator's tests built the outcome by hand, pid included, so nothing saw it. The refused
> outcome carries the launcher's pid and exit code now (`CaptureSessionLaunchTests` pins it), and an outcome without
> one is logged rather than silent. A real launcher run is still owed: HANDOFF, owner-only.)*
> **The host never terminates what it launched**: any refusal after the start
> leaves the title running unhooked, which is Tier 2.
>
+74 -5
View File
@@ -19,6 +19,19 @@ WPF + **WPF UI (Wpf.Ui, Fluent)**. Shell = `ui:FluentWindow` with custom `ui:Tit
status: Agent state shown as a pill in TitleBar trailing content + Dashboard card
```
> **A viewer over a copy, beta.15 (owner decision D52).** `FrameLedger.exe --data-dir <folder>` opens the ledger in
> `<folder>` — a COPY of a data folder — and keeps its log and crash dumps beside it. It starts and contacts no Agent: the
> pipe is one per user, and the Agent behind it records into the profile's ledger, so a request carrying the copy's game
> ids would act on other games (a consent written for the wrong one is rule 1's failure). Its composition holds no pipe
> client, no launcher, no update check and no Run-entry writer (`Services.MachineFacingServices`,
> `ViewerModeTests`); the pill reads *Viewer — no Agent*, a persistent InfoBar names the folder, and every control that
> would ask the Agent or change the PC is disabled — hooking, the exception's grant and withdrawal, re-enabling, Delete
> all sessions, the kill switch, the admin mode, the logon task, the Vulkan layer, Start with Windows, the automatic
> update check, Help ▸ Check for updates, Tools ▸ Update detection rules and the tray's Pause. The profile's own folder
> is refused however it is spelled (case, separators, a relative path, a junction), as is a folder that does not exist;
> a refusal is a message box and exit 2. The viewer's folder is its own single-instance key, so it runs beside the
> profile's App. D6 is unchanged: the Agent's `--data-dir` stays under `--console`.
**NavigationView items:** Dashboard · Games · Compare · Logs — `Settings` lives in `FooterMenuItems`. Icons from `SymbolIcon` (Fluent System Icons; pick from the `SymbolRegular` enum — see 16 §Icons).
**Menu bar**
@@ -399,7 +412,14 @@ All screens are `Page`s registered with the navigation page provider and navigat
> per-present `vram_proc` (a held 1 Hz sample) and~~ the adapter-wide `vram_adapter` sensor ~~as two
> differently-labelled series~~ (corrected 2026-10-03: the Overlay never produced `vram_proc`, so the game's line was
> never drawn on any session; beta.12's two memory plots are described above). **Latency**: the `latency_us` blob with the stored avg / p95 lines, shown only
> when Reflex reported (`reflex_active`); otherwise the tab says so.
> when Reflex reported (`reflex_active`); otherwise the tab says so. **Since beta.14 the tab itself is shown only when one
> of the game's sessions measured latency** (`GameDetailViewModel.AnyLatency`): nothing measures Reflex today, and a tab
> that could only say "no data" was noise.
>
> **Trend, beta.14 (D49):** nine more metrics — *Time below 60 FPS %*, *Display under refresh rate %*, *Frame to frame
> ms*, *Render scale %* (`100 / upscale_ratio`), *VSync share %* and *Frames per watt* from hooked sessions; *Avg GPU core
> clock MHz*, *Max GPU memory °C* and *Held back by power limit %* from every session's telemetry. Each has its own unit
> (ms, MHz and FPS/W are new axes); a session recorded before beta.14 has no point (`TrendSeriesBuilderTests`).
>
> **Trend, corrected 2026-09-25 (beta.8, owner item 6: "does Trend really work?").** It did not, on first open: the
> view model started loading before the page existed, and a load that finished first raised `TrendPresented` to nobody
@@ -431,6 +451,29 @@ All screens are `Page`s registered with the navigation page provider and navigat
### Session summary (secondary `FluentWindow`, also the post-session toast target)
Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutter %, duration, **Display** — beta.10: the mode shown longest with its share and the window's size, both tiers; **VRAM (this game)** and **RAM (this game)** — beta.12: the median with the peak beneath, both tiers), **Statistics per series** (beta.12: every stored series' mean / median / minimum / peak), TriState chips, API/PresentMode/upscaler line, **the display line** (beta.10: every mode's share, the changes, the window on its monitor at its refresh rate, the back buffer and swap effect, and what the facts rested on — "the swap chain said whether it was exclusive" or "from the window alone: exclusive fullscreen cannot be told from borderless"; absent for a session recorded before), crash `InfoBar` (Severity=Error) when `crashed`, frametime chart, sensor strip, tags/notes editor, Export buttons.
> **beta.14 (D49): the new measurements, as cards and charts.** The cards come in three methods (`AddFrameCards`,
> `AddPacingCards`, `AddMachineCards`), every value read from the row — never recomputed — and N/A on a row written before
> beta.14:
> - **Time below 60 FPS** with *below 30* and *display under {refresh} Hz* beneath it — the refresh share named for the
> display because it is over the presents the display received (`03_METRICS` §Pacing) — and **Frame to frame**; both
> carry *(presented)* where the session's statistics are over presents, as the lows do.
> - **VSync** (*{share} of frames*, with *tearing allowed* beneath), **Ray tracing** (*{share} of frames* and rays per
> pixel — the card appears only where ray tracing was measured), **Game in focus** (foreground ticks over drain ticks)
> and **Capture quality** (gaps · lost records · faults).
> - The **1% Low** card carries *displayed: {presents' 1% low}* beneath it where frames were generated (rule 6: beside the
> game's own, never instead of it).
> - **GPU clocks** (core · memory, with fan and memory temperature beneath), **GPU held back** (power · heat, NVIDIA only)
> and **Frames per watt** (*the game's own frames, GPU power only*).
>
> Charts: **Render scale** under Distribution (`Charts/RenderScaleChart` over `RenderScaleSeries`: `100 × √(render pixels /
> output pixels)` as steps — from the `render_res` blob where the resolution varied, a flat line at the row's extent where
> it did not, and a sentence where the upscaler's parameters were never measured), and on **Sensors** the card's memory
> temperature on the temperatures plot (its own palette colour, `Chart_SensorTertiary`: no existing one was 60 apart from
> all six beside it) and a fourth plot, **Clocks and fan** — core and memory clock in MHz, the fan in RPM on the right, and
> the ticks its power limit or heat held it back shaded behind them; collapsed when the session stored none of these.
> Tests: `SessionSummaryViewModelTests` (the new cards, a row before beta.14 at N/A, the displayed low),
> `RenderScaleAndClocksTests`, `ChartMathTests`.
>
> **Built 2026-09-14 (P3 PR-6).** `Windows/SessionSummaryWindow` (a secondary `FluentWindow` with its own
> `ContentDialogHost`), opened from a Sessions-tab row (double-click or Open) and from the Dashboard's recent
> list. Stat cards read the STORED aggregates — never recomputed — with the lows labelled *(presented)* when
@@ -535,6 +578,13 @@ Session picker (2–5, cross-game allowed) → overlaid percentile curves + stat
>
> **beta.10:** three rows after Duration — *Display mode* (every share), *Window* and *Monitor* (with its refresh
> rate) — facts, not scores: no mode is better than another, so none is ever marked best, and every tier has them.
>
> **beta.14 (D49):** *Time below 60 FPS* and *Frame to frame* (lower is better), *Display under refresh rate* (lower is
> better), *VSync share* and *Render scale* (settings: no best), *Avg GPU core clock* and *Held back by power limit*
> (facts: no best), *Max GPU memory °C* (lower) and *Frames per watt* (higher). **A statistic a present-only session has
> over its presents carries *(presented)* in its cell** — the median, the lows, stutter, time below 60, frame to frame —
> beside a session whose same statistic is over the game's own frames; the best is decided on the number, never the label
> (`CompareViewModel.Row`'s label, `CompareViewModelTests`).
### Logs
Tail view of `ui-*.log` / `agent-*.log` (toggle), level filter, search (`ui:AutoSuggestBox`), pause-scroll; buttons: Open logs folder, Export bug bundle (routes to 10_LOGGING flow).
@@ -554,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*
@@ -771,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
+6
View File
@@ -17,6 +17,12 @@ Languages: **en** (neutral/default) · **vi** · **ja**. Same `.resx` pattern as
- One `Strings.resx` (+ `Strings.vi.resx`, `Strings.ja.resx`) per assembly that has user-visible text (`App`, `Shared` ~~for error codes~~ for the safety family, the `Safety_*` keys — corrected 2026-10-04). Access through a generated strongly-typed class; **no string literals in XAML/C# for user-visible text** (analyzer TODO: Meziantou MA0011/manual review in PR checklist). **As built (P3 PR-2, 2026-09-13):** the class is `Strings.Designer.cs`, written by `tools/resx-gen.ps1 -Resx <file>` and **committed** — not the SDK's `ResXFileCodeGenerator`, which the SDK-style WPF project does not run — with `Culture`, `ResourceManager`, `Keys`, and one property per key; the audit below fails when it is stale. The first family is `src/FrameLedger.App/Strings.resx` (65 keys); `Shared`'s arrives with PR-4's `Safety_*` text, because an empty family is what the audit refuses.
- XAML binding via `{x:Static res:Strings.Key}` ~~plus a `LocalizeExtension` for the few dynamic cases~~ *(corrected 2026-10-04: no `LocalizeExtension` exists; text that varies is composed in the view model from `Strings.*`)*.
- **Runtime switching:** setting change → set `CultureInfo.CurrentUICulture` + `Thread` defaults → re-create the main window shell (cheap; state preserved via VM). Persist in `settings`.
**Two kinds of text did not follow, until beta.15:** a list of choices built once in a static (Settings' themes and update
channels, the Logs page's two lists, the Games page's sort order — `x:Static` read the list built in the language the
App started in), and the singletons that outlive the rebuilt window (the tray's menu, the title bar's Agent pill and the
update banner). The lists are per page now, bound through the view model; the singletons implement
`ILanguageFollower`, which `ShellHost.Rebuild` calls once the new window is up. `LanguageFollowingTests` refuses a new
static list of labelled choices — the language list, each language in its own words, is the one exception.
- `SatelliteResourceLanguages` = `en;vi;ja` in ~~the App csproj~~ `Directory.Build.props` (corrected 2026-10-04) to keep publish size down.
## Key conventions
+2
View File
@@ -3,6 +3,8 @@
## Serilog configuration
- Sinks: rolling file per process — `logs/ui-.log`, `logs/agent-.log` (`rollingInterval: Day`, `retainedFileCountLimit: 7`, `fileSizeLimitBytes: 10 MB`, `rollOnFileSizeLimit: true`). Console sink in DEBUG builds. *(`ui-.log` is written since 2026-09-13, P3 PR-2, with `Process=ui` enriched and every unhandled path — Dispatcher, AppDomain, unobserved task — logged as Fatal/Error; ~~the crash dialog and minidump of §Crash handling are still P4's~~ — built 2026-09-15, P4 PR-9, §Crash handling's note.)*
- *(beta.15, D52: an App started with `--data-dir <copy>` — a viewer — writes `ui-.log` and its crash dumps under the
copy, never under `%LOCALAPPDATA%\FrameLedger`; its first lines name the folder and say it is a viewer.)*
- Minimum level `Information` (`Debug` toggle in Settings → applies live via `LoggingLevelSwitch`).
- ~~Enrichers: process name, version, `SessionGuid` and `GamePid` scoped properties during capture (`LogContext.PushProperty`).~~
- Template: `[{Timestamp:HH:mm:ss.fff} {Level:u3}] {SourceContext} {Message:lj} {Properties:j}{NewLine}{Exception}`.
+3
View File
@@ -6,6 +6,9 @@ Velopack, feeding from GitHub Releases of `https://github.com/poli0981/frameledg
- **Startup silent check** (if enabled): `UpdateManager.CheckForUpdatesAsync()` 5 s after UI idle. Offline/any failure → log `Information`, no dialog (NFR-10). Update found → non-blocking toast "Update vX.Y.Z available" → Downloads in background → "Restart to update" button (never auto-restart; the user may be mid-capture — if a capture is active, defer the prompt until session end).
- **Manual check** (Help → Check for updates): progress dialog; all failures produce the mapped dialog below.
- **A viewer never updates** (beta.15, D52): an App started with `--data-dir <copy>` registers neither Velopack nor the
startup check (`Services.MachineFacingServices` gives it `ViewerUpdateClient`, which answers "not installed"), and
Help → Check for updates and the automatic-check switch are disabled — an update replaces this PC's installed copy.
- **Never apply an update while a game is hooked** (FR-12): the Overlay DLL on disk must not change under a running game, and a mid-session swap would invalidate the ring layout handshake. If a capture is active, defer the prompt and the apply until the session ends.
- Apply: `WaitExitThenApplyUpdates` on restart. Agent is stopped via `Shutdown` before applying and the scheduled task action path is re-validated after update (Velopack keeps a stable `current` path, but verify in P4 and re-register task if the action path changed).
- Release notes (GitHub release body, Markdown) rendered in the update dialog. ~~(shown as plain text until beta.12 — §Flow and §Limits below said so)~~ **Rendered since beta.12** by `Controls/MarkdownView` (`08_UI` §Menu, *Documents are rendered*), relative links resolved against `CHANGELOG.md` at this build's source.
+9
View File
@@ -75,6 +75,15 @@ implemented. What exists: `FrameLedger.exe` starts `FrameLedger.Agent.exe --serv
harness, run `hook-harness.exe --real --hold-presenting N`, then the Agent's `--console --data-dir <scratch>` verbs
`consent grant --exe` and `capture --exe`, as `AgentEndToEndTests` does — never against your own data folder.)*
**To look at real data with a build of your own (beta.15, D52): `FrameLedger.exe --data-dir <copy>`.** Make the copy with
SQLite's online backup, which is consistent while the Agent writes — in Python,
`sqlite3.connect("file:C:/Users/<you>/AppData/Local/FrameLedger/ledger.db?mode=ro", uri=True).backup(sqlite3.connect(r"<copy>\ledger.db"))`
— or copy the whole folder with every FrameLedger process stopped
(closing the App does not stop the Agent). The App opens the copy, migrating it if your build is newer, which is exactly
why it must be a copy, and writes its log and crash dumps beside it. It is a viewer: no Agent is started or contacted and
nothing on the PC is changed (`08_UI` §Shell). It refuses the profile's own folder however it is spelled, and a folder
that does not exist.
**Toolchain gotchas, both hit on a real machine and both handled by `build.ps1`:**
- **msys2 / MinGW on `PATH` breaks the native build.** `vcvars64` *prepends* to
+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.
+17
View File
@@ -104,6 +104,23 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
> inspected (`ERROR_ACCESS_DENIED`) refuses too — there is no "scanned what we
> could" state.
>
> **Amended 2026-10-06 (owner decision D51, beta.15): a parent link is followed only while creation times allow it.**
> The set is walked over one process snapshot, which links a process to its parent by pid alone, and Windows reuses
> pids. A launcher that exits after starting its game leaves the game naming a pid that may now belong to anything:
> until beta.15 the walk scanned whatever held it — a protected process refused the session as unreadable, a
> blocklisted one turned the game's hooking off for good — and a cycle of reused pids sent the same processes round
> again. A parent/child link is now cut **only when it is proven wrong**: both creation times read (`GetProcessTimes`,
> under the module scan's own read-only right) and the child created **before** the process whose pid it names as its
> parent, which no real child can be. A cut ancestor link ends the ancestor walk there; a cut child is not walked, nor
> is anything below it. A time that cannot be read keeps the link, equal times keep it, and each pid is walked and
> scanned once (`WalkScanSet`, `fl_guard_scanset.cpp`). Nothing else about the set moved: the launcher boundary, the
> depth (16 ancestors), the frontier (512 — one more refuses) and "a member that cannot be read refuses". **The
> residual:** creation times are wall-clock, so a clock set *backwards* between a parent's start and its child's makes a
> real link look wrong and drops that branch from the module check; the install-folder scan and the machine-wide driver
> and service checks do not depend on the tree. ctest `fl_guard` `[D51]` holds the walk against fixtures (a reused
> parent, an older "child", unread times, equal times, cycles, the limits) and the real source against a child this
> process starts.
>
> **One reviewed exception, decided 2026-08-03 and implemented 2026-08-04
> (§S18), then re-keyed the same day (§S22(b)).** A module that is FrameLedger's
> own does not trip the *fuzzy* fragment tier. The exact blocklist still applies
+6
View File
@@ -1813,6 +1813,12 @@ refuses too. Sibling *services* are covered by name via the rules data rather
than by tree walking, which is more reliable. The runtime re-scan recomputes the
set rather than caching it.
**Amended 2026-10-06 (D51, beta.15).** The set's parent links come from a snapshot that links by pid alone, and pids
are reused: the walk followed a launcher's pid after the launcher had exited and something else had taken it, and a
cycle of reused pids was walked round. A link is now cut only when creation times prove it wrong (the child created
before its named parent); an unread time keeps it, and each pid is walked once. `19_SAFETY` §Pre-injection checks item 1
carries the rule and its one residual — a clock set backwards between a parent's start and its child's.
<details><summary>The question as originally recorded</summary>
Found 2026-08-02. Not previously recorded anywhere, and it changes the guard's
+164 -4
View File
@@ -1204,7 +1204,8 @@ milestone must not wait on a new native target crossing every gate — it lands
(§G). **D5 — `FileGameConsentStore` is retired in B**; the CaptureHost writes a build-tree `ledger.db`
so the Agent stays the sole owner of `%LOCALAPPDATA%\FrameLedger`.
- **D6 — `--data-dir` exists only under `--console`** (F; `12_BUILD` §Debugging), so `--serve` can never
be pointed at a ledger that is not the Agent's own.
be pointed at a ledger that is not the Agent's own. *(beta.15, D52: the App gained a `--data-dir` of its own — a
viewer over a copy that starts and contacts no Agent; D6 itself is unchanged.)*
- *(Numbering, recorded 2026-09-13: D1, D5, D6 and D10 were cited by number from `CHANGELOG`, `04_CAPTURE`,
`12_BUILD` and `07_IPC` while this list carried them unlabelled — labels added above. **D2 and D3 were
never assigned**; the numbering skips them. Nobody needs to hunt for a missing decision.)*
@@ -1558,7 +1559,9 @@ và legal"), so the Legal Gate shows both once.
**Traps.**
- **A pid the watcher matched stays matched.** Switching recording off stops the session but leaves the process in
`ProcessWatcher`'s table, so switching it back on while the same process still runs starts nothing until it restarts.
A process the watcher never matched (off from the start) is picked up by the next poll.
A process the watcher never matched (off from the start) is picked up by the next poll. *(beta.15: one case of this is
fixed — a process turned away because its executable's session was still running is remembered and recorded when that
session ends, if it is then the executable's only process; 04_CAPTURE §Process watcher.)*
- **A migration that changes data needs its own rewind in a test.** `RewindSchemaAsync` leaves columns in place, so
`ScriptNineAddsTheRecordingSwitchOffForSteamToolsOnly` drops the column itself before re-applying 0009.
- **`SqliteGameRepository._columns` is read by ordinal** (`ReadMore`): a new column goes at the end of the list, and the
@@ -1869,7 +1872,7 @@ PR-7 the release.*
**Owner-only, added to the list below:** item 9.
## **START HERE** — 2026-10-04, the beta.13 train: the four follow-ups the beta.12 audit left
## ~~**START HERE**~~ — 2026-10-04, the beta.13 train: the four follow-ups the beta.12 audit left *(struck 2026-10-06: the head is §beta.14 below)*
*Status is `CHANGELOG.md` `[0.1.0-beta.13]`; this is what no other file carries. The owner asked (2026-10-04) for the
four chips the beta.12 documentation audit had left — §S23-3's wording, the App tests' culture races, L1's adapter, the
@@ -1904,6 +1907,138 @@ 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 *(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
by an engine's crash reporter (prevention; SILENT HILL 2 as the example), assembly metadata, new metrics and charts, and
a wheel that scrolls with an option to hide the scroll bars. Nine stacked PRs — PR-1 contrast and the wheel, PR-2 the
scroll-bar option, PR-3 the update audit, PR-4 the guard's retry, PR-5 crash classification, PR-6 assembly metadata,
PR-7 the metrics' Agent half (schema 0019), PR-8 their App half, PR-9 the release — plus one test fix (#268).*
**Decisions (owner, 2026-10-05, asked before the plan — do not re-ask):**
- **D47 — the update channel follows the running copy.** `update.channel` gained `auto`, the default: a pre-release
copy asks for pre-releases, a stable one for stable; an explicit *Stable* or *Beta* in Settings wins
(`Update/UpdateChannelPolicy`). Until beta.14 the default was `stable` and every release is a pre-release, so an
installed copy never found an update (the owner's own `velopack` log: "No releases found").
- **D48 — the guard's narrow fix, both halves.** A scan-set member still loading (`ERROR_PARTIAL_COPY`) or already gone
is read again once, ~250 ms later, before the guard refuses; still unreadable still refuses, and `ACCESS_DENIED` is
never retried. A refused re-scan for a could-not-read reason (`ProcessUnreadable`, `ModuleScanFailed`,
`ProcessTreeUnavailable` — never a finding) when the game itself had exited ends as the game's exit
(`ExitScanRelabel`, the note `scan_at_exit=`). CLAUDE.md rule 2 is unchanged: a failure still refuses.
- **D49 — all four metric groups.** The render scale over time; time below 30 / 60 / the refresh rate and frame to frame;
the facts the row stored and nothing showed (VSync and tearing, ray tracing's share, focus, capture quality, the
displayed 1 % low); the card's clocks, fan, memory temperature, limits, and frames per watt.
- **D50 — the managed binaries' identity.** Company and Product "FrameLedger", the copyright the native `FL_COPYRIGHT`
word for word; `versioninfo-check` reads both kinds and compares them.
**Traps met on the way:**
- **WPF UI 4.3.0 keys its DataGrid styles** (`DefaultDataGridRowStyle`) and defines no implicit row style: a `RowStyle`
`BasedOn="{StaticResource {x:Type DataGridRow}}"` falls through to Aero2's row and `SystemColors.WindowBrush` — white
under the dark theme's white text. Its `CheckBox` has `MinWidth` 120. Both in `16_WPFUI_SYNTAX` §Gotchas now.
- **`NavigationViewContentPresenter` makes a `Page`'s `CanContentScroll` true and wraps it in its own scroller**; a page's
own root `ScrollViewer` is then measured unbounded, has nothing to scroll, and still marks every wheel handled. ScottPlot
never marks the wheel handled.
- **`Keyboard.Modifiers` is the machine's real keyboard, from any thread** (a fresh background thread's `GetKeyState`
reported the machine's NumLock): a local gate went red on the chart-wheel test while a Ctrl was held. A test that sends
input sets the keys itself (`ChartWheel.CurrentModifiers`, #268).
- **Velopack 1.2.0 applies a downloaded update at the next start by default** (`SetAutoApplyOnStartup`), before FR-12's
check and with the Agent killed; `VelopackHooks` turns it off and a pending package is adopted instead.
- **The plain "time below X" rule fabricates drops**: a game capped at 60 read 50.0 % "below 60" from present-timing
jitter (measured on a copy of the owner's ledger); a rolling mean does not help. The margins of `FramePacing` and what
they cost are in `03_METRICS` §Pacing.
- **A WER 1001 is not a crash by its number**: `RADAR_PRE_LEAK_64` is Windows' memory-leak detector, and a substring match
on the executable's name stored an ordinary The Witcher 3 session as crashed. `CrashEventMatcher` reads the event name
and the typed process id.
- **No chart palette colour was 60 apart from all six on the temperatures plot** — `Chart_Histogram` equals
`Chart_Native` — so the seventh line got a key of its own (`Chart_SensorTertiary`); `ChartMathTests` caught it.
- **Meziantou's MA0051 (60 lines, 40 statements) split** `FrameTimeSeries`'s two builders into one `Kept` accumulator,
the summary's cards into three methods and Compare's rows into two; `dotnet format` wants one property per line in an
object initializer, even in a test.
- **The `fl_ring` anti-vacuity flake** (§Traps) fired on #264's CI and passed on the re-run, as written.
- **`git describe` is 31 characters ten commits after a tag** (`v0.1.0-beta.13-10-g15ec7c1c5fd4`) — the most
`FlShmHandshake.buildId` holds. `ShmHandshakeValidatorTests` appended `"x"` to the id for its mismatch case, the helper
cut it back to 31, and the check read `Ok`: red from the tenth commit after every tag, locally and on CI (#273 uses
another id of the same length).
- **"The job was not acquired by Runner of type hosted even after multiple attempts"**: with seven CI runs in flight a
queued Windows job was cancelled after ~15 minutes, twice, without a step having run. Nothing in the code; re-run the
job when fewer runs are queued.
- **The Privacy Policy 2.7 holds the merge of PR-5 and PR-7**: their wording (§4 the crash reports and the programs a
game starts, §1 the card's sensor series) is the owner's to approve before they land, as the plan said.
**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
@@ -1968,6 +2103,29 @@ than N/A (`FlShmHandshake.AdapterLuid`'s own comment), and a finding on the PC i
running for any game, start a hook-enabled game — the notice says the anti-cheat is running on this PC, not in
the game. (c) **Two graphics cards**, if a machine with them is at hand: the Sensors chart's GPU figures are the
game's card. (d) The `ja` review of the new safety strings, with the others still marked for it.
11. **beta.14 on real hardware.** (a) **The update from beta.13:** choose *Beta* in Settings ▸ Updates, Help ▸ Check for
updates, then *Restart to update* with no game running; Settings then reads *Automatic (Beta)*. The `velopack:` lines
in `ui-*.log` say what was downloaded — a delta of about 2 MB; say so if it was the full package. (b) **Explorer ▸
Properties ▸ Details** of `FrameLedger.exe` and `FrameLedger.Agent.exe` name FrameLedger and the copyright; Task Manager
lists *FrameLedger Agent*. (c) **The wheel** on every page, the dialogs and the summary window; over a chart the wheel
scrolls the page and Ctrl+wheel zooms; the Logs page follows the newest line. (d) **Hide scroll bars** on and off,
without a restart. (e) **The import list in the dark theme**, and Compare's tick boxes. (f) **A crash**: an Unreal game
that crashes reads *crashed (… CrashReportClient.exe)*; The Witcher 3 closed normally no longer reads *crashed*. (g)
**The new measurements** on the RTX 5080: the VSync share against the game's own VSync setting, the render scale
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
@@ -2002,7 +2160,9 @@ diagnosis*.
sessions` against `%LOCALAPPDATA%\FrameLedger\ledger.db` applied two migration scripts, because every verb opened
through the one migrating path. The print verbs open read-only now (`Program.PrintsOnly`; a schema older than the
build is refused, exit 7) — but the rule that outlives the fix is: **nothing from a session is run against the
owner's data directory unless the owner asks for exactly that**; `--data-dir` exists for everything else. The same
owner's data directory unless the owner asks for exactly that**; `--data-dir` exists for everything else — and since
beta.15 for the App too (`FrameLedger.exe --data-dir <copy>`, a viewer, D52), so a UI change can be looked at over a
copy of the owner's ledger made with SQLite's backup (`12_BUILD` §Debugging). The same
day's ledger held a whole day of rows only in a WAL a fresh connection discarded (`06_DATA_MODEL` §Migrations
carries the shape); if `ledger: wal at open` in `agent-*.log` or `ui-*.log` reports frames that a passive checkpoint
did not move while no other FrameLedger process is running, stop and read that note before touching the file.
+3
View File
@@ -2531,6 +2531,9 @@ then elects the newest tracked descendant and attaches.
spawns — so the run is: `consent grant` the launcher, `launch` it, read the `election:` line, then
`consent grant` the game the election named and `launch` again.
*(2026-10-06, beta.15: before beta.15 the `election:` line could not appear — the launch's refused outcome carried no
launcher pid and the election returned before it logged anything. Run this table on beta.15 or later.)*
| | |
|---|---|
| Title / launcher | |
+12 -2
View File
@@ -18,6 +18,14 @@ A value FrameLedger could not measure reads **N/A** — never 0, and never an es
- **1% low** and **0.1% low** are the frame rate of the slowest 1% and 0.1% of frames: the further they fall below the
average, the less smooth the game felt. **Stutter** counts frames that took much longer than the frames around them,
and the share of time they took.
- **Time below 60 FPS** (with *below 30* and *display under* your monitor's refresh rate beneath it) is how much of the
session ran slower than that. A game held at its limit is not counted as dropping below it for the tiny wobble every
frame limit has. **Frame to frame** is how much one frame's time differs from the next: lower is smoother.
- **VSync** is how many frames asked to wait for the display, and *tearing allowed* how many did not mind tearing — what
the game asked; your graphics driver can still override it.
- **GPU clocks**, the fan and the video memory's temperature are the card's own readings. **GPU held back** says how much
of the time its power limit or its temperature slowed it down (NVIDIA cards only). **Frames per watt** is the game's
own frames per second for each watt the graphics card drew — generated frames never count.
## Memory
@@ -38,8 +46,10 @@ correct it by hand — your correction is labelled as yours.
- **Frametime** — how long each frame took. Spikes are stutters.
- **Distribution** — how often each frame rate occurred.
- **Sensors** — temperatures, load and power; video memory; memory. The game's own line and the whole card's or the
whole PC's are drawn separately.
- **Render scale** — the share of the screen's resolution the game rendered at before upscaling (100% means no
upscaling), and when it changed.
- **Sensors** — temperatures, load and power; video memory; memory; and the card's clocks and fan, with the moments it
was held back shaded. The game's own line and the whole card's or the whole PC's are drawn separately.
- **Trend** (on the game's page) — one point per session over time, for example before and after a driver update.
Changes to your hardware or driver are marked on it.
- **Compare** (in the navigation on the left) — pick sessions, even of different games, and see them side by side.
+10 -2
View File
@@ -11,8 +11,8 @@
that changes what FrameLedger.Overlay or the capture host does; date the change.
HTML comments are not part of the block.
-->
> ⚠ **What FrameLedger actually measures today — 2026-10-04.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.13`** (2026-10-04), an unsigned installer built from that tag with its
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
> **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
@@ -75,6 +75,14 @@
> and charted. **Not measured at all:** the video-memory budget Windows gives a game, which frame
> spikes were shader compilation, PC latency (Reflex), and HDR. Stutter count and stutter time are
> measured from frame times.
> - **Pacing, VSync and the graphics card (since beta.14):** the share of the time below 30 FPS, below 60 FPS and below
> the monitor's refresh rate, measured from frame times with small margins so that a game held at its limit is not
> counted as below it (a rate less than 2 % under the line reads partly as at it), and how much one frame's time
> differs from the next; for Direct3D titles, how many frames asked to wait for the display and how many allowed
> tearing — what the game asked, not what the driver did; the graphics card's clock speeds, fan speed and memory
> temperature in every session, and, on NVIDIA cards only, how much of the time its power limit or its temperature held
> it back, read once a second; and frames per watt — the game's own frames per second for each watt the graphics card
> drew, never counting generated frames, `N/A` where the game's own frame rate is not known.
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
> frequency-scaled figure Task Manager draws) and how much system memory was in use, read from
> Windows once a second and charted. Processor temperature is read only when the Agent runs as
+10 -2
View File
@@ -113,8 +113,8 @@ Software running inside another process can, in principle, destabilize it. Frame
Frame timing is derived from high-resolution timestamps taken at the moment the game presents each frame; upscaling, frame-generation and ray-tracing state are read from the parameters the game passes to those APIs. This is substantially more accurate than inferring settings from files on disk, but **no measurement is guaranteed to be exact**:
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-10-04.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.13`** (2026-10-04), an unsigned installer built from that tag with its
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
> **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
@@ -177,6 +177,14 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> and charted. **Not measured at all:** the video-memory budget Windows gives a game, which frame
> spikes were shader compilation, PC latency (Reflex), and HDR. Stutter count and stutter time are
> measured from frame times.
> - **Pacing, VSync and the graphics card (since beta.14):** the share of the time below 30 FPS, below 60 FPS and below
> the monitor's refresh rate, measured from frame times with small margins so that a game held at its limit is not
> counted as below it (a rate less than 2 % under the line reads partly as at it), and how much one frame's time
> differs from the next; for Direct3D titles, how many frames asked to wait for the display and how many allowed
> tearing — what the game asked, not what the driver did; the graphics card's clock speeds, fan speed and memory
> temperature in every session, and, on NVIDIA cards only, how much of the time its power limit or its temperature held
> it back, read once a second; and frames per watt — the game's own frames per second for each watt the graphics card
> drew, never counting generated frames, `N/A` where the game's own frame rate is not known.
> - **Processor and memory:** how busy the processor was (time busy, all cores together — not the
> frequency-scaled figure Task Manager draws) and how much system memory was in use, read from
> Windows once a second and charted. Processor temperature is read only when the Agent runs as
+31 -35
View File
@@ -15,7 +15,6 @@ using FrameLedger.Application.Settings;
using FrameLedger.Application.Watch;
using FrameLedger.Infrastructure.Diagnostics;
using FrameLedger.Infrastructure.Import;
using FrameLedger.Infrastructure.Ipc;
using FrameLedger.Infrastructure.Persistence;
using FrameLedger.Infrastructure.Watch;
using Microsoft.Extensions.DependencyInjection;
@@ -78,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();
}
@@ -110,6 +110,10 @@ public partial class App : System.Windows.Application
_host = BuildHost(_db, appearance, registered, closePolicy);
await _host.StartAsync().ConfigureAwait(true);
Log.Information("ui: started ({Version}), ledger {Ledger}", UiIdentity.Version, UiPaths.Database);
if (UiPaths.IsViewer)
{
Log.Warning("ui: a VIEWER over {Folder} (--data-dir, D52): no Agent is started or contacted, nothing on this PC is changed", UiPaths.DataDirectory);
}
// A second start of the App hands over to this one: bring the window forward, from the tray too.
if (Instance is not null)
@@ -275,7 +279,9 @@ public partial class App : System.Windows.Application
builder.Services.AddSingleton(closePolicy);
builder.Services.AddSingleton<IThemeApplier, WpfThemeApplier>();
AddAgentLink(builder.Services);
// The Agent link, the Run entry, the Agent's maintenance flags and the updater: a viewer's composition holds none of
// them that reaches past its ledger (beta.15, D52).
MachineFacingServices.Add(builder.Services, UiPaths.Mode);
// FR-2.1 (P3 PR-4): the consent dialog and the request it ends in; the toggle that opens it is the game page's (PR-5).
builder.Services.AddSingleton<IConsentPrompt, ConsentPrompt>();
@@ -291,14 +297,7 @@ public partial class App : System.Windows.Application
AddLibrary(builder.Services);
// The shell: the window is TRANSIENT because a language change rebuilds it (09_I18N §Mechanics); the
// shell host tracks the live one. Pages and their view models are transient (16 §Navigation).
builder.Services.AddSingleton<ShellHost>();
builder.Services.AddSingleton<IShellPresence>(static sp => sp.GetRequiredService<ShellHost>());
builder.Services.AddSingleton<TrayViewModel>();
builder.Services.AddSingleton<TrayHost>();
builder.Services.AddTransient<MainWindow>();
builder.Services.AddSingleton<MainWindowViewModel>();
AddShell(builder.Services);
builder.Services.AddTransient<DashboardPage>();
builder.Services.AddTransient<DashboardViewModel>();
builder.Services.AddTransient<GamesPage>();
@@ -315,22 +314,21 @@ public partial class App : System.Windows.Application
return builder.Build();
}
/// <summary>The Agent over the pipe (07_IPC §Client behavior): connect, start it when it is not there, tell the shell.</summary>
private static void AddAgentLink(IServiceCollection services)
/// <summary>
/// The shell: the window is TRANSIENT because a language change rebuilds it (09_I18N §Mechanics); the shell host tracks
/// the live one. Pages and their view models are transient (16 §Navigation). The singletons that wrote their text once
/// read it again after a change of language (beta.15, <see cref="ILanguageFollower"/>, called by ShellHost.Rebuild).
/// </summary>
private static void AddShell(IServiceCollection services)
{
// The admin mode's prompt (beta.10) belongs to the main window; the handle is read when a start asks, never earlier.
services.AddSingleton<IAgentLauncher>(static sp => AgentLauncher.ForApp(() => sp.GetRequiredService<ShellHost>().Handle));
services.AddSingleton(static sp => new AgentConnection(
sp.GetRequiredService<IAgentLauncher>(),
static () => new PipeClient(),
new AgentConnectionOptions(),
UiIdentity.Version));
services.AddHostedService<AgentConnectionHostedService>();
services.AddSingleton<IAgentRequests>(static sp => sp.GetRequiredService<AgentConnection>());
services.AddSingleton<IAgentLink>(static sp => sp.GetRequiredService<AgentConnection>());
// What the Agent runs right now (2026-09-23), for the pages rebuilt on every visit; built before the connection's
// first round by AgentConnectionHostedService, so it never misses a session.
services.AddSingleton(static sp => new LiveSessions(sp.GetRequiredService<IAgentLink>()));
services.AddSingleton<ShellHost>();
services.AddSingleton<IShellPresence>(static sp => sp.GetRequiredService<ShellHost>());
services.AddSingleton<TrayViewModel>();
services.AddSingleton<TrayHost>();
services.AddTransient<MainWindow>();
services.AddSingleton<MainWindowViewModel>();
services.AddSingleton<ILanguageFollower>(static sp => sp.GetRequiredService<TrayHost>());
services.AddSingleton<ILanguageFollower>(static sp => sp.GetRequiredService<MainWindowViewModel>());
}
/// <summary>
@@ -363,9 +361,8 @@ public partial class App : System.Windows.Application
services.AddSingleton<ISessionWindows>(static sp => sp.GetRequiredService<SessionSummaryOpener>()); // beta.11: Delete all sessions closes them
services.AddSingleton<IMixedTierPrompt, MixedTierPrompt>();
// Settings, the safety notices and the Logs page (P3 PR-8a): the Run entry, the notices over the pipe's
// events, the tail and the bundle over the logs directory.
services.AddSingleton<IRunAtLogon, RunAtLogonRegistry>();
// Settings, the safety notices and the Logs page (P3 PR-8a): the notices over the pipe's events, the tail and the
// bundle over the logs directory (the Run entry is MachineFacingServices').
services.AddSingleton<SafetyNotices>();
services.AddSingleton(static _ => new LogTail(UiPaths.Logs));
services.AddSingleton(static sp => new BugBundleBuilder(UiPaths.Logs, sp.GetRequiredService<RegisteredSettings>(), crashDumpDirectory: UiPaths.CrashDumps, redactor: LogRedactor.ForCurrentUser()));
@@ -382,9 +379,9 @@ public partial class App : System.Windows.Application
AddImport(services);
// The layer registration and the logon task (P3 PR-8b): read from the machine, written by the Agent's flags.
// The layer registration and the logon task (P3 PR-8b): read from the machine, written by the Agent's flags
// (IAgentTool, MachineFacingServices').
services.AddSingleton<IMaintenanceState, MaintenanceState>();
services.AddSingleton<IAgentTool, AgentTool>();
AddUpdates(services);
@@ -401,15 +398,14 @@ public partial class App : System.Windows.Application
}
/// <summary>
/// The updater (P4 PR-5, <c>11_UPDATER</c>): Velopack behind the <see cref="IUpdateClient"/> port, the dialogs behind
/// <see cref="IUpdatePrompts"/>, the flow that holds FR-12, and the startup check as a hosted service.
/// The updater (P4 PR-5, <c>11_UPDATER</c>): the dialogs behind <see cref="IUpdatePrompts"/> and the flow that holds
/// FR-12. Velopack behind the <see cref="IUpdateClient"/> port and the startup check are MachineFacingServices': a
/// viewer has neither.
/// </summary>
private static void AddUpdates(IServiceCollection services)
{
services.AddSingleton<IUpdateClient, VelopackUpdateClient>();
services.AddSingleton<IUpdatePrompts, UpdatePrompts>();
services.AddSingleton<UpdateService>();
services.AddHostedService<UpdateHostedService>();
}
/// <summary>FR-1.2's library import (P4 PR-4): the stores, the executable guess, the importer over the games port, the review checklist behind a port.</summary>
+5 -2
View File
@@ -25,13 +25,15 @@ public sealed record ChartPalette(
Color SensorSecondary,
Color Segment,
Color Histogram,
Color Percentile)
Color Percentile,
Color SensorTertiary)
{
/// <summary>The keys both dictionaries must carry, in the record's order.</summary>
public static readonly IReadOnlyList<string> Keys =
[
"Chart_Figure", "Chart_Data", "Chart_Axis", "Chart_Grid", "Chart_Native", "Chart_Displayed", "Chart_Stutter",
"Chart_StutterPso", "Chart_Sensor", "Chart_SensorSecondary", "Chart_Segment", "Chart_Histogram", "Chart_Percentile",
"Chart_SensorTertiary",
];
private static readonly Dictionary<ApplicationTheme, ChartPalette> _cache = [];
@@ -57,7 +59,7 @@ public sealed record ChartPalette(
{
ArgumentNullException.ThrowIfNull(dictionary);
Color[] c = [.. Keys.Select(k => Convert(dictionary, k))];
return new ChartPalette(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10], c[11], c[12]);
return new ChartPalette(c[0], c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10], c[11], c[12], c[13]);
}
/// <summary>The colour a key names — how a chart that assigns palette entries to series by name reads them (<c>SensorsChart</c>).</summary>
@@ -76,6 +78,7 @@ public sealed record ChartPalette(
"Chart_Segment" => Segment,
"Chart_Histogram" => Histogram,
"Chart_Percentile" => Percentile,
"Chart_SensorTertiary" => SensorTertiary,
_ => throw new ArgumentOutOfRangeException(nameof(key), key, "not a chart palette key"),
};
@@ -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>
@@ -0,0 +1,17 @@
<!-- SPDX-License-Identifier: GPL-3.0-only -->
<!-- Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE -->
<UserControl x:Class="FrameLedger.App.Charts.RenderScaleChart"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:res="clr-namespace:FrameLedger.App"
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF">
<!-- 08_UI §Session summary (beta.14, D49): the render scale over the session, as steps; a line saying it was not measured
where the upscaler's parameters never were. -->
<Grid>
<sp:WpfPlot x:Name="Plot" />
<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>
@@ -0,0 +1,52 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows;
using System.Windows.Controls;
using FrameLedger.Application.Persistence;
using ScottPlot;
using ScottPlot.Plottables;
namespace FrameLedger.App.Charts;
/// <summary>
/// The render scale over a session (beta.14, D49; <see cref="RenderScaleSeries"/>): a step line — a scale holds until the next
/// change — and, where the upscaler's parameters were never measured, a sentence saying so instead of an empty plot.
/// </summary>
public partial class RenderScaleChart : UserControl
{
public RenderScaleChart()
{
InitializeComponent();
ChartTheme.Attach(Plot);
}
/// <summary>The points drawn by the last <see cref="Show"/>; 0 when the scale was not measured.</summary>
public int DrawnPoints { get; private set; }
public void Show(SessionSeries? series, SessionRow? row)
{
ScottPlot.Plot plot = Plot.Plot;
plot.Clear();
ChartTheme.Apply(plot);
plot.XLabel(Strings.Chart_Axis_TimeFromFirstFrame);
plot.YLabel(Strings.Chart_Axis_RenderScale);
(double[] xs, double[] ys) = row is null ? ([], []) : RenderScaleSeries.Of(series, row);
DrawnPoints = xs.Length;
if (xs.Length > 0)
{
Scatter line = plot.Add.Scatter(xs, ys, ChartTheme.Current.Native);
line.ConnectStyle = ConnectStyle.StepHorizontal;
line.MarkerSize = 0;
line.LineWidth = 2;
plot.Axes.AutoScale();
// A scale reads against 0 and 100 %: an axis fitted to one flat line would make 66.7 % look like a cliff.
plot.Axes.SetLimitsY(0, Math.Max(100, ys.Max() * 1.05));
}
NotMeasured.Visibility = xs.Length > 0 ? Visibility.Collapsed : Visibility.Visible;
Plot.Visibility = xs.Length > 0 ? Visibility.Visible : Visibility.Hidden;
Plot.Refresh();
}
}
@@ -0,0 +1,78 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Application.Persistence;
namespace FrameLedger.App.Charts;
/// <summary>
/// The render scale over a session (beta.14, D49): <c>100 × √(render pixels / output pixels)</c> — the per-axis scale
/// <c>03_METRICS</c> §Upscaling names, so DLSS Quality's 1707×960 of 2560×1440 reads 66.7 %. Per present from the
/// <c>render_res</c> blob where the resolution varied, a flat line at the row's extent where it did not (the finalizer stores
/// the blob only then), and nothing where the upscaler's parameters were never measured.
/// </summary>
internal static class RenderScaleSeries
{
/// <summary>The scale in percent, or null when either size is unknown (0 is the writer's "unknown").</summary>
public static double? Scale(int renderW, int renderH, int outputW, int outputH) =>
renderW > 0 && renderH > 0 && outputW > 0 && outputH > 0
? 100.0 * Math.Sqrt((double)renderW * renderH / ((double)outputW * outputH))
: null;
/// <summary>
/// Seconds from the first present and the scale there — only the points where the scale changes, and the last one, since
/// a scale holds until the next change and a 300,000-present session has a handful (drawn as steps). Empty when nothing
/// was measured.
/// </summary>
public static (double[] Xs, double[] Ys) Of(SessionSeries? series, SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
if (series is null || series.Presents == 0)
{
return ([], []);
}
if (series.RenderRes is { } quads && quads.Length >= 4 * series.Presents)
{
return Changes(series, quads);
}
return Scale(row.RenderW ?? 0, row.RenderH ?? 0, row.OutputW ?? 0, row.OutputH ?? 0) is double flat
? ([0, series.DurationS], [flat, flat])
: ([], []);
}
private static (double[] Xs, double[] Ys) Changes(SessionSeries series, ushort[] quads)
{
var xs = new List<double>();
var ys = new List<double>();
double? last = null;
int lastIndex = -1;
for (int i = 0; i < series.Presents; i++)
{
if (Scale(quads[4 * i], quads[4 * i + 1], quads[4 * i + 2], quads[4 * i + 3]) is not double s)
{
continue;
}
lastIndex = i;
if (last is double previous && Math.Abs(previous - s) < 1e-9)
{
continue;
}
xs.Add(series.TimesS[i]);
ys.Add(s);
last = s;
}
// The last measured present closes the final step, so a scale held to the end is drawn to the end.
if (last is double end && xs.Count > 0 && series.TimesS[lastIndex] > xs[^1])
{
xs.Add(series.TimesS[lastIndex]);
ys.Add(end);
}
return ([.. xs], [.. ys]);
}
}
@@ -16,5 +16,11 @@
<sp:WpfPlot x:Name="Vram" Height="220" Margin="0,6,0,0" />
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Ram_Header}" />
<sp:WpfPlot x:Name="Ram" Height="220" Margin="0,6,0,0" />
<!-- beta.14 (D49): the card's clocks (MHz) and fan (RPM, right axis), with the ticks its power limit or heat held it
back shaded. Collapsed when the session stored none of them. -->
<StackPanel x:Name="ClocksSection">
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Clocks_Header}" />
<sp:WpfPlot x:Name="Clocks" Height="220" Margin="0,6,0,0" />
</StackPanel>
</StackPanel>
</UserControl>
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows;
using System.Windows.Controls;
using FrameLedger.App.Services;
using FrameLedger.Application.Recording;
@@ -28,6 +29,7 @@ public partial class SensorsChart : UserControl
[
("gpu_temp", "Chart_Sensor", false),
("gpu_hotspot", "Chart_Stutter", false),
(SensorSeriesCatalog.GpuMemTemp, "Chart_SensorTertiary", false),
("gpu_load", "Chart_Native", false),
("gpu_power", "Chart_SensorSecondary", true),
("cpu_temp", "Chart_Percentile", false),
@@ -52,6 +54,21 @@ public partial class SensorsChart : UserControl
(SensorSeriesCatalog.RamSystem, "Chart_Percentile"),
];
/// <summary>The clocks plot's lines (beta.14): core and memory clock on the MHz axis, the fan on the right-hand RPM axis.</summary>
internal static readonly IReadOnlyList<(string Series, string PaletteKey, bool Rpm)> ClocksPlot =
[
(SensorSeriesCatalog.GpuCoreClock, "Chart_Native", false),
(SensorSeriesCatalog.GpuMemClock, "Chart_Displayed", false),
(SensorSeriesCatalog.GpuFan, "Chart_SensorSecondary", true),
];
/// <summary>The limits shaded on the clocks plot (beta.14): the ticks each one held the card back, NVIDIA only.</summary>
internal static readonly IReadOnlyList<(string Series, string PaletteKey)> LimitSpans =
[
(SensorSeriesCatalog.GpuPowerLimit, "Chart_Stutter"),
(SensorSeriesCatalog.GpuThermalLimit, "Chart_StutterPso"),
];
private const double _mibPerGb = 1024.0;
public SensorsChart()
@@ -60,8 +77,12 @@ public partial class SensorsChart : UserControl
ChartTheme.Attach(Temps);
ChartTheme.Attach(Vram);
ChartTheme.Attach(Ram);
ChartTheme.Attach(Clocks);
}
/// <summary>The shaded spans the last <see cref="Show"/> drew on the clocks plot.</summary>
public int LimitSpansDrawn { get; private set; }
public int DrawnSeries { get; private set; }
/// <summary>The temperatures plot, for a test's look at its axes.</summary>
@@ -73,6 +94,104 @@ public partial class SensorsChart : UserControl
DrawTemps(series);
DrawMemory(Vram, series, VideoMemoryPlot);
DrawMemory(Ram, series, SystemMemoryPlot);
DrawClocks(series);
}
/// <summary>
/// The card's clocks and fan (beta.14), and every run of ticks a limit held it back as a shaded span behind them — a span
/// from the first such tick to the next tick that was not, so one tick reads as a second. The section collapses for a
/// session that stored none of these series (recorded before beta.14, or a card no layer reads them on).
/// </summary>
private void DrawClocks(SessionSeries? series)
{
ScottPlot.Plot plot = Clocks.Plot;
plot.Clear();
ChartTheme.Apply(plot);
plot.XLabel(TimeAxisLabel(series));
plot.YLabel(Strings.Sensors_Axis_Mhz);
LimitSpansDrawn = 0;
bool any = false;
if (series is not null)
{
ChartPalette p = ChartTheme.Current;
foreach ((string name, string key) in LimitSpans)
{
string label = string.Equals(name, SensorSeriesCatalog.GpuPowerLimit, StringComparison.Ordinal) ? Strings.Sensors_Limit_Power : Strings.Sensors_Limit_Thermal;
LimitSpansDrawn += Spans(plot, series, name, label, p.ByKey(key));
}
foreach ((string name, string key, bool rpm) in ClocksPlot)
{
bool drawn = Line(plot, series, name, Label(name), p.ByKey(key), rpm ? plot.Axes.Right : null);
any |= drawn;
if (drawn && rpm)
{
plot.Axes.Right.Label.Text = Strings.Sensors_Axis_Rpm;
}
}
any |= LimitSpansDrawn > 0;
plot.Axes.AutoScale();
plot.ShowLegend(Alignment.UpperRight);
}
ClocksSection.Visibility = any ? Visibility.Visible : Visibility.Collapsed;
Clocks.Refresh();
}
/// <summary>Shades every run of ticks whose value is 100 (held back) in <paramref name="name"/>; how many spans it drew.</summary>
private static int Spans(ScottPlot.Plot plot, SessionSeries series, string name, string label, Color color)
{
SensorSeries? limit = series.Sensors.FirstOrDefault(s => string.Equals(s.Name, name, StringComparison.Ordinal));
if (limit is null)
{
return 0;
}
int drawn = 0;
foreach ((double from, double to) in LimitRuns(limit))
{
VerticalSpan span = plot.Add.VerticalSpan(from, to, color.WithAlpha(0.18));
span.LineWidth = 0;
if (drawn++ == 0)
{
span.LegendText = label;
}
}
return drawn;
}
/// <summary>
/// The runs of ticks held back, as (start, end) seconds: from a tick at 100 to the next tick, and through every tick at
/// 100 after it — the reading holds for the second until the next. Pure, for the tests.
/// </summary>
internal static IReadOnlyList<(double From, double To)> LimitRuns(SensorSeries limit)
{
ArgumentNullException.ThrowIfNull(limit);
var runs = new List<(double, double)>();
double? start = null;
for (int i = 0; i < limit.Values.Length; i++)
{
bool held = limit.Values[i] >= 50;
if (held && start is null)
{
start = limit.TimesS[i];
}
else if (!held && start is double s)
{
runs.Add((s, limit.TimesS[i]));
start = null;
}
}
if (start is double open)
{
double last = limit.TimesS[^1];
runs.Add((open, last > open ? last + (last - limit.TimesS[Math.Max(0, limit.TimesS.Length - 2)]) : open + 1));
}
return runs;
}
/// <summary>The time axis says where its zero is: the first frame when the sensors sit on the frames' axis, the session's start otherwise.</summary>
+25
View File
@@ -68,4 +68,29 @@ public enum TrendMetric
DisplayBorderlessShare,
DisplayWindowedShare,
/// <summary>
/// The nine below are beta.14's (D49): pacing and efficiency from the hooks, the card's clock, memory temperature and power
/// limit from the telemetry every session records. A session before beta.14 has no point on any of them.
/// </summary>
TimeBelow60,
/// <summary>The share of the presented time below the monitor's refresh rate — what the display received.</summary>
TimeBelowRefresh,
FrameToFrame,
/// <summary>The render scale, <c>100 / upscale_ratio</c> — the per-axis scale of the session's dominant extent.</summary>
RenderScale,
VsyncShare,
GpuCoreClock,
MaxGpuMemTemp,
PowerLimitShare,
/// <summary>Application frames per watt of the card's power — never displayed frames (rule 6).</summary>
Efficiency,
}
@@ -52,7 +52,10 @@ public static class TrendSeriesBuilder
public static string UnitOf(TrendMetric metric) => metric switch
{
TrendMetric.PresentedFps or TrendMetric.NativeFps or TrendMetric.Displayed or TrendMetric.P1Low or TrendMetric.P01Low => Strings.Trend_Unit_Fps,
TrendMetric.MaxGpuTemp or TrendMetric.MaxCpuTemp => Strings.Trend_Unit_Celsius,
TrendMetric.MaxGpuTemp or TrendMetric.MaxCpuTemp or TrendMetric.MaxGpuMemTemp => Strings.Trend_Unit_Celsius,
TrendMetric.FrameToFrame => Strings.Trend_Unit_Ms,
TrendMetric.GpuCoreClock => Strings.Trend_Unit_Mhz,
TrendMetric.Efficiency => Strings.Trend_Unit_FpsPerWatt,
TrendMetric.AvgGpuPower => Strings.Trend_Unit_Watts,
TrendMetric.AvgRam or TrendMetric.GameVramMedian or TrendMetric.GameVramPeak or TrendMetric.GameRamMedian or TrendMetric.GameRamPeak => Strings.Trend_Unit_Gigabytes,
TrendMetric.FgFactor => Strings.Trend_Unit_Factor,
@@ -106,7 +109,8 @@ public static class TrendSeriesBuilder
/// </summary>
public static bool IsMachineMetric(TrendMetric metric) => metric is TrendMetric.MaxGpuTemp or TrendMetric.AvgGpuLoad or TrendMetric.AvgGpuPower
or TrendMetric.AvgCpuLoad or TrendMetric.MaxCpuTemp or TrendMetric.AvgRam
or TrendMetric.GameVramMedian or TrendMetric.GameVramPeak or TrendMetric.GameRamMedian or TrendMetric.GameRamPeak;
or TrendMetric.GameVramMedian or TrendMetric.GameVramPeak or TrendMetric.GameRamMedian or TrendMetric.GameRamPeak
or TrendMetric.GpuCoreClock or TrendMetric.MaxGpuMemTemp or TrendMetric.PowerLimitShare;
public static int ExcludedCount(IReadOnlyList<SessionRow> rows, TrendMetric metric)
{
@@ -170,10 +174,25 @@ public static class TrendSeriesBuilder
TrendMetric.DisplayExclusiveShare => DisplayShare(row, DisplayMode.ExclusiveFullscreen),
TrendMetric.DisplayBorderlessShare => DisplayShare(row, DisplayMode.Borderless),
TrendMetric.DisplayWindowedShare => DisplayShare(row, DisplayMode.Windowed),
_ => null,
_ => Beta14ValueOf(row, metric),
};
}
/// <summary>beta.14 (D49): the values of schema 0019 — null on a row written before it, as on one where nothing measured them.</summary>
private static double? Beta14ValueOf(SessionRow row, TrendMetric metric) => metric switch
{
TrendMetric.TimeBelow60 => row.TimeBelow60Pct,
TrendMetric.TimeBelowRefresh => row.TimeBelowRefreshPct,
TrendMetric.FrameToFrame => row.FrametimeDeltaMeanMs,
TrendMetric.RenderScale => row.UpscaleRatio is > 0 ? 100.0 / row.UpscaleRatio.Value : null,
TrendMetric.VsyncShare => row.VsyncPresentPct,
TrendMetric.GpuCoreClock => row.AvgGpuCoreClockMhz,
TrendMetric.MaxGpuMemTemp => row.MaxGpuMemTemp,
TrendMetric.PowerLimitShare => row.PowerLimitPct,
TrendMetric.Efficiency => row.AppFramesPerJoule,
_ => null,
};
/// <summary>MiB as stored, in GB as Task Manager counts them (1 GB = 1024 MiB).</summary>
private static double? Gb(double? mib) => mib / 1024.0;
@@ -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}" />
+10 -2
View File
@@ -65,14 +65,14 @@
</MenuItem>
<MenuItem Header="{x:Static res:Strings.Menu_Tools}">
<MenuItem Header="{x:Static res:Strings.Menu_Tools_AgentStatus}" Command="{Binding ViewModel.AgentStatusCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Tools_UpdateRules}" Command="{Binding ViewModel.UpdateRulesCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Tools_UpdateRules}" Command="{Binding ViewModel.UpdateRulesCommand}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
<MenuItem Header="{x:Static res:Strings.Menu_Tools_VulkanLayer}" Command="{Binding ViewModel.VulkanLayerCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Tools_OpenDataFolder}" Command="{Binding ViewModel.OpenDataFolderCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Tools_DbMaintenance}" Command="{Binding ViewModel.DatabaseMaintenanceCommand}" />
</MenuItem>
<MenuItem Header="{x:Static res:Strings.Menu_Help}">
<MenuItem Header="{x:Static res:Strings.Menu_Help_Guide}" Command="{Binding ViewModel.GuideCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Help_CheckUpdates}" Command="{Binding ViewModel.CheckForUpdatesCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Help_CheckUpdates}" Command="{Binding ViewModel.CheckForUpdatesCommand}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
<MenuItem Header="{x:Static res:Strings.Menu_Help_ReportBug}" Command="{Binding ViewModel.ReportBugCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Help_Documentation}" Command="{Binding ViewModel.DocumentationCommand}" />
<MenuItem Header="{x:Static res:Strings.Menu_Help_Limitations}" Command="{Binding ViewModel.LimitationsCommand}" />
@@ -83,6 +83,14 @@
<!-- 08_UI §Notifications policy: "Agent offline" is in-app and PERSISTENT — an InfoBar with an action, never a toast. -->
<StackPanel Grid.Row="2">
<!-- beta.15 (D52): a viewer over a copy says so above every page, for as long as it runs, and names the folder. -->
<ui:InfoBar Margin="12,4,12,0"
IsClosable="False"
IsOpen="{Binding ViewModel.IsViewerBannerVisible, Mode=OneTime}"
Message="{Binding ViewModel.ViewerBannerBody}"
Severity="Informational"
Title="{x:Static res:Strings.Viewer_Banner_Title}" />
<ui:InfoBar Margin="12,4,12,0"
IsClosable="False"
IsOpen="{Binding ViewModel.IsAgentBannerVisible}"
+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>
+42 -38
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>
@@ -173,10 +173,12 @@
<ui:Button Appearance="Secondary"
Command="{Binding ViewModel.GrantExceptionCommand}"
Content="{x:Static vm:GameDetailViewModel.GrantExceptionText}"
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
Visibility="{Binding ViewModel.CanGrantException, Converter={StaticResource BoolToVis}}" />
<ui:Button Appearance="Secondary"
Command="{Binding ViewModel.WithdrawExceptionCommand}"
Content="{x:Static vm:GameDetailViewModel.WithdrawExceptionText}"
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
Visibility="{Binding ViewModel.CanWithdrawException, Converter={StaticResource BoolToVis}}" />
</StackPanel>
</ui:CardControl>
@@ -185,27 +187,28 @@
<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"
IsOpen="{Binding ViewModel.AutoDisabledText, Converter={StaticResource NotNull}}"
Message="{Binding ViewModel.AutoDisabledText}">
<ui:Button Command="{Binding ViewModel.ReEnableHookingCommand}" Content="{x:Static vm:GameDetailViewModel.ReEnableText}" />
<ui:Button Command="{Binding ViewModel.ReEnableHookingCommand}" Content="{x:Static vm:GameDetailViewModel.ReEnableText}"
IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
</ui:InfoBar>
<ui:InfoBar Margin="0,8,0,0" IsClosable="True"
IsOpen="{Binding ViewModel.NoticeVisible, Mode=OneWay}"
@@ -216,20 +219,21 @@
<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. -->
<StackPanel Margin="0,0,0,8" Orientation="Horizontal" HorizontalAlignment="Right"
Visibility="{Binding ViewModel.SessionsEmpty, Converter={StaticResource InverseBoolToVis}}">
<ui:Button Appearance="Secondary" Command="{Binding ViewModel.DeleteAllSessionsCommand}"
Content="{x:Static vm:GameDetailViewModel.DeleteAllSessionsText}" Icon="{ui:SymbolIcon Delete24}" />
Content="{x:Static vm:GameDetailViewModel.DeleteAllSessionsText}" Icon="{ui:SymbolIcon Delete24}"
IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
</StackPanel>
<DataGrid x:Name="SessionsGrid" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True" HeadersVisibility="Column"
ItemsSource="{Binding ViewModel.Sessions}" SelectionMode="Extended" MouseDoubleClick="OnSessionDoubleClick"
@@ -333,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>
@@ -348,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>
@@ -368,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>
@@ -381,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}">
<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}}" />
+6 -6
View File
@@ -38,7 +38,7 @@
<ComboBox Grid.Column="2" MinWidth="150" Margin="0,0,12,0" VerticalAlignment="Center"
AutomationProperties.Name="{x:Static res:Strings.A11y_Games_Sort}"
DisplayMemberPath="Label"
ItemsSource="{x:Static vm:GamesViewModel.Sorts}"
ItemsSource="{Binding ViewModel.Sorts}"
SelectedValue="{Binding ViewModel.Sort, Mode=TwoWay}"
SelectedValuePath="Value" />
<!-- The view switch: the one button shown is the other view. -->
@@ -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>
+3 -3
View File
@@ -25,14 +25,14 @@
Margin="0,0,8,4"
AutomationProperties.Name="{x:Static res:Strings.A11y_Logs_Source}"
DisplayMemberPath="Label"
ItemsSource="{x:Static vm:LogsViewModel.Sources}"
ItemsSource="{Binding ViewModel.Sources}"
SelectedValue="{Binding ViewModel.Source, Mode=TwoWay}"
SelectedValuePath="Value" />
<ComboBox MinWidth="170"
Margin="0,0,8,4"
AutomationProperties.Name="{x:Static res:Strings.A11y_Logs_Level}"
DisplayMemberPath="Label"
ItemsSource="{x:Static vm:LogsViewModel.Levels}"
ItemsSource="{Binding ViewModel.Levels}"
SelectedValue="{Binding ViewModel.Level, Mode=TwoWay}"
SelectedValuePath="Value" />
<ui:TextBox MinWidth="220"
@@ -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>
+36 -35
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}" />
<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,13 +88,13 @@
</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}">
<ItemsControl ItemsSource="{Binding ViewModel.ExceptionGames}" IsEnabled="{Binding ViewModel.ActsOnThisPc}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,6">
@@ -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">
@@ -127,6 +127,7 @@
<ui:Button Margin="0,8,0,0"
Appearance="Secondary"
Command="{Binding ViewModel.RefreshExceptionsCommand}"
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
Content="{x:Static res:Strings.Settings_Exceptions_Refresh}"
Visibility="{Binding ViewModel.ExceptionsChecking, Converter={StaticResource BoolToVis}}" />
</StackPanel>
@@ -141,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"
@@ -156,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}"
@@ -169,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"
@@ -183,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"
@@ -197,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"
@@ -217,10 +218,10 @@
<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}" />
<ui:Button Appearance="Secondary" Command="{Binding ViewModel.DeleteAllSessionsCommand}" Content="{x:Static res:Strings.Settings_DeleteSessions_Button}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
</ui:CardControl>
<!-- Agent: elevation is optional and no tier needs it. beta.11: the elevation line is the admin mode's own status, not a row of its own. -->
@@ -230,18 +231,18 @@
<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>
</ui:CardControl.Header>
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_Agent_RunElevated_Label}" IsChecked="{Binding ViewModel.RunElevated, Mode=TwoWay}" />
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_Agent_RunElevated_Label}" IsChecked="{Binding ViewModel.RunElevated, Mode=TwoWay}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
</ui:CardControl>
<ui:CardControl Margin="0,8,0,0" Icon="{ui:SymbolIcon CalendarClock24}">
<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">
@@ -268,7 +269,7 @@
<ComboBox MinWidth="180"
AutomationProperties.Name="{x:Static vm:SettingsViewModel.ThemeLabel}"
DisplayMemberPath="Label"
ItemsSource="{x:Static vm:SettingsViewModel.Themes}"
ItemsSource="{Binding ViewModel.Themes}"
SelectedValue="{Binding ViewModel.SelectedTheme, Mode=TwoWay}"
SelectedValuePath="Value" />
</ui:CardControl>
@@ -286,16 +287,16 @@
<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}" />
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_StartWithWindows_Label}" IsChecked="{Binding ViewModel.StartWithWindows, Mode=TwoWay}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
</ui:CardControl>
<ui:CardControl Margin="0,8,0,0" Icon="{ui:SymbolIcon ArrowMinimize24}">
<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}" />
@@ -305,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>
@@ -316,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>
@@ -334,13 +335,13 @@
<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"
AutomationProperties.Name="{x:Static res:Strings.Settings_UpdateChannel_Label}"
DisplayMemberPath="Label"
ItemsSource="{x:Static vm:SettingsViewModel.UpdateChannels}"
ItemsSource="{Binding ViewModel.UpdateChannels}"
SelectedValue="{Binding ViewModel.UpdateChannel, Mode=TwoWay}"
SelectedValuePath="Value" />
</ui:CardControl>
@@ -349,10 +350,10 @@
<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}" />
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_AutoCheck_Label}" IsChecked="{Binding ViewModel.AutoCheckUpdates, Mode=TwoWay}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
</ui:CardControl>
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Logging_Header}" />
@@ -360,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}" />
@@ -377,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>
+21 -2
View File
@@ -16,17 +16,36 @@ namespace FrameLedger.App;
/// </summary>
internal static class Program
{
/// <summary>The exit code of a <c>--data-dir</c> refused before any window (beta.15, D52).</summary>
internal const int ExitDataFolderRefused = 2;
[STAThread]
private static int Main()
{
VelopackHooks.Configure(VelopackApp.Build()).Run();
// D52 (beta.15): --data-dir makes this App a viewer over a copy, decided before the single-instance key, the log
// or the ledger reads a path. A refusal is said in a message box (a WinExe has no console) and opens nothing.
string[] args = Environment.GetCommandLineArgs()[1..];
DataFolderChoice folder = DataFolderArgument.Read(args, UiPaths.ProfileDirectory);
if (folder.Kind == DataFolderChoiceKind.Refused)
{
_ = System.Windows.MessageBox.Show(folder.Problem, Strings.DataDir_Refused_Title, System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Warning);
return ExitDataFolderRefused;
}
if (folder.Kind == DataFolderChoiceKind.Viewer)
{
UiPaths.UseViewerFolder(folder.Folder!);
}
// One App per data folder (2026-09-21): a second start hands over to the first and exits. --diag opens no window
// and must work beside a running App, so it never claims.
// and must work beside a running App, so it never claims. A viewer's folder is its own key, so it runs beside the
// profile's App.
SingleInstance? single = null;
try
{
if (!DiagReport.Requested(Environment.GetCommandLineArgs())
if (!DiagReport.Requested(args)
&& SingleInstance.TryClaim(SingleInstance.KeyOf(UiPaths.DataDirectory), out single) == SingleInstance.Claim.AnotherInstanceIsRunning)
{
return 0;
@@ -26,4 +26,10 @@ public enum AgentConnectionState
/// flashing on the taskbar, and the round waits for its answer.
/// </summary>
Elevating,
/// <summary>
/// A viewer over a copy of a data folder (beta.15, D52: <c>--data-dir</c>): no Agent is started or contacted, ever —
/// the state never changes.
/// </summary>
Viewer,
}
@@ -17,6 +17,7 @@ public static class AgentStatusPresentation
AgentConnectionState.Offline => (Strings.Agent_State_Offline, ControlAppearance.Caution),
AgentConnectionState.Missing => (Strings.Agent_State_Missing, ControlAppearance.Danger),
AgentConnectionState.Elevating => (Strings.Agent_State_Elevating, ControlAppearance.Info),
AgentConnectionState.Viewer => (Strings.Agent_State_Viewer, ControlAppearance.Secondary),
_ => throw new ArgumentOutOfRangeException(nameof(state), state, "not a connection state"),
};
@@ -0,0 +1,97 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using System.IO;
namespace FrameLedger.App.Services;
/// <summary>
/// <c>FrameLedger.exe --data-dir &lt;folder&gt;</c> (beta.15, D52): which folder this App runs over, read before anything
/// else touches one — the single-instance claim, the log, the ledger.
/// </summary>
/// <remarks>
/// The folder must exist, and it must NOT be the profile's own: the flag is for a copy, so that a test build never opens
/// the ledger the owner records into (a migration a released build cannot read back is how a ledger is lost — HANDOFF
/// §Traps). The comparison is the Agent's (<c>AgentPaths.IsProfile</c>): full paths, case-insensitive, with a trailing
/// separator and a link on the folder itself resolved.
/// </remarks>
public static class DataFolderArgument
{
public const string Flag = "--data-dir";
/// <summary>What the command line asks for; <paramref name="exists"/> answers whether a folder exists (a test's own).</summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture")]
public static DataFolderChoice Read(IReadOnlyList<string> args, string profileDirectory, Func<string, bool>? exists = null)
{
ArgumentNullException.ThrowIfNull(args);
ArgumentException.ThrowIfNullOrWhiteSpace(profileDirectory);
exists ??= Directory.Exists;
string? value = null;
int given = 0;
for (int i = 0; i < args.Count; i++)
{
string arg = args[i];
if (string.Equals(arg, Flag, StringComparison.OrdinalIgnoreCase))
{
given++;
value = i + 1 < args.Count ? args[++i] : null;
}
else if (arg.StartsWith(Flag + "=", StringComparison.OrdinalIgnoreCase))
{
given++;
value = arg[(Flag.Length + 1)..];
}
}
if (given == 0)
{
return DataFolderChoice.Profile;
}
if (given > 1)
{
return DataFolderChoice.Refused(Strings.DataDir_Twice);
}
if (string.IsNullOrWhiteSpace(value) || value.StartsWith("--", StringComparison.Ordinal))
{
return DataFolderChoice.Refused(Strings.DataDir_NoFolder);
}
string folder;
try
{
folder = Normalise(value);
}
catch (Exception ex) when (ex is ArgumentException or NotSupportedException or PathTooLongException or IOException or UnauthorizedAccessException)
{
return DataFolderChoice.Refused(string.Format(CultureInfo.CurrentCulture, Strings.DataDir_Missing_Format, value));
}
if (string.Equals(folder, Normalise(profileDirectory), StringComparison.OrdinalIgnoreCase))
{
return DataFolderChoice.Refused(string.Format(CultureInfo.CurrentCulture, Strings.DataDir_Profile_Format, folder));
}
return exists(folder)
? DataFolderChoice.Viewer(folder)
: DataFolderChoice.Refused(string.Format(CultureInfo.CurrentCulture, Strings.DataDir_Missing_Format, folder));
}
/// <summary>The folder's full path, without a trailing separator, and its target when the folder itself is a link.</summary>
internal static string Normalise(string path)
{
string full = Path.TrimEndingDirectorySeparator(Path.GetFullPath(path));
try
{
FileSystemInfo? target = Directory.ResolveLinkTarget(full, returnFinalTarget: true);
return target is null ? full : Path.TrimEndingDirectorySeparator(target.FullName);
}
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
{
return full;
}
}
}
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Services;
/// <summary>What <see cref="DataFolderArgument.Read"/> decided: the profile, a viewer over <see cref="Folder"/>, or a refusal saying why.</summary>
public sealed record DataFolderChoice(DataFolderChoiceKind Kind, string? Folder, string? Problem)
{
public static DataFolderChoice Profile { get; } = new(DataFolderChoiceKind.Profile, null, null);
public static DataFolderChoice Viewer(string folder) => new(DataFolderChoiceKind.Viewer, folder, null);
public static DataFolderChoice Refused(string problem) => new(DataFolderChoiceKind.Refused, null, problem);
}
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Services;
/// <summary>The three answers of <see cref="DataFolderArgument.Read"/>.</summary>
public enum DataFolderChoiceKind
{
Profile = 0,
Viewer,
Refused,
}
+12
View File
@@ -75,6 +75,18 @@ public static class Formats
/// <summary>A GPU's power as <c>215 W</c>; null → N/A.</summary>
public static string Power(double? watts) => watts is double w ? w.ToString("0", CultureInfo.CurrentCulture) + " W" : Strings.Common_NotAvailable;
/// <summary>
/// A share of time or of frames as <c>9.6%</c> (beta.14) — one decimal, because the small shares are the telling ones: a
/// game held at its limit reads 0.4 % below it, not "0%"; null → N/A, never 0%.
/// </summary>
public static string Share(double? pct) => pct is double v ? v.ToString("0.0", CultureInfo.CurrentCulture) + "%" : Strings.Common_NotAvailable;
/// <summary>A frame-time difference as <c>0.88 ms</c> (beta.14); null → N/A.</summary>
public static string Milliseconds(double? ms) => ms is double v ? string.Format(CultureInfo.CurrentCulture, Strings.Format_Milliseconds_Format, v) : Strings.Common_NotAvailable;
/// <summary>Application frames per joule as <c>0.31 FPS/W</c> (beta.14) — frames per second over watts; null → N/A.</summary>
public static string FramesPerJoule(double? perJoule) => perJoule is double v ? string.Format(CultureInfo.CurrentCulture, Strings.Format_FramesPerJoule_Format, v) : Strings.Common_NotAvailable;
/// <summary>A clock as <c>2,655 MHz</c> (beta.14); null → N/A.</summary>
public static string Frequency(double? mhz) => mhz is double f ? string.Format(CultureInfo.CurrentCulture, Strings.Format_Frequency_Format, f) : Strings.Common_NotAvailable;
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Services;
/// <summary>
/// A long-lived piece of the UI that read its text when it was made and must read it again after a language change
/// (beta.15). A language change rebuilds the window and its pages (<see cref="ShellHost.Rebuild"/>), so everything transient
/// follows on its own; a singleton — the tray's menu, the title bar's Agent pill — kept the language it started in until
/// its state next changed. <see cref="ShellHost.Rebuild"/> calls every registered follower once the new window is up.
/// </summary>
public interface ILanguageFollower
{
/// <summary>Reads every text again in the current UI culture. Called on the UI thread.</summary>
void FollowLanguage();
}
@@ -0,0 +1,71 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.App.Update;
using FrameLedger.Infrastructure.Ipc;
using Microsoft.Extensions.DependencyInjection;
namespace FrameLedger.App.Services;
/// <summary>
/// Every part of the App's composition that reaches past its ledger — the Agent over the pipe and the launcher behind it,
/// the Agent's maintenance flags, the Run entry, the updater — registered in one place, so that a viewer's composition
/// (beta.15, D52) can be seen, and is tested (<c>MachineFacingServicesTests</c>), to hold none of it.
/// </summary>
internal static class MachineFacingServices
{
public static void Add(IServiceCollection services, UiMode mode)
{
ArgumentNullException.ThrowIfNull(services);
ArgumentNullException.ThrowIfNull(mode);
services.AddSingleton(mode);
if (mode.IsViewer)
{
AddViewer(services);
}
else
{
AddProfile(services);
}
// What the Agent runs right now (2026-09-23), for the pages rebuilt on every visit; built before the connection's
// first round by AgentConnectionHostedService, so it never misses a session. A viewer's is always empty.
services.AddSingleton(static sp => new LiveSessions(sp.GetRequiredService<IAgentLink>()));
}
/// <summary>
/// The Agent over the pipe (07_IPC §Client behavior): connect, start it when it is not there, tell the shell; the Run
/// entry; the layer registration and the logon task through the Agent's flags (P3 PR-8b); the updater (P4 PR-5).
/// </summary>
private static void AddProfile(IServiceCollection services)
{
// The admin mode's prompt (beta.10) belongs to the main window; the handle is read when a start asks, never earlier.
services.AddSingleton<IAgentLauncher>(static sp => AgentLauncher.ForApp(() => sp.GetRequiredService<ShellHost>().Handle));
services.AddSingleton(static sp => new AgentConnection(
sp.GetRequiredService<IAgentLauncher>(),
static () => new PipeClient(),
new AgentConnectionOptions(),
UiIdentity.Version));
services.AddHostedService<AgentConnectionHostedService>();
services.AddSingleton<IAgentRequests>(static sp => sp.GetRequiredService<AgentConnection>());
services.AddSingleton<IAgentLink>(static sp => sp.GetRequiredService<AgentConnection>());
services.AddSingleton<IRunAtLogon, RunAtLogonRegistry>();
services.AddSingleton<IAgentTool, AgentTool>();
// The startup check is a hosted service; after an update's restart it also repairs the logon task.
services.AddSingleton<IUpdateClient, VelopackUpdateClient>();
services.AddHostedService<UpdateHostedService>();
}
/// <summary>A viewer: a link that is never connected and nothing that could connect it, and nothing that changes this PC.</summary>
private static void AddViewer(IServiceCollection services)
{
services.AddSingleton<ViewerAgentLink>();
services.AddSingleton<IAgentRequests>(static sp => sp.GetRequiredService<ViewerAgentLink>());
services.AddSingleton<IAgentLink>(static sp => sp.GetRequiredService<ViewerAgentLink>());
services.AddSingleton<IRunAtLogon, ViewerRunAtLogon>();
services.AddSingleton<IAgentTool, ViewerAgentTool>();
services.AddSingleton<IUpdateClient, ViewerUpdateClient>();
}
}
@@ -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);
+8 -1
View File
@@ -71,12 +71,19 @@ public sealed class ShellHost(IServiceProvider services, INavigationService navi
/// <summary>The page the shell will open on, kept across a rebuild.</summary>
public void Remember(Type page) => _page = page;
/// <summary>A new window in the current UI culture; the old one closes after the new one is up.</summary>
/// <summary>
/// A new window in the current UI culture; the old one closes after the new one is up. The long-lived pieces that
/// read their text once — the tray's menu, the Agent pill — read it again (<see cref="ILanguageFollower"/>, beta.15).
/// </summary>
public void Rebuild()
{
MainWindow? old = _current;
Show();
old?.Close();
foreach (ILanguageFollower follower in services.GetServices<ILanguageFollower>())
{
follower.FollowLanguage();
}
}
public Window? Current => _current;
+37 -5
View File
@@ -15,12 +15,16 @@ namespace FrameLedger.App.Services;
/// and tooltip follow the state, the context menu is the four items, a left click opens the window, and the
/// FR-3.8 balloon's click opens the saved session. Created once the shell is up, on the UI thread.
/// </summary>
public sealed class TrayHost : IDisposable
public sealed class TrayHost : IDisposable, ILanguageFollower
{
private readonly TrayViewModel _viewModel;
private readonly WindowClosePolicy _policy;
private TaskbarIcon? _icon;
private System.Drawing.Icon? _image;
private MenuItem? _open;
private MenuItem? _pause;
private MenuItem? _status;
private MenuItem? _exit;
public TrayHost(TrayViewModel viewModel, WindowClosePolicy policy)
{
@@ -40,12 +44,16 @@ public sealed class TrayHost : IDisposable
try
{
var menu = new ContextMenu();
menu.Items.Add(new MenuItem { Header = Strings.Tray_Open, Command = _viewModel.OpenCommand });
var pause = new MenuItem { Header = _viewModel.PauseText, Command = _viewModel.TogglePauseCommand };
_open = new MenuItem { Header = Strings.Tray_Open, Command = _viewModel.OpenCommand };
menu.Items.Add(_open);
var pause = new MenuItem { Header = _viewModel.PauseText, Command = _viewModel.TogglePauseCommand, IsEnabled = _viewModel.ActsOnThisPc };
_pause = pause;
menu.Items.Add(pause);
menu.Items.Add(new MenuItem { Header = Strings.Tray_AgentStatus, Command = _viewModel.AgentStatusCommand });
_status = new MenuItem { Header = Strings.Tray_AgentStatus, Command = _viewModel.AgentStatusCommand };
menu.Items.Add(_status);
menu.Items.Add(new Separator());
menu.Items.Add(new MenuItem { Header = Strings.Tray_Exit, Command = _viewModel.ExitCommand });
_exit = new MenuItem { Header = Strings.Tray_Exit, Command = _viewModel.ExitCommand };
menu.Items.Add(_exit);
_image = TrayIcons.For(_viewModel.State);
var icon = new TaskbarIcon
@@ -111,6 +119,30 @@ public sealed class TrayHost : IDisposable
_image = null;
}
/// <summary>
/// The menu and the tooltip in the current language (beta.15): they were written once, when the icon was made, and a
/// change of language left them in the first one. Nothing before the icon exists.
/// </summary>
public void FollowLanguage()
{
if (_icon is null || _open is null || _pause is null || _status is null || _exit is null)
{
return;
}
_open.Header = Strings.Tray_Open;
_pause.Header = _viewModel.PauseText;
_status.Header = Strings.Tray_AgentStatus;
_exit.Header = Strings.Tray_Exit;
_icon.ToolTipText = _viewModel.Tooltip;
}
/// <summary>The menu's items as shown, in order, for a test; empty before the icon exists.</summary>
internal IReadOnlyList<string> MenuHeaders =>
_open is null || _pause is null || _status is null || _exit is null
? []
: [.. new[] { _open, _pause, _status, _exit }.Select(static m => m.Header as string ?? string.Empty)];
private void OnViewModelChanged(MenuItem pause, PropertyChangedEventArgs e)
{
if (_icon is null)
+32
View File
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Services;
/// <summary>
/// The App over its own data folder, or a VIEWER over a copy of one (beta.15, owner decision D52:
/// <c>FrameLedger.exe --data-dir &lt;folder&gt;</c>, read by <see cref="DataFolderArgument"/>).
/// </summary>
/// <remarks>
/// <para>
/// A viewer opens the ledger in that folder and logs beside it, and it starts and contacts no Agent: the pipe is one per
/// user and the Agent behind it records into the PROFILE's ledger, so a request carrying this ledger's game ids would act
/// on another game — a consent written for the wrong one (rule 1), sessions deleted from the wrong one. Nor does it
/// change anything on this PC: no Run entry, no Vulkan layer, no logon task, no administrator mode, no update. The
/// composition holds that structurally (<see cref="MachineFacingServices"/> registers no pipe client and no launcher in a
/// viewer); the pages disable the controls that would ask, so nothing on screen offers what cannot happen.
/// </para>
/// <para>
/// D6 is unchanged: the Agent's own <c>--data-dir</c> stays under <c>--console</c>.
/// </para>
/// </remarks>
/// <param name="IsViewer">True under <c>--data-dir</c>.</param>
/// <param name="DataDirectory">The folder the ledger, the logs and the crash dumps are in.</param>
public sealed record UiMode(bool IsViewer, string DataDirectory)
{
/// <summary>The App over the profile's own folder, as every composition without a <c>--data-dir</c> is.</summary>
public static UiMode Profile { get; } = new(false, UiPaths.ProfileDirectory);
/// <summary>Whether the controls that ask the Agent, or change this PC, are live: everywhere but a viewer.</summary>
public bool ActsOnThisPc => !IsViewer;
}
+36 -4
View File
@@ -8,20 +8,52 @@ namespace FrameLedger.App.Services;
/// <summary>
/// Where the App reads and logs: the Agent's data directory (<c>01_ARCHITECTURE</c> §Data directory —
/// <c>ledger.db</c> beside <c>logs\ui-*.log</c>). The App never chooses another location; the ledger is the
/// Agent's, and <c>06_DATA_MODEL</c> §Writer ownership says which tables the App may write.
/// <c>ledger.db</c> beside <c>logs\ui-*.log</c>), or under <c>--data-dir</c> a copy of one (beta.15, D52:
/// <see cref="UseViewerFolder"/>, set once by <c>Program.Main</c> before anything reads a path). The ledger is the Agent's,
/// and <c>06_DATA_MODEL</c> §Writer ownership says which tables the App may write.
/// </summary>
internal static class UiPaths
{
public static string DataDirectory => LedgerPaths.DefaultDirectory;
private static string? _viewerFolder;
public static string Database => LedgerPaths.DefaultDatabase;
/// <summary><c>%LOCALAPPDATA%\FrameLedger</c>: the folder the profile's Agent records into.</summary>
public static string ProfileDirectory => LedgerPaths.DefaultDirectory;
/// <summary>True when this App is a viewer over a copy (<see cref="UiMode"/>).</summary>
public static bool IsViewer => _viewerFolder is not null;
public static string DataDirectory => _viewerFolder ?? ProfileDirectory;
public static string Database => Path.Combine(DataDirectory, LedgerPaths.DatabaseFileName);
public static string Logs => Path.Combine(DataDirectory, "logs");
/// <summary><c>10_LOGGING</c> §Crash handling: the minidumps of both processes' crashes (P4 PR-9), the newest five kept.</summary>
public static string CrashDumps => Path.Combine(DataDirectory, "crashdumps");
/// <summary>What the composition is told about the folder (<see cref="UiMode"/>).</summary>
public static UiMode Mode => new(IsViewer, DataDirectory);
/// <summary>
/// D52: this App views the copy in <paramref name="folder"/> — once, before the first path is read, and never the
/// profile's own folder (<see cref="DataFolderArgument"/> refused that already; this is the second lock on that door).
/// </summary>
public static void UseViewerFolder(string folder)
{
ArgumentException.ThrowIfNullOrWhiteSpace(folder);
if (_viewerFolder is not null)
{
throw new InvalidOperationException("the viewer folder is set once");
}
if (string.Equals(DataFolderArgument.Normalise(folder), DataFolderArgument.Normalise(ProfileDirectory), StringComparison.OrdinalIgnoreCase))
{
throw new InvalidOperationException("--data-dir names the profile's own folder; a viewer is for a copy");
}
_viewerFolder = folder;
}
public static void EnsureDirectories()
{
Directory.CreateDirectory(DataDirectory);
@@ -0,0 +1,45 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using FrameLedger.Shared.Ipc;
namespace FrameLedger.App.Services;
/// <summary>
/// The Agent link of a viewer (beta.15, D52): never connected, never connecting, and with nothing behind it that could
/// connect — no pipe client, no launcher. Every feature that asks the Agent checks <see cref="IsConnected"/> first and
/// answers that the Agent is unavailable; one that asked anyway gets the exception a disconnected link throws.
/// </summary>
public sealed class ViewerAgentLink : IAgentLink
{
public AgentConnectionState State => AgentConnectionState.Viewer;
public StatusAck? Status => null;
public HelloAck? Hello => null;
public bool IsConnected => false;
/// <summary>Never raised: the state never changes.</summary>
public event EventHandler? Changed
{
add { }
remove { }
}
/// <summary>Never raised: there is no Agent to send one.</summary>
public event EventHandler<AgentEventArgs>? EventReceived
{
add { }
remove { }
}
public Task<IpcEnvelope> RequestAsync<TRequest>(string type, TRequest payload, CancellationToken ct = default)
where TRequest : class =>
throw new InvalidOperationException($"a viewer (--data-dir) has no Agent; {type} was not sent");
/// <summary>Nothing to hold: a viewer never starts an Agent.</summary>
public void SetLaunchHold(bool hold)
{
}
}
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using Serilog;
namespace FrameLedger.App.Services;
/// <summary>
/// The Agent's maintenance flags as a viewer sees them (beta.15, D52): the Vulkan layer's registration and the logon task
/// are this PC's, not a copy's, so nothing is started. The buttons are disabled; a call that reached here anyway fails.
/// </summary>
public sealed class ViewerAgentTool : IAgentTool
{
/// <summary>The exit code a refused flag reports: not one the Agent itself uses.</summary>
public const int ExitViewer = -2;
public Task<AgentToolResult> RunAsync(string flag, CancellationToken ct = default)
{
Log.Warning("viewer: {Flag} is not run from a --data-dir window", flag);
return Task.FromResult(new AgentToolResult(ExitViewer, Strings.Viewer_ChangesThisPc_Off));
}
}
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using Serilog;
namespace FrameLedger.App.Services;
/// <summary>
/// The Run entry as a viewer sees it (beta.15, D52): not this window's to set. A viewer may be a test build, and a Run
/// value pointing at it would start a test build at every logon. The toggle is disabled; a call that reached here anyway
/// writes nothing.
/// </summary>
public sealed class ViewerRunAtLogon : IRunAtLogon
{
public bool IsSet => false;
public void Apply(bool enabled) => Log.Warning("viewer: the Run entry is not changed from a --data-dir window (asked: {Enabled})", enabled);
}
+183
View File
@@ -68,6 +68,7 @@ public static class Strings
nameof(Agent_State_Missing),
nameof(Agent_State_Offline),
nameof(Agent_State_Starting),
nameof(Agent_State_Viewer),
nameof(App_Title),
nameof(Arch_AnyCpu),
nameof(Arch_AnyCpu32),
@@ -106,6 +107,7 @@ public static class Strings
nameof(Chart_Axis_Fps),
nameof(Chart_Axis_Frametime),
nameof(Chart_Axis_Percentile),
nameof(Chart_Axis_RenderScale),
nameof(Chart_Axis_Sensor),
nameof(Chart_Axis_Time),
nameof(Chart_Axis_TimeFromFirstFrame),
@@ -115,6 +117,7 @@ public static class Strings
nameof(Chart_Note_NoApplicationFrames),
nameof(Chart_Note_OutsideRange_Format),
nameof(Chart_Note_PresentsTiming),
nameof(Chart_RenderScale_NotMeasured),
nameof(Chart_Series_AppFrames),
nameof(Chart_Series_Displayed),
nameof(Chart_Series_GpuLoad),
@@ -156,19 +159,28 @@ public static class Strings
nameof(Compare_Metric_Display),
nameof(Compare_Metric_Displayed),
nameof(Compare_Metric_Duration),
nameof(Compare_Metric_Efficiency),
nameof(Compare_Metric_FrameToFrame),
nameof(Compare_Metric_GameRamMedian),
nameof(Compare_Metric_GameRamPeak),
nameof(Compare_Metric_GameVramMedian),
nameof(Compare_Metric_GameVramPeak),
nameof(Compare_Metric_GpuCoreClock),
nameof(Compare_Metric_MaxCpuTemp),
nameof(Compare_Metric_MaxGpuMemTemp),
nameof(Compare_Metric_MaxGpuTemp),
nameof(Compare_Metric_Median),
nameof(Compare_Metric_Monitor),
nameof(Compare_Metric_Native),
nameof(Compare_Metric_P01Low),
nameof(Compare_Metric_P1Low),
nameof(Compare_Metric_PowerLimit),
nameof(Compare_Metric_Presented),
nameof(Compare_Metric_RenderScale),
nameof(Compare_Metric_StutterPct),
nameof(Compare_Metric_TimeBelow60),
nameof(Compare_Metric_TimeBelowRefresh),
nameof(Compare_Metric_Vsync),
nameof(Compare_Metric_Window),
nameof(Compare_Mixed_Body),
nameof(Compare_Mixed_Legend),
@@ -209,6 +221,11 @@ public static class Strings
nameof(Dashboard_Totals_Games),
nameof(Dashboard_Totals_Playtime),
nameof(Dashboard_Totals_ThisWeek),
nameof(DataDir_Missing_Format),
nameof(DataDir_NoFolder),
nameof(DataDir_Profile_Format),
nameof(DataDir_Refused_Title),
nameof(DataDir_Twice),
nameof(DeleteSessions_AgentTooOld),
nameof(DeleteSessions_AllBody_Format),
nameof(DeleteSessions_AllTitle),
@@ -375,9 +392,11 @@ public static class Strings
nameof(FirstRun_Title),
nameof(Format_Duration_HoursMinutes_Format),
nameof(Format_Duration_MinutesSeconds_Format),
nameof(Format_FramesPerJoule_Format),
nameof(Format_Frequency_Format),
nameof(Format_Memory_Gb_Format),
nameof(Format_Memory_Mb_Format),
nameof(Format_Milliseconds_Format),
nameof(Format_Playtime_Hours_Format),
nameof(Format_Playtime_Minutes_Format),
nameof(Format_Resolution_Format),
@@ -678,8 +697,13 @@ public static class Strings
nameof(Rules_Update_NoAgent),
nameof(Rules_Update_Title),
nameof(Sensors_Axis_Gb),
nameof(Sensors_Axis_Mhz),
nameof(Sensors_Axis_Rpm),
nameof(Sensors_Axis_Watts),
nameof(Sensors_Clocks_Header),
nameof(Sensors_Empty),
nameof(Sensors_Limit_Power),
nameof(Sensors_Limit_Thermal),
nameof(Sensors_Ram_Header),
nameof(Sensors_Series_CpuLoad),
nameof(Sensors_Series_CpuTemp),
@@ -854,14 +878,27 @@ public static class Strings
nameof(Summary_Notes_Placeholder),
nameof(Summary_NotFound),
nameof(Summary_Open),
nameof(Summary_RenderScale_Header),
nameof(Summary_Save),
nameof(Summary_Saved),
nameof(Summary_Show_Displayed),
nameof(Summary_Show_Sensors),
nameof(Summary_Stat_Avg),
nameof(Summary_Stat_Below30_Format),
nameof(Summary_Stat_BelowRefresh_Format),
nameof(Summary_Stat_Capture),
nameof(Summary_Stat_Capture_Format),
nameof(Summary_Stat_Clocks_Format),
nameof(Summary_Stat_Cpu),
nameof(Summary_Stat_Display),
nameof(Summary_Stat_DisplayedLow_Format),
nameof(Summary_Stat_Duration),
nameof(Summary_Stat_Efficiency),
nameof(Summary_Stat_Efficiency_Note),
nameof(Summary_Stat_FanMemTemp_Format),
nameof(Summary_Stat_Focus),
nameof(Summary_Stat_Focus_Format),
nameof(Summary_Stat_FrameToFrame),
nameof(Summary_Stat_GameRam),
nameof(Summary_Stat_GameRam_Suffix_Format),
nameof(Summary_Stat_GameRamWs),
@@ -869,16 +906,25 @@ public static class Strings
nameof(Summary_Stat_GameVram),
nameof(Summary_Stat_GameVram_Suffix_Format),
nameof(Summary_Stat_Gpu),
nameof(Summary_Stat_GpuClocks),
nameof(Summary_Stat_GpuLimits),
nameof(Summary_Stat_Limits_Format),
nameof(Summary_Stat_LoadTemp_Format),
nameof(Summary_Stat_Median),
nameof(Summary_Stat_MinMax),
nameof(Summary_Stat_MinMax_Format),
nameof(Summary_Stat_OfFrames_Format),
nameof(Summary_Stat_P01Low),
nameof(Summary_Stat_P1Low),
nameof(Summary_Stat_RaysPerPixel_Format),
nameof(Summary_Stat_RayTracing),
nameof(Summary_Stat_StdDev),
nameof(Summary_Stat_StdDev_Format),
nameof(Summary_Stat_Stutter),
nameof(Summary_Stat_Stutter_Format),
nameof(Summary_Stat_Tearing_Format),
nameof(Summary_Stat_TimeBelow60),
nameof(Summary_Stat_Vsync),
nameof(Summary_Tags_Placeholder),
nameof(Summary_Tier2_Body),
nameof(Summary_Tier2_Why_Blocked_Format),
@@ -943,23 +989,35 @@ public static class Strings
nameof(Trend_Metric_Displayed),
nameof(Trend_Metric_DisplayExclusive),
nameof(Trend_Metric_DisplayWindowed),
nameof(Trend_Metric_Efficiency),
nameof(Trend_Metric_FgFactor),
nameof(Trend_Metric_FrameToFrame),
nameof(Trend_Metric_GameRamMedian),
nameof(Trend_Metric_GameRamPeak),
nameof(Trend_Metric_GameVramMedian),
nameof(Trend_Metric_GameVramPeak),
nameof(Trend_Metric_GpuCoreClock),
nameof(Trend_Metric_Label),
nameof(Trend_Metric_MaxCpuTemp),
nameof(Trend_Metric_MaxGpuMemTemp),
nameof(Trend_Metric_MaxGpuTemp),
nameof(Trend_Metric_NativeFps),
nameof(Trend_Metric_P01Low),
nameof(Trend_Metric_P1Low),
nameof(Trend_Metric_PowerLimitShare),
nameof(Trend_Metric_PresentedFps),
nameof(Trend_Metric_RenderScale),
nameof(Trend_Metric_TimeBelow60),
nameof(Trend_Metric_TimeBelowRefresh),
nameof(Trend_Metric_VsyncShare),
nameof(Trend_Partial_Note),
nameof(Trend_Unit_Celsius),
nameof(Trend_Unit_Factor),
nameof(Trend_Unit_Fps),
nameof(Trend_Unit_FpsPerWatt),
nameof(Trend_Unit_Gigabytes),
nameof(Trend_Unit_Mhz),
nameof(Trend_Unit_Ms),
nameof(Trend_Unit_Percent),
nameof(Trend_Unit_Watts),
nameof(Uninstall_DataFolder_Body),
@@ -995,6 +1053,9 @@ public static class Strings
nameof(Upscaler_DriverReported_Format),
nameof(Upscaler_None),
nameof(Upscaler_Unknown),
nameof(Viewer_Banner_Body_Format),
nameof(Viewer_Banner_Title),
nameof(Viewer_ChangesThisPc_Off),
];
public static string A11y_Games_Sort => ResourceManager.GetString(nameof(A11y_Games_Sort), Culture) ?? nameof(A11y_Games_Sort);
@@ -1075,6 +1136,8 @@ public static class Strings
public static string Agent_State_Starting => ResourceManager.GetString(nameof(Agent_State_Starting), Culture) ?? nameof(Agent_State_Starting);
public static string Agent_State_Viewer => ResourceManager.GetString(nameof(Agent_State_Viewer), Culture) ?? nameof(Agent_State_Viewer);
public static string App_Title => ResourceManager.GetString(nameof(App_Title), Culture) ?? nameof(App_Title);
public static string Arch_AnyCpu => ResourceManager.GetString(nameof(Arch_AnyCpu), Culture) ?? nameof(Arch_AnyCpu);
@@ -1151,6 +1214,8 @@ public static class Strings
public static string Chart_Axis_Percentile => ResourceManager.GetString(nameof(Chart_Axis_Percentile), Culture) ?? nameof(Chart_Axis_Percentile);
public static string Chart_Axis_RenderScale => ResourceManager.GetString(nameof(Chart_Axis_RenderScale), Culture) ?? nameof(Chart_Axis_RenderScale);
public static string Chart_Axis_Sensor => ResourceManager.GetString(nameof(Chart_Axis_Sensor), Culture) ?? nameof(Chart_Axis_Sensor);
public static string Chart_Axis_Time => ResourceManager.GetString(nameof(Chart_Axis_Time), Culture) ?? nameof(Chart_Axis_Time);
@@ -1169,6 +1234,8 @@ public static class Strings
public static string Chart_Note_PresentsTiming => ResourceManager.GetString(nameof(Chart_Note_PresentsTiming), Culture) ?? nameof(Chart_Note_PresentsTiming);
public static string Chart_RenderScale_NotMeasured => ResourceManager.GetString(nameof(Chart_RenderScale_NotMeasured), Culture) ?? nameof(Chart_RenderScale_NotMeasured);
public static string Chart_Series_AppFrames => ResourceManager.GetString(nameof(Chart_Series_AppFrames), Culture) ?? nameof(Chart_Series_AppFrames);
public static string Chart_Series_Displayed => ResourceManager.GetString(nameof(Chart_Series_Displayed), Culture) ?? nameof(Chart_Series_Displayed);
@@ -1251,6 +1318,10 @@ public static class Strings
public static string Compare_Metric_Duration => ResourceManager.GetString(nameof(Compare_Metric_Duration), Culture) ?? nameof(Compare_Metric_Duration);
public static string Compare_Metric_Efficiency => ResourceManager.GetString(nameof(Compare_Metric_Efficiency), Culture) ?? nameof(Compare_Metric_Efficiency);
public static string Compare_Metric_FrameToFrame => ResourceManager.GetString(nameof(Compare_Metric_FrameToFrame), Culture) ?? nameof(Compare_Metric_FrameToFrame);
public static string Compare_Metric_GameRamMedian => ResourceManager.GetString(nameof(Compare_Metric_GameRamMedian), Culture) ?? nameof(Compare_Metric_GameRamMedian);
public static string Compare_Metric_GameRamPeak => ResourceManager.GetString(nameof(Compare_Metric_GameRamPeak), Culture) ?? nameof(Compare_Metric_GameRamPeak);
@@ -1259,8 +1330,12 @@ public static class Strings
public static string Compare_Metric_GameVramPeak => ResourceManager.GetString(nameof(Compare_Metric_GameVramPeak), Culture) ?? nameof(Compare_Metric_GameVramPeak);
public static string Compare_Metric_GpuCoreClock => ResourceManager.GetString(nameof(Compare_Metric_GpuCoreClock), Culture) ?? nameof(Compare_Metric_GpuCoreClock);
public static string Compare_Metric_MaxCpuTemp => ResourceManager.GetString(nameof(Compare_Metric_MaxCpuTemp), Culture) ?? nameof(Compare_Metric_MaxCpuTemp);
public static string Compare_Metric_MaxGpuMemTemp => ResourceManager.GetString(nameof(Compare_Metric_MaxGpuMemTemp), Culture) ?? nameof(Compare_Metric_MaxGpuMemTemp);
public static string Compare_Metric_MaxGpuTemp => ResourceManager.GetString(nameof(Compare_Metric_MaxGpuTemp), Culture) ?? nameof(Compare_Metric_MaxGpuTemp);
public static string Compare_Metric_Median => ResourceManager.GetString(nameof(Compare_Metric_Median), Culture) ?? nameof(Compare_Metric_Median);
@@ -1273,10 +1348,20 @@ public static class Strings
public static string Compare_Metric_P1Low => ResourceManager.GetString(nameof(Compare_Metric_P1Low), Culture) ?? nameof(Compare_Metric_P1Low);
public static string Compare_Metric_PowerLimit => ResourceManager.GetString(nameof(Compare_Metric_PowerLimit), Culture) ?? nameof(Compare_Metric_PowerLimit);
public static string Compare_Metric_Presented => ResourceManager.GetString(nameof(Compare_Metric_Presented), Culture) ?? nameof(Compare_Metric_Presented);
public static string Compare_Metric_RenderScale => ResourceManager.GetString(nameof(Compare_Metric_RenderScale), Culture) ?? nameof(Compare_Metric_RenderScale);
public static string Compare_Metric_StutterPct => ResourceManager.GetString(nameof(Compare_Metric_StutterPct), Culture) ?? nameof(Compare_Metric_StutterPct);
public static string Compare_Metric_TimeBelow60 => ResourceManager.GetString(nameof(Compare_Metric_TimeBelow60), Culture) ?? nameof(Compare_Metric_TimeBelow60);
public static string Compare_Metric_TimeBelowRefresh => ResourceManager.GetString(nameof(Compare_Metric_TimeBelowRefresh), Culture) ?? nameof(Compare_Metric_TimeBelowRefresh);
public static string Compare_Metric_Vsync => ResourceManager.GetString(nameof(Compare_Metric_Vsync), Culture) ?? nameof(Compare_Metric_Vsync);
public static string Compare_Metric_Window => ResourceManager.GetString(nameof(Compare_Metric_Window), Culture) ?? nameof(Compare_Metric_Window);
public static string Compare_Mixed_Body => ResourceManager.GetString(nameof(Compare_Mixed_Body), Culture) ?? nameof(Compare_Mixed_Body);
@@ -1357,6 +1442,16 @@ public static class Strings
public static string Dashboard_Totals_ThisWeek => ResourceManager.GetString(nameof(Dashboard_Totals_ThisWeek), Culture) ?? nameof(Dashboard_Totals_ThisWeek);
public static string DataDir_Missing_Format => ResourceManager.GetString(nameof(DataDir_Missing_Format), Culture) ?? nameof(DataDir_Missing_Format);
public static string DataDir_NoFolder => ResourceManager.GetString(nameof(DataDir_NoFolder), Culture) ?? nameof(DataDir_NoFolder);
public static string DataDir_Profile_Format => ResourceManager.GetString(nameof(DataDir_Profile_Format), Culture) ?? nameof(DataDir_Profile_Format);
public static string DataDir_Refused_Title => ResourceManager.GetString(nameof(DataDir_Refused_Title), Culture) ?? nameof(DataDir_Refused_Title);
public static string DataDir_Twice => ResourceManager.GetString(nameof(DataDir_Twice), Culture) ?? nameof(DataDir_Twice);
public static string DeleteSessions_AgentTooOld => ResourceManager.GetString(nameof(DeleteSessions_AgentTooOld), Culture) ?? nameof(DeleteSessions_AgentTooOld);
public static string DeleteSessions_AllBody_Format => ResourceManager.GetString(nameof(DeleteSessions_AllBody_Format), Culture) ?? nameof(DeleteSessions_AllBody_Format);
@@ -1689,12 +1784,16 @@ public static class Strings
public static string Format_Duration_MinutesSeconds_Format => ResourceManager.GetString(nameof(Format_Duration_MinutesSeconds_Format), Culture) ?? nameof(Format_Duration_MinutesSeconds_Format);
public static string Format_FramesPerJoule_Format => ResourceManager.GetString(nameof(Format_FramesPerJoule_Format), Culture) ?? nameof(Format_FramesPerJoule_Format);
public static string Format_Frequency_Format => ResourceManager.GetString(nameof(Format_Frequency_Format), Culture) ?? nameof(Format_Frequency_Format);
public static string Format_Memory_Gb_Format => ResourceManager.GetString(nameof(Format_Memory_Gb_Format), Culture) ?? nameof(Format_Memory_Gb_Format);
public static string Format_Memory_Mb_Format => ResourceManager.GetString(nameof(Format_Memory_Mb_Format), Culture) ?? nameof(Format_Memory_Mb_Format);
public static string Format_Milliseconds_Format => ResourceManager.GetString(nameof(Format_Milliseconds_Format), Culture) ?? nameof(Format_Milliseconds_Format);
public static string Format_Playtime_Hours_Format => ResourceManager.GetString(nameof(Format_Playtime_Hours_Format), Culture) ?? nameof(Format_Playtime_Hours_Format);
public static string Format_Playtime_Minutes_Format => ResourceManager.GetString(nameof(Format_Playtime_Minutes_Format), Culture) ?? nameof(Format_Playtime_Minutes_Format);
@@ -2295,10 +2394,20 @@ public static class Strings
public static string Sensors_Axis_Gb => ResourceManager.GetString(nameof(Sensors_Axis_Gb), Culture) ?? nameof(Sensors_Axis_Gb);
public static string Sensors_Axis_Mhz => ResourceManager.GetString(nameof(Sensors_Axis_Mhz), Culture) ?? nameof(Sensors_Axis_Mhz);
public static string Sensors_Axis_Rpm => ResourceManager.GetString(nameof(Sensors_Axis_Rpm), Culture) ?? nameof(Sensors_Axis_Rpm);
public static string Sensors_Axis_Watts => ResourceManager.GetString(nameof(Sensors_Axis_Watts), Culture) ?? nameof(Sensors_Axis_Watts);
public static string Sensors_Clocks_Header => ResourceManager.GetString(nameof(Sensors_Clocks_Header), Culture) ?? nameof(Sensors_Clocks_Header);
public static string Sensors_Empty => ResourceManager.GetString(nameof(Sensors_Empty), Culture) ?? nameof(Sensors_Empty);
public static string Sensors_Limit_Power => ResourceManager.GetString(nameof(Sensors_Limit_Power), Culture) ?? nameof(Sensors_Limit_Power);
public static string Sensors_Limit_Thermal => ResourceManager.GetString(nameof(Sensors_Limit_Thermal), Culture) ?? nameof(Sensors_Limit_Thermal);
public static string Sensors_Ram_Header => ResourceManager.GetString(nameof(Sensors_Ram_Header), Culture) ?? nameof(Sensors_Ram_Header);
public static string Sensors_Series_CpuLoad => ResourceManager.GetString(nameof(Sensors_Series_CpuLoad), Culture) ?? nameof(Sensors_Series_CpuLoad);
@@ -2647,6 +2756,8 @@ public static class Strings
public static string Summary_Open => ResourceManager.GetString(nameof(Summary_Open), Culture) ?? nameof(Summary_Open);
public static string Summary_RenderScale_Header => ResourceManager.GetString(nameof(Summary_RenderScale_Header), Culture) ?? nameof(Summary_RenderScale_Header);
public static string Summary_Save => ResourceManager.GetString(nameof(Summary_Save), Culture) ?? nameof(Summary_Save);
public static string Summary_Saved => ResourceManager.GetString(nameof(Summary_Saved), Culture) ?? nameof(Summary_Saved);
@@ -2657,12 +2768,36 @@ public static class Strings
public static string Summary_Stat_Avg => ResourceManager.GetString(nameof(Summary_Stat_Avg), Culture) ?? nameof(Summary_Stat_Avg);
public static string Summary_Stat_Below30_Format => ResourceManager.GetString(nameof(Summary_Stat_Below30_Format), Culture) ?? nameof(Summary_Stat_Below30_Format);
public static string Summary_Stat_BelowRefresh_Format => ResourceManager.GetString(nameof(Summary_Stat_BelowRefresh_Format), Culture) ?? nameof(Summary_Stat_BelowRefresh_Format);
public static string Summary_Stat_Capture => ResourceManager.GetString(nameof(Summary_Stat_Capture), Culture) ?? nameof(Summary_Stat_Capture);
public static string Summary_Stat_Capture_Format => ResourceManager.GetString(nameof(Summary_Stat_Capture_Format), Culture) ?? nameof(Summary_Stat_Capture_Format);
public static string Summary_Stat_Clocks_Format => ResourceManager.GetString(nameof(Summary_Stat_Clocks_Format), Culture) ?? nameof(Summary_Stat_Clocks_Format);
public static string Summary_Stat_Cpu => ResourceManager.GetString(nameof(Summary_Stat_Cpu), Culture) ?? nameof(Summary_Stat_Cpu);
public static string Summary_Stat_Display => ResourceManager.GetString(nameof(Summary_Stat_Display), Culture) ?? nameof(Summary_Stat_Display);
public static string Summary_Stat_DisplayedLow_Format => ResourceManager.GetString(nameof(Summary_Stat_DisplayedLow_Format), Culture) ?? nameof(Summary_Stat_DisplayedLow_Format);
public static string Summary_Stat_Duration => ResourceManager.GetString(nameof(Summary_Stat_Duration), Culture) ?? nameof(Summary_Stat_Duration);
public static string Summary_Stat_Efficiency => ResourceManager.GetString(nameof(Summary_Stat_Efficiency), Culture) ?? nameof(Summary_Stat_Efficiency);
public static string Summary_Stat_Efficiency_Note => ResourceManager.GetString(nameof(Summary_Stat_Efficiency_Note), Culture) ?? nameof(Summary_Stat_Efficiency_Note);
public static string Summary_Stat_FanMemTemp_Format => ResourceManager.GetString(nameof(Summary_Stat_FanMemTemp_Format), Culture) ?? nameof(Summary_Stat_FanMemTemp_Format);
public static string Summary_Stat_Focus => ResourceManager.GetString(nameof(Summary_Stat_Focus), Culture) ?? nameof(Summary_Stat_Focus);
public static string Summary_Stat_Focus_Format => ResourceManager.GetString(nameof(Summary_Stat_Focus_Format), Culture) ?? nameof(Summary_Stat_Focus_Format);
public static string Summary_Stat_FrameToFrame => ResourceManager.GetString(nameof(Summary_Stat_FrameToFrame), Culture) ?? nameof(Summary_Stat_FrameToFrame);
public static string Summary_Stat_GameRam => ResourceManager.GetString(nameof(Summary_Stat_GameRam), Culture) ?? nameof(Summary_Stat_GameRam);
public static string Summary_Stat_GameRam_Suffix_Format => ResourceManager.GetString(nameof(Summary_Stat_GameRam_Suffix_Format), Culture) ?? nameof(Summary_Stat_GameRam_Suffix_Format);
@@ -2677,6 +2812,12 @@ public static class Strings
public static string Summary_Stat_Gpu => ResourceManager.GetString(nameof(Summary_Stat_Gpu), Culture) ?? nameof(Summary_Stat_Gpu);
public static string Summary_Stat_GpuClocks => ResourceManager.GetString(nameof(Summary_Stat_GpuClocks), Culture) ?? nameof(Summary_Stat_GpuClocks);
public static string Summary_Stat_GpuLimits => ResourceManager.GetString(nameof(Summary_Stat_GpuLimits), Culture) ?? nameof(Summary_Stat_GpuLimits);
public static string Summary_Stat_Limits_Format => ResourceManager.GetString(nameof(Summary_Stat_Limits_Format), Culture) ?? nameof(Summary_Stat_Limits_Format);
public static string Summary_Stat_LoadTemp_Format => ResourceManager.GetString(nameof(Summary_Stat_LoadTemp_Format), Culture) ?? nameof(Summary_Stat_LoadTemp_Format);
public static string Summary_Stat_Median => ResourceManager.GetString(nameof(Summary_Stat_Median), Culture) ?? nameof(Summary_Stat_Median);
@@ -2685,10 +2826,16 @@ public static class Strings
public static string Summary_Stat_MinMax_Format => ResourceManager.GetString(nameof(Summary_Stat_MinMax_Format), Culture) ?? nameof(Summary_Stat_MinMax_Format);
public static string Summary_Stat_OfFrames_Format => ResourceManager.GetString(nameof(Summary_Stat_OfFrames_Format), Culture) ?? nameof(Summary_Stat_OfFrames_Format);
public static string Summary_Stat_P01Low => ResourceManager.GetString(nameof(Summary_Stat_P01Low), Culture) ?? nameof(Summary_Stat_P01Low);
public static string Summary_Stat_P1Low => ResourceManager.GetString(nameof(Summary_Stat_P1Low), Culture) ?? nameof(Summary_Stat_P1Low);
public static string Summary_Stat_RaysPerPixel_Format => ResourceManager.GetString(nameof(Summary_Stat_RaysPerPixel_Format), Culture) ?? nameof(Summary_Stat_RaysPerPixel_Format);
public static string Summary_Stat_RayTracing => ResourceManager.GetString(nameof(Summary_Stat_RayTracing), Culture) ?? nameof(Summary_Stat_RayTracing);
public static string Summary_Stat_StdDev => ResourceManager.GetString(nameof(Summary_Stat_StdDev), Culture) ?? nameof(Summary_Stat_StdDev);
public static string Summary_Stat_StdDev_Format => ResourceManager.GetString(nameof(Summary_Stat_StdDev_Format), Culture) ?? nameof(Summary_Stat_StdDev_Format);
@@ -2697,6 +2844,12 @@ public static class Strings
public static string Summary_Stat_Stutter_Format => ResourceManager.GetString(nameof(Summary_Stat_Stutter_Format), Culture) ?? nameof(Summary_Stat_Stutter_Format);
public static string Summary_Stat_Tearing_Format => ResourceManager.GetString(nameof(Summary_Stat_Tearing_Format), Culture) ?? nameof(Summary_Stat_Tearing_Format);
public static string Summary_Stat_TimeBelow60 => ResourceManager.GetString(nameof(Summary_Stat_TimeBelow60), Culture) ?? nameof(Summary_Stat_TimeBelow60);
public static string Summary_Stat_Vsync => ResourceManager.GetString(nameof(Summary_Stat_Vsync), Culture) ?? nameof(Summary_Stat_Vsync);
public static string Summary_Tags_Placeholder => ResourceManager.GetString(nameof(Summary_Tags_Placeholder), Culture) ?? nameof(Summary_Tags_Placeholder);
public static string Summary_Tier2_Body => ResourceManager.GetString(nameof(Summary_Tier2_Body), Culture) ?? nameof(Summary_Tier2_Body);
@@ -2825,8 +2978,12 @@ public static class Strings
public static string Trend_Metric_DisplayWindowed => ResourceManager.GetString(nameof(Trend_Metric_DisplayWindowed), Culture) ?? nameof(Trend_Metric_DisplayWindowed);
public static string Trend_Metric_Efficiency => ResourceManager.GetString(nameof(Trend_Metric_Efficiency), Culture) ?? nameof(Trend_Metric_Efficiency);
public static string Trend_Metric_FgFactor => ResourceManager.GetString(nameof(Trend_Metric_FgFactor), Culture) ?? nameof(Trend_Metric_FgFactor);
public static string Trend_Metric_FrameToFrame => ResourceManager.GetString(nameof(Trend_Metric_FrameToFrame), Culture) ?? nameof(Trend_Metric_FrameToFrame);
public static string Trend_Metric_GameRamMedian => ResourceManager.GetString(nameof(Trend_Metric_GameRamMedian), Culture) ?? nameof(Trend_Metric_GameRamMedian);
public static string Trend_Metric_GameRamPeak => ResourceManager.GetString(nameof(Trend_Metric_GameRamPeak), Culture) ?? nameof(Trend_Metric_GameRamPeak);
@@ -2835,10 +2992,14 @@ public static class Strings
public static string Trend_Metric_GameVramPeak => ResourceManager.GetString(nameof(Trend_Metric_GameVramPeak), Culture) ?? nameof(Trend_Metric_GameVramPeak);
public static string Trend_Metric_GpuCoreClock => ResourceManager.GetString(nameof(Trend_Metric_GpuCoreClock), Culture) ?? nameof(Trend_Metric_GpuCoreClock);
public static string Trend_Metric_Label => ResourceManager.GetString(nameof(Trend_Metric_Label), Culture) ?? nameof(Trend_Metric_Label);
public static string Trend_Metric_MaxCpuTemp => ResourceManager.GetString(nameof(Trend_Metric_MaxCpuTemp), Culture) ?? nameof(Trend_Metric_MaxCpuTemp);
public static string Trend_Metric_MaxGpuMemTemp => ResourceManager.GetString(nameof(Trend_Metric_MaxGpuMemTemp), Culture) ?? nameof(Trend_Metric_MaxGpuMemTemp);
public static string Trend_Metric_MaxGpuTemp => ResourceManager.GetString(nameof(Trend_Metric_MaxGpuTemp), Culture) ?? nameof(Trend_Metric_MaxGpuTemp);
public static string Trend_Metric_NativeFps => ResourceManager.GetString(nameof(Trend_Metric_NativeFps), Culture) ?? nameof(Trend_Metric_NativeFps);
@@ -2847,8 +3008,18 @@ public static class Strings
public static string Trend_Metric_P1Low => ResourceManager.GetString(nameof(Trend_Metric_P1Low), Culture) ?? nameof(Trend_Metric_P1Low);
public static string Trend_Metric_PowerLimitShare => ResourceManager.GetString(nameof(Trend_Metric_PowerLimitShare), Culture) ?? nameof(Trend_Metric_PowerLimitShare);
public static string Trend_Metric_PresentedFps => ResourceManager.GetString(nameof(Trend_Metric_PresentedFps), Culture) ?? nameof(Trend_Metric_PresentedFps);
public static string Trend_Metric_RenderScale => ResourceManager.GetString(nameof(Trend_Metric_RenderScale), Culture) ?? nameof(Trend_Metric_RenderScale);
public static string Trend_Metric_TimeBelow60 => ResourceManager.GetString(nameof(Trend_Metric_TimeBelow60), Culture) ?? nameof(Trend_Metric_TimeBelow60);
public static string Trend_Metric_TimeBelowRefresh => ResourceManager.GetString(nameof(Trend_Metric_TimeBelowRefresh), Culture) ?? nameof(Trend_Metric_TimeBelowRefresh);
public static string Trend_Metric_VsyncShare => ResourceManager.GetString(nameof(Trend_Metric_VsyncShare), Culture) ?? nameof(Trend_Metric_VsyncShare);
public static string Trend_Partial_Note => ResourceManager.GetString(nameof(Trend_Partial_Note), Culture) ?? nameof(Trend_Partial_Note);
public static string Trend_Unit_Celsius => ResourceManager.GetString(nameof(Trend_Unit_Celsius), Culture) ?? nameof(Trend_Unit_Celsius);
@@ -2857,8 +3028,14 @@ public static class Strings
public static string Trend_Unit_Fps => ResourceManager.GetString(nameof(Trend_Unit_Fps), Culture) ?? nameof(Trend_Unit_Fps);
public static string Trend_Unit_FpsPerWatt => ResourceManager.GetString(nameof(Trend_Unit_FpsPerWatt), Culture) ?? nameof(Trend_Unit_FpsPerWatt);
public static string Trend_Unit_Gigabytes => ResourceManager.GetString(nameof(Trend_Unit_Gigabytes), Culture) ?? nameof(Trend_Unit_Gigabytes);
public static string Trend_Unit_Mhz => ResourceManager.GetString(nameof(Trend_Unit_Mhz), Culture) ?? nameof(Trend_Unit_Mhz);
public static string Trend_Unit_Ms => ResourceManager.GetString(nameof(Trend_Unit_Ms), Culture) ?? nameof(Trend_Unit_Ms);
public static string Trend_Unit_Percent => ResourceManager.GetString(nameof(Trend_Unit_Percent), Culture) ?? nameof(Trend_Unit_Percent);
public static string Trend_Unit_Watts => ResourceManager.GetString(nameof(Trend_Unit_Watts), Culture) ?? nameof(Trend_Unit_Watts);
@@ -2928,4 +3105,10 @@ public static class Strings
public static string Upscaler_None => ResourceManager.GetString(nameof(Upscaler_None), Culture) ?? nameof(Upscaler_None);
public static string Upscaler_Unknown => ResourceManager.GetString(nameof(Upscaler_Unknown), Culture) ?? nameof(Upscaler_Unknown);
public static string Viewer_Banner_Body_Format => ResourceManager.GetString(nameof(Viewer_Banner_Body_Format), Culture) ?? nameof(Viewer_Banner_Body_Format);
public static string Viewer_Banner_Title => ResourceManager.GetString(nameof(Viewer_Banner_Title), Culture) ?? nameof(Viewer_Banner_Title);
public static string Viewer_ChangesThisPc_Off => ResourceManager.GetString(nameof(Viewer_ChangesThisPc_Off), Culture) ?? nameof(Viewer_ChangesThisPc_Off);
}
+244
View File
@@ -61,6 +61,10 @@
<value>管理者の許可を待っています…</value>
<comment>review</comment>
</data>
<data name="Agent_State_Viewer" xml:space="preserve">
<value>ビューアー — Agent なし</value>
<comment>review</comment>
</data>
<data name="App_Title" xml:space="preserve">
<value>FrameLedger</value>
<comment>review</comment>
@@ -3897,4 +3901,244 @@
<value>{0:N0} RPM</value>
<comment>review</comment>
</data>
<data name="Format_Milliseconds_Format" xml:space="preserve">
<value>{0:0.00} ms</value>
<comment>review</comment>
</data>
<data name="Format_FramesPerJoule_Format" xml:space="preserve">
<value>{0:0.00} FPS/W</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_TimeBelow60" xml:space="preserve">
<value>60 FPS 未満の時間</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Below30_Format" xml:space="preserve">
<value>30 未満: {0}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_BelowRefresh_Format" xml:space="preserve">
<value>表示 {0} Hz 未満: {1}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_FrameToFrame" xml:space="preserve">
<value>フレーム間の変動</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Vsync" xml:space="preserve">
<value>VSync</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_OfFrames_Format" xml:space="preserve">
<value>フレームの {0}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Tearing_Format" xml:space="preserve">
<value>ティアリング許可: {0}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_RayTracing" xml:space="preserve">
<value>レイトレーシング</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_RaysPerPixel_Format" xml:space="preserve">
<value>1 ピクセルあたり {0:0.00} レイ</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Focus" xml:space="preserve">
<value>ゲームがアクティブ</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Focus_Format" xml:space="preserve">
<value>時間の {0}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Capture" xml:space="preserve">
<value>記録の品質</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Capture_Format" xml:space="preserve">
<value>欠落 {0:N0} · 消失 {1:N0} · 障害 {2:N0}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_DisplayedLow_Format" xml:space="preserve">
<value>表示: {0}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_GpuClocks" xml:space="preserve">
<value>GPU クロック</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Clocks_Format" xml:space="preserve">
<value>コア {0} · メモリ {1}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_FanMemTemp_Format" xml:space="preserve">
<value>ファン {0} · メモリ {1}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_GpuLimits" xml:space="preserve">
<value>GPU の制限</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Limits_Format" xml:space="preserve">
<value>電力 {0} · 温度 {1}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Efficiency" xml:space="preserve">
<value>ワットあたりのフレーム</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_Efficiency_Note" xml:space="preserve">
<value>ゲーム自身のフレーム・GPU 電力のみ</value>
<comment>review</comment>
</data>
<data name="Summary_RenderScale_Header" xml:space="preserve">
<value>レンダースケール</value>
<comment>review</comment>
</data>
<data name="Chart_Axis_RenderScale" xml:space="preserve">
<value>レンダースケール %</value>
<comment>review</comment>
</data>
<data name="Chart_RenderScale_NotMeasured" xml:space="preserve">
<value>このセッションではレンダー解像度を測定していません。</value>
<comment>review</comment>
</data>
<data name="Sensors_Clocks_Header" xml:space="preserve">
<value>クロックとファン</value>
<comment>review</comment>
</data>
<data name="Sensors_Axis_Mhz" xml:space="preserve">
<value>MHz</value>
<comment>review</comment>
</data>
<data name="Sensors_Axis_Rpm" xml:space="preserve">
<value>RPM</value>
<comment>review</comment>
</data>
<data name="Sensors_Limit_Power" xml:space="preserve">
<value>電力制限</value>
<comment>review</comment>
</data>
<data name="Sensors_Limit_Thermal" xml:space="preserve">
<value>温度制限</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_TimeBelow60" xml:space="preserve">
<value>60 FPS 未満の時間 %</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_TimeBelowRefresh" xml:space="preserve">
<value>リフレッシュレート未満の表示 %</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_FrameToFrame" xml:space="preserve">
<value>フレーム間の変動 ms</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_RenderScale" xml:space="preserve">
<value>レンダースケール %</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_VsyncShare" xml:space="preserve">
<value>VSync の割合 %</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_GpuCoreClock" xml:space="preserve">
<value>平均GPUコアクロック MHz</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_MaxGpuMemTemp" xml:space="preserve">
<value>GPU メモリ最高 °C</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_PowerLimitShare" xml:space="preserve">
<value>電力制限の割合 %</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_Efficiency" xml:space="preserve">
<value>ワットあたりのフレーム</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Ms" xml:space="preserve">
<value>ms</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Mhz" xml:space="preserve">
<value>MHz</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_FpsPerWatt" xml:space="preserve">
<value>FPS/W</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_TimeBelow60" xml:space="preserve">
<value>60 FPS 未満の時間</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_TimeBelowRefresh" xml:space="preserve">
<value>リフレッシュレート未満の表示</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_FrameToFrame" xml:space="preserve">
<value>フレーム間の変動</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_Vsync" xml:space="preserve">
<value>VSync の割合</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_RenderScale" xml:space="preserve">
<value>レンダースケール</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_GpuCoreClock" xml:space="preserve">
<value>平均GPUコアクロック</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_MaxGpuMemTemp" xml:space="preserve">
<value>GPU メモリ最高 °C</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_PowerLimit" xml:space="preserve">
<value>電力制限の割合</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_Efficiency" xml:space="preserve">
<value>ワットあたりのフレーム</value>
<comment>review</comment>
</data>
<data name="Viewer_Banner_Title" xml:space="preserve">
<value>コピーを表示中</value>
<comment>review</comment>
</data>
<data name="Viewer_Banner_Body_Format" xml:space="preserve">
<value>このウィンドウは {0} のデータを読み取ります。Agent を起動も接続もしないため何も記録されず、この PC を変更する操作(Windows と同時に起動、Vulkan レイヤー、ログオン タスク、管理者モード、更新)はここでは無効です。</value>
<comment>review</comment>
</data>
<data name="Viewer_ChangesThisPc_Off" xml:space="preserve">
<value>ビューアー ウィンドウ (--data-dir) では使用できません。この PC が変更されるためです。</value>
<comment>review</comment>
</data>
<data name="DataDir_Refused_Title" xml:space="preserve">
<value>FrameLedger はそのフォルダーを開けません</value>
<comment>review</comment>
</data>
<data name="DataDir_NoFolder" xml:space="preserve">
<value>--data-dir にはフォルダーが必要です: FrameLedger.exe --data-dir &lt;フォルダー&gt;</value>
<comment>review</comment>
</data>
<data name="DataDir_Twice" xml:space="preserve">
<value>--data-dir が複数回指定されました。フォルダーを 1 つだけ指定してください: FrameLedger.exe --data-dir &lt;フォルダー&gt;</value>
<comment>review</comment>
</data>
<data name="DataDir_Missing_Format" xml:space="preserve">
<value>フォルダー {0} は存在しません。--data-dir は FrameLedger のデータ フォルダーのコピーを開きます。先にフォルダーをそこへコピーしてください。</value>
<comment>review</comment>
</data>
<data name="DataDir_Profile_Format" xml:space="preserve">
<value>{0} は FrameLedger 自身のデータ フォルダーです。--data-dir はそのコピー用で、テスト ビルドが記録先のデータベースを開かないようにするためのものです。このフォルダーを使うには --data-dir を付けずに FrameLedger を起動してください。</value>
<comment>review</comment>
</data>
</root>
+183
View File
@@ -51,6 +51,9 @@
<data name="Agent_State_Elevating" xml:space="preserve">
<value>Waiting for administrator permission…</value>
</data>
<data name="Agent_State_Viewer" xml:space="preserve">
<value>Viewer — no Agent</value>
</data>
<data name="App_Title" xml:space="preserve">
<value>FrameLedger</value>
</data>
@@ -2933,4 +2936,184 @@ The documents below are the full terms; this summary does not replace them.</val
<data name="Format_Rpm_Format" xml:space="preserve">
<value>{0:N0} RPM</value>
</data>
<data name="Format_Milliseconds_Format" xml:space="preserve">
<value>{0:0.00} ms</value>
</data>
<data name="Format_FramesPerJoule_Format" xml:space="preserve">
<value>{0:0.00} FPS/W</value>
</data>
<data name="Summary_Stat_TimeBelow60" xml:space="preserve">
<value>Time below 60 FPS</value>
</data>
<data name="Summary_Stat_Below30_Format" xml:space="preserve">
<value>below 30: {0}</value>
</data>
<data name="Summary_Stat_BelowRefresh_Format" xml:space="preserve">
<value>display under {0} Hz: {1}</value>
</data>
<data name="Summary_Stat_FrameToFrame" xml:space="preserve">
<value>Frame to frame</value>
</data>
<data name="Summary_Stat_Vsync" xml:space="preserve">
<value>VSync</value>
</data>
<data name="Summary_Stat_OfFrames_Format" xml:space="preserve">
<value>{0} of frames</value>
</data>
<data name="Summary_Stat_Tearing_Format" xml:space="preserve">
<value>tearing allowed: {0}</value>
</data>
<data name="Summary_Stat_RayTracing" xml:space="preserve">
<value>Ray tracing</value>
</data>
<data name="Summary_Stat_RaysPerPixel_Format" xml:space="preserve">
<value>{0:0.00} rays per pixel</value>
</data>
<data name="Summary_Stat_Focus" xml:space="preserve">
<value>Game in focus</value>
</data>
<data name="Summary_Stat_Focus_Format" xml:space="preserve">
<value>{0} of the time</value>
</data>
<data name="Summary_Stat_Capture" xml:space="preserve">
<value>Capture quality</value>
</data>
<data name="Summary_Stat_Capture_Format" xml:space="preserve">
<value>{0:N0} gaps · {1:N0} lost · {2:N0} faults</value>
</data>
<data name="Summary_Stat_DisplayedLow_Format" xml:space="preserve">
<value>displayed: {0}</value>
</data>
<data name="Summary_Stat_GpuClocks" xml:space="preserve">
<value>GPU clocks</value>
</data>
<data name="Summary_Stat_Clocks_Format" xml:space="preserve">
<value>{0} core · {1} memory</value>
</data>
<data name="Summary_Stat_FanMemTemp_Format" xml:space="preserve">
<value>fan {0} · memory {1}</value>
</data>
<data name="Summary_Stat_GpuLimits" xml:space="preserve">
<value>GPU held back</value>
</data>
<data name="Summary_Stat_Limits_Format" xml:space="preserve">
<value>power {0} · heat {1}</value>
</data>
<data name="Summary_Stat_Efficiency" xml:space="preserve">
<value>Frames per watt</value>
</data>
<data name="Summary_Stat_Efficiency_Note" xml:space="preserve">
<value>the game's own frames, GPU power only</value>
</data>
<data name="Summary_RenderScale_Header" xml:space="preserve">
<value>Render scale</value>
</data>
<data name="Chart_Axis_RenderScale" xml:space="preserve">
<value>Render scale %</value>
</data>
<data name="Chart_RenderScale_NotMeasured" xml:space="preserve">
<value>The render resolution was not measured in this session.</value>
</data>
<data name="Sensors_Clocks_Header" xml:space="preserve">
<value>Clocks and fan</value>
</data>
<data name="Sensors_Axis_Mhz" xml:space="preserve">
<value>MHz</value>
</data>
<data name="Sensors_Axis_Rpm" xml:space="preserve">
<value>RPM</value>
</data>
<data name="Sensors_Limit_Power" xml:space="preserve">
<value>held back by its power limit</value>
</data>
<data name="Sensors_Limit_Thermal" xml:space="preserve">
<value>held back by heat</value>
</data>
<data name="Trend_Metric_TimeBelow60" xml:space="preserve">
<value>Time below 60 FPS %</value>
</data>
<data name="Trend_Metric_TimeBelowRefresh" xml:space="preserve">
<value>Display under refresh rate %</value>
</data>
<data name="Trend_Metric_FrameToFrame" xml:space="preserve">
<value>Frame to frame ms</value>
</data>
<data name="Trend_Metric_RenderScale" xml:space="preserve">
<value>Render scale %</value>
</data>
<data name="Trend_Metric_VsyncShare" xml:space="preserve">
<value>VSync share %</value>
</data>
<data name="Trend_Metric_GpuCoreClock" xml:space="preserve">
<value>Avg GPU core clock MHz</value>
</data>
<data name="Trend_Metric_MaxGpuMemTemp" xml:space="preserve">
<value>Max GPU memory °C</value>
</data>
<data name="Trend_Metric_PowerLimitShare" xml:space="preserve">
<value>Held back by power limit %</value>
</data>
<data name="Trend_Metric_Efficiency" xml:space="preserve">
<value>Frames per watt</value>
</data>
<data name="Trend_Unit_Ms" xml:space="preserve">
<value>ms</value>
</data>
<data name="Trend_Unit_Mhz" xml:space="preserve">
<value>MHz</value>
</data>
<data name="Trend_Unit_FpsPerWatt" xml:space="preserve">
<value>FPS/W</value>
</data>
<data name="Compare_Metric_TimeBelow60" xml:space="preserve">
<value>Time below 60 FPS</value>
</data>
<data name="Compare_Metric_TimeBelowRefresh" xml:space="preserve">
<value>Display under refresh rate</value>
</data>
<data name="Compare_Metric_FrameToFrame" xml:space="preserve">
<value>Frame to frame</value>
</data>
<data name="Compare_Metric_Vsync" xml:space="preserve">
<value>VSync share</value>
</data>
<data name="Compare_Metric_RenderScale" xml:space="preserve">
<value>Render scale</value>
</data>
<data name="Compare_Metric_GpuCoreClock" xml:space="preserve">
<value>Avg GPU core clock</value>
</data>
<data name="Compare_Metric_MaxGpuMemTemp" xml:space="preserve">
<value>Max GPU memory °C</value>
</data>
<data name="Compare_Metric_PowerLimit" xml:space="preserve">
<value>Held back by power limit</value>
</data>
<data name="Compare_Metric_Efficiency" xml:space="preserve">
<value>Frames per watt</value>
</data>
<data name="Viewer_Banner_Title" xml:space="preserve">
<value>Viewing a copy</value>
</data>
<data name="Viewer_Banner_Body_Format" xml:space="preserve">
<value>This window reads the data in {0}. It starts and contacts no Agent, so nothing is recorded, and what would change this PC — starting with Windows, the Vulkan layer, the logon task, the administrator mode, updates — is off here.</value>
</data>
<data name="Viewer_ChangesThisPc_Off" xml:space="preserve">
<value>Not available in a viewer window (--data-dir): it would change this PC.</value>
</data>
<data name="DataDir_Refused_Title" xml:space="preserve">
<value>FrameLedger cannot open that folder</value>
</data>
<data name="DataDir_NoFolder" xml:space="preserve">
<value>--data-dir needs a folder: FrameLedger.exe --data-dir &lt;folder&gt;</value>
</data>
<data name="DataDir_Twice" xml:space="preserve">
<value>--data-dir was given more than once. Name one folder: FrameLedger.exe --data-dir &lt;folder&gt;</value>
</data>
<data name="DataDir_Missing_Format" xml:space="preserve">
<value>The folder {0} does not exist. --data-dir opens a copy of a FrameLedger data folder: copy the folder there first.</value>
</data>
<data name="DataDir_Profile_Format" xml:space="preserve">
<value>{0} is FrameLedger's own data folder. --data-dir is for a copy of it, so that a test build never opens the database you record into. To use this folder, start FrameLedger without --data-dir.</value>
</data>
</root>
+183
View File
@@ -46,6 +46,9 @@
<data name="Agent_State_Elevating" xml:space="preserve">
<value>Đang chờ quyền quản trị…</value>
</data>
<data name="Agent_State_Viewer" xml:space="preserve">
<value>Chế độ xem — không có Agent</value>
</data>
<data name="App_Title" xml:space="preserve">
<value>FrameLedger</value>
</data>
@@ -2928,4 +2931,184 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
<data name="Format_Rpm_Format" xml:space="preserve">
<value>{0:N0} vòng/phút</value>
</data>
<data name="Format_Milliseconds_Format" xml:space="preserve">
<value>{0:0.00} ms</value>
</data>
<data name="Format_FramesPerJoule_Format" xml:space="preserve">
<value>{0:0.00} FPS/W</value>
</data>
<data name="Summary_Stat_TimeBelow60" xml:space="preserve">
<value>Thời gian dưới 60 FPS</value>
</data>
<data name="Summary_Stat_Below30_Format" xml:space="preserve">
<value>dưới 30: {0}</value>
</data>
<data name="Summary_Stat_BelowRefresh_Format" xml:space="preserve">
<value>màn hình dưới {0} Hz: {1}</value>
</data>
<data name="Summary_Stat_FrameToFrame" xml:space="preserve">
<value>Chênh lệch giữa các frame</value>
</data>
<data name="Summary_Stat_Vsync" xml:space="preserve">
<value>VSync</value>
</data>
<data name="Summary_Stat_OfFrames_Format" xml:space="preserve">
<value>{0} số frame</value>
</data>
<data name="Summary_Stat_Tearing_Format" xml:space="preserve">
<value>cho phép xé hình: {0}</value>
</data>
<data name="Summary_Stat_RayTracing" xml:space="preserve">
<value>Ray tracing</value>
</data>
<data name="Summary_Stat_RaysPerPixel_Format" xml:space="preserve">
<value>{0:0.00} tia mỗi điểm ảnh</value>
</data>
<data name="Summary_Stat_Focus" xml:space="preserve">
<value>Game đang được chọn</value>
</data>
<data name="Summary_Stat_Focus_Format" xml:space="preserve">
<value>{0} thời gian</value>
</data>
<data name="Summary_Stat_Capture" xml:space="preserve">
<value>Chất lượng ghi</value>
</data>
<data name="Summary_Stat_Capture_Format" xml:space="preserve">
<value>{0:N0} khoảng trống · {1:N0} bị mất · {2:N0} lỗi</value>
</data>
<data name="Summary_Stat_DisplayedLow_Format" xml:space="preserve">
<value>hiển thị: {0}</value>
</data>
<data name="Summary_Stat_GpuClocks" xml:space="preserve">
<value>Xung nhịp GPU</value>
</data>
<data name="Summary_Stat_Clocks_Format" xml:space="preserve">
<value>{0} lõi · {1} bộ nhớ</value>
</data>
<data name="Summary_Stat_FanMemTemp_Format" xml:space="preserve">
<value>quạt {0} · bộ nhớ {1}</value>
</data>
<data name="Summary_Stat_GpuLimits" xml:space="preserve">
<value>GPU bị giới hạn</value>
</data>
<data name="Summary_Stat_Limits_Format" xml:space="preserve">
<value>công suất {0} · nhiệt {1}</value>
</data>
<data name="Summary_Stat_Efficiency" xml:space="preserve">
<value>Frame mỗi watt</value>
</data>
<data name="Summary_Stat_Efficiency_Note" xml:space="preserve">
<value>chỉ frame của game, chỉ công suất GPU</value>
</data>
<data name="Summary_RenderScale_Header" xml:space="preserve">
<value>Tỉ lệ render</value>
</data>
<data name="Chart_Axis_RenderScale" xml:space="preserve">
<value>Tỉ lệ render %</value>
</data>
<data name="Chart_RenderScale_NotMeasured" xml:space="preserve">
<value>Phiên này không đo được độ phân giải render.</value>
</data>
<data name="Sensors_Clocks_Header" xml:space="preserve">
<value>Xung nhịp và quạt</value>
</data>
<data name="Sensors_Axis_Mhz" xml:space="preserve">
<value>MHz</value>
</data>
<data name="Sensors_Axis_Rpm" xml:space="preserve">
<value>vòng/phút</value>
</data>
<data name="Sensors_Limit_Power" xml:space="preserve">
<value>bị giới hạn công suất</value>
</data>
<data name="Sensors_Limit_Thermal" xml:space="preserve">
<value>bị giới hạn do nhiệt</value>
</data>
<data name="Trend_Metric_TimeBelow60" xml:space="preserve">
<value>Thời gian dưới 60 FPS %</value>
</data>
<data name="Trend_Metric_TimeBelowRefresh" xml:space="preserve">
<value>Màn hình dưới tần số quét %</value>
</data>
<data name="Trend_Metric_FrameToFrame" xml:space="preserve">
<value>Chênh lệch giữa các frame ms</value>
</data>
<data name="Trend_Metric_RenderScale" xml:space="preserve">
<value>Tỉ lệ render %</value>
</data>
<data name="Trend_Metric_VsyncShare" xml:space="preserve">
<value>Tỉ lệ VSync %</value>
</data>
<data name="Trend_Metric_GpuCoreClock" xml:space="preserve">
<value>Xung nhịp lõi GPU TB MHz</value>
</data>
<data name="Trend_Metric_MaxGpuMemTemp" xml:space="preserve">
<value>Bộ nhớ GPU tối đa °C</value>
</data>
<data name="Trend_Metric_PowerLimitShare" xml:space="preserve">
<value>Bị giới hạn công suất %</value>
</data>
<data name="Trend_Metric_Efficiency" xml:space="preserve">
<value>Frame mỗi watt</value>
</data>
<data name="Trend_Unit_Ms" xml:space="preserve">
<value>ms</value>
</data>
<data name="Trend_Unit_Mhz" xml:space="preserve">
<value>MHz</value>
</data>
<data name="Trend_Unit_FpsPerWatt" xml:space="preserve">
<value>FPS/W</value>
</data>
<data name="Compare_Metric_TimeBelow60" xml:space="preserve">
<value>Thời gian dưới 60 FPS</value>
</data>
<data name="Compare_Metric_TimeBelowRefresh" xml:space="preserve">
<value>Màn hình dưới tần số quét</value>
</data>
<data name="Compare_Metric_FrameToFrame" xml:space="preserve">
<value>Chênh lệch giữa các frame</value>
</data>
<data name="Compare_Metric_Vsync" xml:space="preserve">
<value>Tỉ lệ VSync</value>
</data>
<data name="Compare_Metric_RenderScale" xml:space="preserve">
<value>Tỉ lệ render</value>
</data>
<data name="Compare_Metric_GpuCoreClock" xml:space="preserve">
<value>Xung nhịp lõi GPU TB</value>
</data>
<data name="Compare_Metric_MaxGpuMemTemp" xml:space="preserve">
<value>Bộ nhớ GPU tối đa °C</value>
</data>
<data name="Compare_Metric_PowerLimit" xml:space="preserve">
<value>Bị giới hạn công suất</value>
</data>
<data name="Compare_Metric_Efficiency" xml:space="preserve">
<value>Frame mỗi watt</value>
</data>
<data name="Viewer_Banner_Title" xml:space="preserve">
<value>Đang xem một bản sao</value>
</data>
<data name="Viewer_Banner_Body_Format" xml:space="preserve">
<value>Cửa sổ này đọc dữ liệu trong {0}. Nó không khởi động và không liên lạc với Agent nào, nên không có gì được ghi lại, và những gì sẽ thay đổi máy này — khởi động cùng Windows, layer Vulkan, tác vụ khi đăng nhập, chế độ quản trị viên, cập nhật — đều tắt ở đây.</value>
</data>
<data name="Viewer_ChangesThisPc_Off" xml:space="preserve">
<value>Không dùng được trong cửa sổ xem (--data-dir): thao tác này sẽ thay đổi máy này.</value>
</data>
<data name="DataDir_Refused_Title" xml:space="preserve">
<value>FrameLedger không mở được thư mục đó</value>
</data>
<data name="DataDir_NoFolder" xml:space="preserve">
<value>--data-dir cần một thư mục: FrameLedger.exe --data-dir &lt;thư mục&gt;</value>
</data>
<data name="DataDir_Twice" xml:space="preserve">
<value>--data-dir được nêu nhiều lần. Hãy chỉ một thư mục: FrameLedger.exe --data-dir &lt;thư mục&gt;</value>
</data>
<data name="DataDir_Missing_Format" xml:space="preserve">
<value>Thư mục {0} không tồn tại. --data-dir mở một bản sao của thư mục dữ liệu FrameLedger: hãy chép thư mục tới đó trước.</value>
</data>
<data name="DataDir_Profile_Format" xml:space="preserve">
<value>{0} là thư mục dữ liệu của chính FrameLedger. --data-dir dành cho một bản sao của nó, để một bản thử nghiệm không bao giờ mở cơ sở dữ liệu bạn đang ghi vào. Để dùng thư mục này, hãy mở FrameLedger không kèm --data-dir.</value>
</data>
</root>
@@ -22,4 +22,7 @@
<Color x:Key="Chart_Histogram">#CC4CC2FF</Color>
<!-- Not a second gold beside Chart_SensorSecondary (beta.8): the Sensors tab draws both. -->
<Color x:Key="Chart_Percentile">#FFFF79C6</Color>
<!-- beta.14: the seventh line on the temperatures plot (the card's memory temperature) — no colour above is 60 apart
from all six beside it. -->
<Color x:Key="Chart_SensorTertiary">#FFE6E6E6</Color>
</ResourceDictionary>
@@ -18,4 +18,6 @@
<Color x:Key="Chart_Histogram">#CC0A6FB3</Color>
<!-- Not Chart_SensorSecondary's gold (beta.8): the Sensors tab draws both, and in this theme they were one colour. -->
<Color x:Key="Chart_Percentile">#FF795548</Color>
<!-- beta.14: the seventh line on the temperatures plot (the card's memory temperature). -->
<Color x:Key="Chart_SensorTertiary">#FFBE008C</Color>
</ResourceDictionary>
@@ -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" />
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.Update;
/// <summary>
/// The updater as a viewer sees it (beta.15, D52): an update replaces this PC's installed copy, so a <c>--data-dir</c>
/// window never looks for one, downloads one or applies one — it answers as a copy the installer did not lay down.
/// </summary>
public sealed class ViewerUpdateClient : IUpdateClient
{
public bool IsInstalled => false;
public string? CurrentVersion => null;
public UpdateCandidate? FindPendingRestart() => null;
public Task<UpdateCandidate?> CheckAsync(bool includePrereleases, CancellationToken ct = default) => Task.FromResult<UpdateCandidate?>(null);
public Task DownloadAsync(UpdateCandidate candidate, IProgress<int>? progress, CancellationToken ct = default) =>
throw new InvalidOperationException("a viewer (--data-dir) does not update");
public void ApplyOnExit(UpdateCandidate candidate) => throw new InvalidOperationException("a viewer (--data-dir) does not update");
}
@@ -182,13 +182,45 @@ public sealed partial class CompareViewModel : ObservableObject
{
Rows.Clear();
SessionRow[] rows = [.. picked.Select(static c => c.Row)];
AddFrameRows(rows);
AddMachineRows(rows);
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Duration, [.. rows.Select(static r => new CompareCell(Formats.Duration(r.DurationSeconds), false))]));
// beta.10: how each session was shown, both tiers. Facts, not scores: no mode is better than another, so none is best.
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Display, [.. rows.Select(static r => new CompareCell(DisplayText.Shares(DisplayText.Of(r)), false))]));
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Window, [.. rows.Select(static r => new CompareCell(DisplayText.Window(DisplayText.Of(r)), false))]));
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Monitor, [.. rows.Select(static r => new CompareCell(DisplayText.Monitor(DisplayText.Of(r)), false))]));
}
/// <summary>
/// The frame rate's rows, hooked sessions only. A statistic a present-only session has over its presents is labelled
/// <c>(presented)</c> in its cell (beta.14, rule 6) — beside a session whose same statistic is over the game's own frames,
/// an unlabelled number would compare two different things as one.
/// </summary>
private void AddFrameRows(SessionRow[] rows)
{
Rows.Add(Row(Strings.Compare_Metric_Native, rows, static r => FpsPresentation.FromRow(r) is { Kind: FpsReadoutKind.Generated or FpsReadoutKind.None } m ? m.Native : null, Formats.Fps, higherIsBetter: true));
Rows.Add(Row(Strings.Compare_Metric_Displayed, rows, static r => FpsPresentation.FromRow(r) is { Kind: FpsReadoutKind.Generated } m ? m.Displayed : null, Formats.Fps, higherIsBetter: true));
Rows.Add(Row(Strings.Compare_Metric_Presented, rows, static r => FpsPresentation.FromRow(r) is { Kind: FpsReadoutKind.Presented or FpsReadoutKind.IdentifiedUncounted } m ? m.Presented : null, Formats.Fps, higherIsBetter: true));
Rows.Add(Row(Strings.Compare_Metric_Median, rows, static r => r.Tier == Domain.Sessions.CaptureTier.Hooked ? r.MedianFps : null, Formats.Fps, higherIsBetter: true));
Rows.Add(Row(Strings.Compare_Metric_P1Low, rows, static r => r.Tier == Domain.Sessions.CaptureTier.Hooked ? r.P1LowFps : null, Formats.Fps, higherIsBetter: true));
Rows.Add(Row(Strings.Compare_Metric_P01Low, rows, static r => r.Tier == Domain.Sessions.CaptureTier.Hooked ? r.P01LowFps : null, Formats.Fps, higherIsBetter: true));
Rows.Add(Row(Strings.Compare_Metric_StutterPct, rows, static r => r.Tier == Domain.Sessions.CaptureTier.Hooked ? r.StutterTimePct : null, static v => v is double d ? d.ToString("0.0", CultureInfo.CurrentCulture) + "%" : Strings.Common_NotAvailable, higherIsBetter: false));
Rows.Add(Row(Strings.Compare_Metric_Median, rows, static r => Hooked(r, r.MedianFps), Formats.Fps, higherIsBetter: true, PresentedLabel));
Rows.Add(Row(Strings.Compare_Metric_P1Low, rows, static r => Hooked(r, r.P1LowFps), Formats.Fps, higherIsBetter: true, PresentedLabel));
Rows.Add(Row(Strings.Compare_Metric_P01Low, rows, static r => Hooked(r, r.P01LowFps), Formats.Fps, higherIsBetter: true, PresentedLabel));
Rows.Add(Row(Strings.Compare_Metric_StutterPct, rows, static r => Hooked(r, r.StutterTimePct), Formats.Share, higherIsBetter: false, PresentedLabel));
// beta.14 (D49): pacing — less time below 60 and less change from frame to frame is better; the refresh share is the
// display's, over presents, generated frames included, and is named for it rather than labelled presented.
Rows.Add(Row(Strings.Compare_Metric_TimeBelow60, rows, static r => Hooked(r, r.TimeBelow60Pct), Formats.Share, higherIsBetter: false, PresentedLabel));
Rows.Add(Row(Strings.Compare_Metric_TimeBelowRefresh, rows, static r => Hooked(r, r.TimeBelowRefreshPct), Formats.Share, higherIsBetter: false));
Rows.Add(Row(Strings.Compare_Metric_FrameToFrame, rows, static r => Hooked(r, r.FrametimeDeltaMeanMs), Formats.Milliseconds, higherIsBetter: false, PresentedLabel));
// What the presents asked for, and the render scale: settings, not scores — no best.
Rows.Add(Row(Strings.Compare_Metric_Vsync, rows, static r => Hooked(r, r.VsyncPresentPct), Formats.Share, higherIsBetter: null));
Rows.Add(Row(Strings.Compare_Metric_RenderScale, rows, static r => r.UpscaleRatio is > 0 ? 100.0 / r.UpscaleRatio.Value : null, Formats.Share, higherIsBetter: null));
}
/// <summary>The machine's rows, both tiers.</summary>
private void AddMachineRows(SessionRow[] rows)
{
Rows.Add(Row(Strings.Compare_Metric_MaxGpuTemp, rows, static r => r.MaxGpuTemp, Formats.Temperature, higherIsBetter: false));
// A load is neither better high nor low (beta.8): a GPU at 99 % may be the bottleneck or simply busy, so neither row
// names a best.
@@ -202,20 +234,28 @@ public sealed partial class CompareViewModel : ObservableObject
Rows.Add(Row(Strings.Compare_Metric_GameVramPeak, rows, static r => r.GameVramDedicatedMaxMb, Formats.Memory, higherIsBetter: null));
Rows.Add(Row(Strings.Compare_Metric_GameRamMedian, rows, static r => r.GameRamPrivateMedianMb, Formats.Memory, higherIsBetter: null));
Rows.Add(Row(Strings.Compare_Metric_GameRamPeak, rows, static r => r.GameRamPrivateMaxMb, Formats.Memory, higherIsBetter: null));
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Duration, [.. rows.Select(static r => new CompareCell(Formats.Duration(r.DurationSeconds), false))]));
// beta.10: how each session was shown, both tiers. Facts, not scores: no mode is better than another, so none is best.
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Display, [.. rows.Select(static r => new CompareCell(DisplayText.Shares(DisplayText.Of(r)), false))]));
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Window, [.. rows.Select(static r => new CompareCell(DisplayText.Window(DisplayText.Of(r)), false))]));
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Monitor, [.. rows.Select(static r => new CompareCell(DisplayText.Monitor(DisplayText.Of(r)), false))]));
// beta.14 (D49): the card. A clock and a power limit are facts about the card, not scores; a cooler memory and more
// of the game's own frames per watt are better.
Rows.Add(Row(Strings.Compare_Metric_GpuCoreClock, rows, static r => r.AvgGpuCoreClockMhz, Formats.Frequency, higherIsBetter: null));
Rows.Add(Row(Strings.Compare_Metric_MaxGpuMemTemp, rows, static r => r.MaxGpuMemTemp, Formats.Temperature, higherIsBetter: false));
Rows.Add(Row(Strings.Compare_Metric_PowerLimit, rows, static r => r.PowerLimitPct, Formats.Share, higherIsBetter: null));
Rows.Add(Row(Strings.Compare_Metric_Efficiency, rows, static r => r.AppFramesPerJoule, Formats.FramesPerJoule, higherIsBetter: true));
}
private static double? Hooked(SessionRow row, double? value) => row.Tier == Domain.Sessions.CaptureTier.Hooked ? value : null;
/// <summary>The <c>(presented)</c> label for a hooked session whose statistics are over presents; null otherwise.</summary>
private static string? PresentedLabel(SessionRow row) =>
row.Tier == Domain.Sessions.CaptureTier.Hooked && FpsPresentation.FromRow(row).Kind == FpsReadoutKind.Presented ? Strings.Summary_Lows_Presented : null;
/// <summary>
/// One row: the value per session, the best (never an N/A) flagged; a row where nothing has a value is all N/A and nothing
/// is best, and a row that ranks nothing (<paramref name="higherIsBetter"/> null) flags none. Since beta.8 the best is the
/// best as SHOWN: two sessions that both read "62" are both best — 62.4 against 62.3 is not a difference the reader sees.
/// </summary>
internal static CompareRowViewModel Row(string metric, IReadOnlyList<SessionRow> rows, Func<SessionRow, double?> value, Func<double?, string> text, bool? higherIsBetter)
internal static CompareRowViewModel Row(string metric, IReadOnlyList<SessionRow> rows, Func<SessionRow, double?> value, Func<double?, string> text, bool? higherIsBetter,
Func<SessionRow, string?>? label = null)
{
double?[] values = [.. rows.Select(value)];
double? best = higherIsBetter switch
@@ -225,9 +265,15 @@ public sealed partial class CompareViewModel : ObservableObject
null => null,
};
string? bestText = best.HasValue ? text(best) : null;
return new CompareRowViewModel(metric, [.. values.Select(v => new CompareCell(text(v), bestText is not null && v.HasValue && string.Equals(text(v), bestText, StringComparison.Ordinal)))]);
// The best is decided on the number as shown; a label beside it (beta.14) says what the number is over, not how good.
return new CompareRowViewModel(metric, [.. values.Select((v, i) => new CompareCell(
Labelled(text(v), v.HasValue ? label?.Invoke(rows[i]) : null),
bestText is not null && v.HasValue && string.Equals(text(v), bestText, StringComparison.Ordinal)))]);
}
private static string Labelled(string text, string? label) => label is null ? text : text + " " + label;
private void OnCandidateChanged(object? sender, PropertyChangedEventArgs e)
{
if (string.Equals(e.PropertyName, nameof(CompareCandidateViewModel.IsSelected), StringComparison.Ordinal))
@@ -40,6 +40,7 @@ public sealed partial class GameDetailViewModel : ObservableObject
private readonly ISessionSummaryOpener _summaries;
private readonly SessionSeriesLoader _loader;
private readonly IAgentLink? _agent;
private readonly UiMode _mode;
private readonly UiThread _ui = new();
private bool _attached;
private readonly IHardwareSnapshotRepository _hardware;
@@ -191,6 +192,13 @@ public sealed partial class GameDetailViewModel : ObservableObject
[ObservableProperty]
private bool _hasLatency;
/// <summary>
/// beta.14: any of the game's sessions measured PC latency, so the Latency tab is shown. Nothing measures Reflex today
/// (<c>sessions.reflex_active</c> is null on every row), and a tab that can only ever say "no data" was noise.
/// </summary>
[ObservableProperty]
private bool _anyLatency;
[ObservableProperty]
private TrendMetric _trendMetric = TrendMetric.PresentedFps;
@@ -210,8 +218,11 @@ public sealed partial class GameDetailViewModel : ObservableObject
public GameDetailViewModel(GameLibrary library, GameSelection selection, HookingConsent consent, IPageNavigator navigator,
IConfirmations confirmations, IEditGamePrompt edit, IMessageStrip strip, ISessionSummaryOpener summaries,
SessionSeriesLoader loader, IHardwareSnapshotRepository hardware, SessionSelection sessionSelection, IGamePicker picker,
RegisteredSettings? settings = null, IAgentLink? agent = null, AntiCheatExceptions? exceptions = null, SessionDeletion? deletion = null)
RegisteredSettings? settings = null, IAgentLink? agent = null, AntiCheatExceptions? exceptions = null, SessionDeletion? deletion = null,
UiMode? mode = null)
{
// beta.15 (D52): a viewer over a copy has no Agent to ask; a composition without a mode (a test) is the profile's App.
_mode = mode ?? UiMode.Profile;
_deletion = deletion;
_exceptions = exceptions;
_settings = settings;
@@ -234,6 +245,12 @@ public sealed partial class GameDetailViewModel : ObservableObject
public static string BackText => Strings.GameDetail_Back;
/// <summary>
/// beta.15 (D52): what asks the Agent — hooking, the exception's grant and withdrawal, re-enabling, Delete all sessions —
/// is live everywhere but in a viewer over a copy, which has none to ask.
/// </summary>
public bool ActsOnThisPc => _mode.ActsOnThisPc;
public static string ExceptionHeader => Strings.GameDetail_Exception_Header;
public static string GrantExceptionText => Strings.GameDetail_Exception_Grant;
@@ -344,6 +361,15 @@ public sealed partial class GameDetailViewModel : ObservableObject
new(TrendMetric.DisplayExclusiveShare, Strings.Trend_Metric_DisplayExclusive),
new(TrendMetric.DisplayBorderlessShare, Strings.Trend_Metric_DisplayBorderless),
new(TrendMetric.DisplayWindowedShare, Strings.Trend_Metric_DisplayWindowed),
new(TrendMetric.TimeBelow60, Strings.Trend_Metric_TimeBelow60),
new(TrendMetric.TimeBelowRefresh, Strings.Trend_Metric_TimeBelowRefresh),
new(TrendMetric.FrameToFrame, Strings.Trend_Metric_FrameToFrame),
new(TrendMetric.RenderScale, Strings.Trend_Metric_RenderScale),
new(TrendMetric.VsyncShare, Strings.Trend_Metric_VsyncShare),
new(TrendMetric.GpuCoreClock, Strings.Trend_Metric_GpuCoreClock),
new(TrendMetric.MaxGpuMemTemp, Strings.Trend_Metric_MaxGpuMemTemp),
new(TrendMetric.PowerLimitShare, Strings.Trend_Metric_PowerLimitShare),
new(TrendMetric.Efficiency, Strings.Trend_Metric_Efficiency),
];
/// <summary>The selected session's decoded series (null: none selected, Tier 2, or swept).</summary>
@@ -424,6 +450,7 @@ public sealed partial class GameDetailViewModel : ObservableObject
}
Present(detail);
AnyLatency = detail.Sessions.Any(static s => s.ReflexActive == true);
ChooseDefaultMetric(detail);
await RebuildTrendAsync(ct).ConfigureAwait(true);
}
@@ -1082,7 +1109,7 @@ public sealed partial class GameDetailViewModel : ObservableObject
// through FR-2.1's dialog as ever, and the Agent's pre-scan names the family; the finding stays on the page.
ExceptionView? exception = ExceptionView.Of(row);
bool exceptionInForce = _exceptionsOn && exception is { Kind: ExceptionViewKind.Granted };
HookToggleEnabled = (!blocked || exceptionInForce) && !Busy && (row.HookEnabled || !notX64);
HookToggleEnabled = ActsOnThisPc && (!blocked || exceptionInForce) && !Busy && (row.HookEnabled || !notX64);
NotX64Text = notX64 && !blocked
? string.Format(CultureInfo.CurrentCulture, Strings.Hooking_NotX64_Format, Formats.Architecture(row.ExeMachine))
: null;
@@ -89,7 +89,8 @@ public sealed partial class GamesViewModel : ObservableObject
public static string ListText => Strings.Games_View_List;
public static IReadOnlyList<Choice<GamesSort>> Sorts { get; } =
/// <summary>The sort orders, labelled in the language this page opened in (beta.15: a static list kept the first language).</summary>
public IReadOnlyList<Choice<GamesSort>> Sorts { get; } =
[
new(GamesSort.Name, Strings.Games_Sort_Name),
new(GamesSort.LastPlayed, Strings.Games_Sort_LastPlayed),
@@ -63,13 +63,14 @@ public sealed partial class LogsViewModel : ObservableObject, IDisposable
public static string Header => Strings.Logs_Header;
public static IReadOnlyList<Choice<LogSource>> Sources { get; } =
/// <summary>The two logs, labelled in the language this page opened in (beta.15: a static list kept the first language).</summary>
public IReadOnlyList<Choice<LogSource>> Sources { get; } =
[
new(LogSource.Ui, Strings.Logs_Source_Ui),
new(LogSource.Agent, Strings.Logs_Source_Agent),
];
public static IReadOnlyList<Choice<LogLevelFilter>> Levels { get; } =
public IReadOnlyList<Choice<LogLevelFilter>> Levels { get; } =
[
new(LogLevelFilter.All, Strings.Logs_Level_All),
new(LogLevelFilter.WarningAndAbove, Strings.Logs_Level_Warning),
@@ -18,9 +18,10 @@ using Wpf.Ui.Controls;
namespace FrameLedger.App.ViewModels;
/// <summary>The shell's state: the Agent pill, the offline banner, and the menu commands that exist in this build.</summary>
public sealed partial class MainWindowViewModel : ObservableObject, IDisposable
public sealed partial class MainWindowViewModel : ObservableObject, IDisposable, ILanguageFollower
{
private readonly AgentConnection _agent;
private readonly IAgentLink _agent;
private readonly UiMode _mode;
private readonly ISnackbarService _snackbar;
private readonly IShellPresence _shell;
private readonly IPageNavigator _navigator;
@@ -61,10 +62,11 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable
private readonly ISessionSummaryOpener _summaries;
private readonly ImportLibraryFlow _import;
public MainWindowViewModel(AgentConnection agent, ISnackbarService snackbar, IShellPresence shell, IPageNavigator navigator, AddGameFlow addGame, SafetyNotices notices,
public MainWindowViewModel(IAgentLink agent, ISnackbarService snackbar, IShellPresence shell, IPageNavigator navigator, AddGameFlow addGame, SafetyNotices notices,
BugReportFlow bugReports, IUrlOpener urls, SessionSelection selection, SessionExportService exports, ISessionSummaryOpener summaries, ImportLibraryFlow import,
UpdateService updates, IDatabaseMaintenancePrompts maintenance, IDocumentWindows documents)
UpdateService updates, IDatabaseMaintenancePrompts maintenance, IDocumentWindows documents, UiMode? mode = null)
{
_mode = mode ?? UiMode.Profile;
_documents = documents ?? throw new ArgumentNullException(nameof(documents));
_maintenance = maintenance ?? throw new ArgumentNullException(nameof(maintenance));
Notices = notices ?? throw new ArgumentNullException(nameof(notices));
@@ -88,6 +90,18 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable
public static string Title => Strings.App_Title;
/// <summary>
/// The menu entries that ask the Agent or change this PC (Update detection rules, Check for updates) are live everywhere
/// but in a viewer (beta.15, D52).
/// </summary>
public bool ActsOnThisPc => _mode.ActsOnThisPc;
/// <summary>D52: a viewer says so above every page, persistently, and names the folder it reads.</summary>
public bool IsViewerBannerVisible => _mode.IsViewer;
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format string is a resource that follows the UI culture")]
public string ViewerBannerBody => _mode.IsViewer ? string.Format(CultureInfo.CurrentCulture, Strings.Viewer_Banner_Body_Format, _mode.DataDirectory) : string.Empty;
/// <summary>08_UI §Notifications policy: the safety events, as persistent InfoBars above every page — never toasts.</summary>
public SafetyNotices Notices { get; }
@@ -124,6 +138,17 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable
[RelayCommand]
private Task RestartToUpdateAsync() => _updates.RestartToUpdateAsync();
/// <summary>
/// The Agent pill, its banner and the update banner in the current language (beta.15): this view model outlives a
/// rebuilt window, and its texts were read at the last change of state.
/// </summary>
public void FollowLanguage()
{
Refresh();
RefreshUpdate();
OnPropertyChanged(nameof(ViewerBannerBody));
}
private void Refresh()
{
(string text, ControlAppearance appearance) = AgentStatusPresentation.Pill(_agent.State);
@@ -168,6 +168,8 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
public static string DistributionHeader => Strings.Summary_Distribution_Header;
public static string RenderScaleHeader => Strings.Summary_RenderScale_Header;
public static string SensorsHeader => Strings.GameDetail_Tab_Sensors;
public static string SensorStatsHeader => Strings.SensorStats_Header;
@@ -395,9 +397,32 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
IReadOnlyDictionary<string, Application.Recording.SensorSeriesStats> stats = Application.Recording.SensorSeriesStats.Parse(row.SensorStatsJson);
string? presented = IsHooked && FpsPresentation.FromRow(row).Kind == FpsReadoutKind.Presented ? Strings.Summary_Lows_Presented : null;
Stats.Clear();
AddFrameCards(row, presented);
AddPacingCards(row, presented);
AddMachineCards(row, stats);
// The table reads what finalize stored; a session from before beta.12 says so rather than computing it here.
SensorStats.Clear();
foreach (SensorStatRowModel line in SensorStatsTable.Rows(stats))
{
SensorStats.Add(line);
}
HasSensorStats = SensorStats.Count > 0;
SensorStatsMissing = !HasSensorStats && (HasSensorCharts || row.AvgGpuLoad is not null || row.MaxGpuTemp is not null) ? Strings.SensorStats_NotStored : null;
}
/// <summary>The frame rate's cards; <paramref name="presented"/> labels the statistics a present-only session has over presents.</summary>
private void AddFrameCards(SessionRow row, string? presented)
{
// CLAUDE.md rule 6 (beta.14): where frames were generated the 1% low is the game's own frames', and the presents' —
// what the display received — stands beside it, never instead of it.
string? displayedLow = IsHooked && Readout.Kind == FpsReadoutKind.Generated && row.DisplayedP1LowFps is double shown
? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_DisplayedLow_Format, Formats.Fps(shown))
: null;
Stats.Add(new StatCardModel(Strings.Summary_Stat_Avg, Readout.Line));
Stats.Add(new StatCardModel(Strings.Summary_Stat_Median, IsHooked ? Formats.Fps(row.MedianFps) : Strings.Common_NotAvailable));
Stats.Add(new StatCardModel(Strings.Summary_Stat_P1Low, IsHooked ? Formats.Fps(row.P1LowFps) : Strings.Common_NotAvailable, presented));
Stats.Add(new StatCardModel(Strings.Summary_Stat_P1Low, IsHooked ? Formats.Fps(row.P1LowFps) : Strings.Common_NotAvailable, presented ?? displayedLow));
Stats.Add(new StatCardModel(Strings.Summary_Stat_P01Low, IsHooked ? Formats.Fps(row.P01LowFps) : Strings.Common_NotAvailable, presented));
Stats.Add(new StatCardModel(Strings.Summary_Stat_MinMax, IsHooked ? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_MinMax_Format, Formats.Fps(row.MinFps), Formats.Fps(row.MaxFps)) : Strings.Common_NotAvailable));
Stats.Add(new StatCardModel(Strings.Summary_Stat_StdDev, IsHooked && row.FrametimeStdDevMs is double sd ? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_StdDev_Format, sd) : Strings.Common_NotAvailable));
@@ -410,8 +435,55 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
string window = DisplayText.Window(display);
Stats.Add(new StatCardModel(Strings.Summary_Stat_Display, DisplayText.Headline(display),
string.Equals(window, Strings.Common_NotAvailable, StringComparison.Ordinal) ? null : window));
}
// The machine, both tiers: telemetry is what a not-hooked session still has. Load is the average, temperature the peak.
/// <summary>
/// beta.14 (D49), hooked sessions: how the frames were paced, what the presents asked for, ray tracing where it was
/// measured, focus, and how complete the record is. A session recorded before beta.14 reads N/A on the new ones.
/// </summary>
private void AddPacingCards(SessionRow row, string? presented)
{
string na = Strings.Common_NotAvailable;
var below = new List<string>(3);
if (IsHooked && row.TimeBelow30Pct is double below30)
{
below.Add(string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_Below30_Format, Formats.Share(below30)));
}
// The refresh share is over what the display received — generated frames included — so it is named for the display.
if (IsHooked && row.TimeBelowRefreshPct is double belowRefresh && row.DisplayMonitorHz is int hz)
{
below.Add(string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_BelowRefresh_Format, hz, Formats.Share(belowRefresh)));
}
if (presented is not null)
{
below.Add(presented);
}
Stats.Add(new StatCardModel(Strings.Summary_Stat_TimeBelow60, IsHooked ? Formats.Share(row.TimeBelow60Pct) : na, below.Count == 0 ? null : string.Join(" · ", below)));
Stats.Add(new StatCardModel(Strings.Summary_Stat_FrameToFrame, IsHooked ? Formats.Milliseconds(row.FrametimeDeltaMeanMs) : na, presented));
Stats.Add(new StatCardModel(Strings.Summary_Stat_Vsync,
IsHooked && row.VsyncPresentPct is double vsync ? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_OfFrames_Format, Formats.Share(vsync)) : na,
IsHooked && row.TearingAllowedPct is double tearing ? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_Tearing_Format, Formats.Share(tearing)) : null));
if (IsHooked && row.RtFramePct is double rt)
{
Stats.Add(new StatCardModel(Strings.Summary_Stat_RayTracing, string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_OfFrames_Format, Formats.Share(rt)),
row.RaysPerPixel is double rays ? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_RaysPerPixel_Format, rays) : null));
}
Stats.Add(new StatCardModel(Strings.Summary_Stat_Focus,
IsHooked && row.DrainTicks is > 0 && row.ForegroundTicks is long focused
? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_Focus_Format, Formats.Share(focused * 100.0 / row.DrainTicks.Value))
: na));
Stats.Add(new StatCardModel(Strings.Summary_Stat_Capture,
IsHooked ? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_Capture_Format, row.GapCount, row.DroppedRecords, row.FaultCount) : na));
}
/// <summary>The machine, both tiers: telemetry is what a not-hooked session still has.</summary>
private void AddMachineCards(SessionRow row, IReadOnlyDictionary<string, Application.Recording.SensorSeriesStats> stats)
{
// Load is the average, temperature the peak.
Stats.Add(new StatCardModel(Strings.Summary_Stat_Gpu, string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_LoadTemp_Format, Formats.Percent(row.AvgGpuLoad), Formats.Temperature(row.MaxGpuTemp))));
Stats.Add(new StatCardModel(Strings.Summary_Stat_Cpu, string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_LoadTemp_Format, Formats.Percent(row.AvgCpuLoad), Formats.Temperature(row.MaxCpuTemp))));
@@ -419,15 +491,18 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
Stats.Add(GameMemoryText.VramCard(row));
Stats.Add(GameMemoryText.RamCard(row, stats));
// The table reads what finalize stored; a session from before beta.12 says so rather than computing it here.
SensorStats.Clear();
foreach (SensorStatRowModel line in SensorStatsTable.Rows(stats))
{
SensorStats.Add(line);
}
HasSensorStats = SensorStats.Count > 0;
SensorStatsMissing = !HasSensorStats && (HasSensorCharts || row.AvgGpuLoad is not null || row.MaxGpuTemp is not null) ? Strings.SensorStats_NotStored : null;
// beta.14 (D49): the card's clocks, fan and memory temperature, what held it back (NVIDIA only), and frames per watt.
bool clocks = row.AvgGpuCoreClockMhz is not null || row.AvgGpuMemClockMhz is not null;
bool fan = row.AvgGpuFanRpm is not null || row.MaxGpuMemTemp is not null;
Stats.Add(new StatCardModel(Strings.Summary_Stat_GpuClocks,
clocks ? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_Clocks_Format, Formats.Frequency(row.AvgGpuCoreClockMhz), Formats.Frequency(row.AvgGpuMemClockMhz)) : Strings.Common_NotAvailable,
fan ? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_FanMemTemp_Format, Formats.Rpm(row.AvgGpuFanRpm), Formats.Temperature(row.MaxGpuMemTemp)) : null));
Stats.Add(new StatCardModel(Strings.Summary_Stat_GpuLimits,
row.PowerLimitPct is not null || row.ThermalLimitPct is not null
? string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_Limits_Format, Formats.Share(row.PowerLimitPct), Formats.Share(row.ThermalLimitPct))
: Strings.Common_NotAvailable));
Stats.Add(new StatCardModel(Strings.Summary_Stat_Efficiency, Formats.FramesPerJoule(row.AppFramesPerJoule),
row.AppFramesPerJoule is null ? null : Strings.Summary_Stat_Efficiency_Note));
}
/// <summary>
@@ -46,6 +46,7 @@ public sealed partial class SettingsViewModel : ObservableObject
private long _sessionTotal;
private readonly IMaintenanceState _maintenance;
private readonly IAgentTool _tool;
private readonly UiMode _mode;
private readonly WindowClosePolicy _closePolicy;
private readonly IFirstRunFlow _firstRun;
private readonly AntiCheatExceptions? _exceptions;
@@ -157,8 +158,12 @@ public sealed partial class SettingsViewModel : ObservableObject
IAgentAdminPrompt? adminPrompt = null,
Func<bool>? agentHeld = null,
IConfirmations? confirmations = null,
SessionDeletion? deletion = null)
SessionDeletion? deletion = null,
UiMode? mode = null)
{
// beta.15 (D52): a viewer over a copy disables what asks the Agent or changes this PC; a composition without a mode
// (a test) is the profile's App.
_mode = mode ?? UiMode.Profile;
// beta.11 (D40): Settings ▸ Data's Delete all sessions — its confirmation and its request; a composition without them
// (a test) deletes nothing.
_confirmations = confirmations;
@@ -196,13 +201,18 @@ public sealed partial class SettingsViewModel : ObservableObject
public static string LanguageLabel => Strings.Settings_Language_Label;
public static IReadOnlyList<Choice<AppTheme>> Themes { get; } =
/// <summary>
/// The themes, labelled in the language this page opened in (beta.15): a static list kept the language the App started
/// in after a change of language, while the rest of the rebuilt page followed it.
/// </summary>
public IReadOnlyList<Choice<AppTheme>> Themes { get; } =
[
new(AppTheme.System, Strings.Settings_Theme_System),
new(AppTheme.Light, Strings.Settings_Theme_Light),
new(AppTheme.Dark, Strings.Settings_Theme_Dark),
];
/// <summary>Each language in its own words, so the same in every language: the one list that may stay static.</summary>
public static IReadOnlyList<Choice<string>> Languages { get; } =
[
new("en", "English"),
@@ -212,9 +222,10 @@ public sealed partial class SettingsViewModel : ObservableObject
/// <summary>
/// D47 (beta.14): Automatic first, its label saying what it resolves to for this copy — "Automatic (Beta)" on a
/// pre-release — then the two explicit choices, either of which wins over the copy.
/// pre-release — then the two explicit choices, either of which wins over the copy. Per page since beta.15, so the
/// labels follow a change of language.
/// </summary>
public static IReadOnlyList<Choice<string>> UpdateChannels { get; } =
public IReadOnlyList<Choice<string>> UpdateChannels { get; } =
[
new(Update.UpdateChannelPolicy.Automatic, string.Format(CultureInfo.CurrentCulture, Strings.Settings_Channel_Auto_Format,
Update.UpdateChannelPolicy.IsPrerelease(UiIdentity.Version) ? Strings.Settings_Channel_Beta : Strings.Settings_Channel_Stable)),
@@ -249,15 +260,22 @@ public sealed partial class SettingsViewModel : ObservableObject
public string KillSwitchState => KillSwitch ? Strings.Settings_KillSwitch_On : Strings.Settings_KillSwitch_Off;
/// <summary>12_BUILD: the registration exists only while a hook-enabled game references the Vulkan loader (P4 PR-2) — the button follows the same rule as the Agent's reconciler.</summary>
public bool CanRegisterLayer => MaintenanceSnapshot.LayerStaged && !MaintenanceSnapshot.LayerRegistered && HookedGames.Any(static g => g.UsesVulkan);
public bool CanRegisterLayer => ActsOnThisPc && MaintenanceSnapshot.LayerStaged && !MaintenanceSnapshot.LayerRegistered && HookedGames.Any(static g => g.UsesVulkan);
public bool CanUnregisterLayer => MaintenanceSnapshot.LayerRegistered;
public bool CanUnregisterLayer => ActsOnThisPc && MaintenanceSnapshot.LayerRegistered;
public bool CanInstallTask => MaintenanceSnapshot.Task == LogonTaskState.NotInstalled;
public bool CanInstallTask => ActsOnThisPc && MaintenanceSnapshot.Task == LogonTaskState.NotInstalled;
public bool CanRepairTask => MaintenanceSnapshot.Task == LogonTaskState.Stale;
public bool CanRepairTask => ActsOnThisPc && MaintenanceSnapshot.Task == LogonTaskState.Stale;
public bool CanRemoveTask => MaintenanceSnapshot.Task is LogonTaskState.Installed or LogonTaskState.Stale;
public bool CanRemoveTask => ActsOnThisPc && (MaintenanceSnapshot.Task is LogonTaskState.Installed or LogonTaskState.Stale);
/// <summary>
/// beta.15 (D52): what asks the Agent or changes this PC — the kill switch, the exceptions' grants, Delete all sessions,
/// the admin mode, the logon task, the Vulkan layer, Start with Windows, the update check — is live everywhere but in a
/// viewer over a copy, which has no Agent and is not this PC's FrameLedger.
/// </summary>
public bool ActsOnThisPc => _mode.ActsOnThisPc;
/// <summary>A pending load or write, for a test to await; the UI does not.</summary>
public Task Pending { get; private set; } = Task.CompletedTask;
@@ -40,8 +40,11 @@ public sealed partial class TrayViewModel : ObservableObject, IDisposable
[NotifyPropertyChangedFor(nameof(Tooltip))]
private bool _isPaused;
public TrayViewModel(IAgentLink agent, IShellPresence shell, ISessionSummaryOpener summaries, IPageNavigator navigator, UpdateService updates)
public TrayViewModel(IAgentLink agent, IShellPresence shell, ISessionSummaryOpener summaries, IPageNavigator navigator, UpdateService updates,
UiMode? mode = null)
{
// beta.15 (D52): a viewer's tray has no Agent to pause; a composition without a mode (a test) is the profile's App.
ActsOnThisPc = (mode ?? UiMode.Profile).ActsOnThisPc;
_agent = agent ?? throw new ArgumentNullException(nameof(agent));
_shell = shell ?? throw new ArgumentNullException(nameof(shell));
_summaries = summaries ?? throw new ArgumentNullException(nameof(summaries));
@@ -67,6 +70,9 @@ public sealed partial class TrayViewModel : ObservableObject, IDisposable
public string PauseText => IsPaused ? Strings.Tray_Resume : Strings.Tray_Pause;
/// <summary>beta.15 (D52): Pause asks the Agent; a viewer over a copy has none, so the tray disables it.</summary>
public bool ActsOnThisPc { get; }
/// <summary>The last saved session, for the balloon's click.</summary>
public long? LastSavedSessionId { get; private set; }
+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,10 +111,13 @@
<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" />
<!-- beta.14 (D49): the render scale over the session -->
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.RenderScaleHeader}" />
<charts:RenderScaleChart x:Name="RenderScale" Margin="0,6,0,0" Height="200" />
</StackPanel>
<!-- sensors, in either tier (beta.8): a session that was not hooked has nothing else to chart -->
@@ -128,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>
@@ -163,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 -->
@@ -63,6 +63,7 @@ public partial class SessionSummaryWindow : FluentWindow
{
Frametime.Show(ViewModel.Series, ViewModel.ShowDisplayed, ViewModel.ShowSensors);
Distribution.Show(ViewModel.Series);
RenderScale.Show(ViewModel.Series, ViewModel.Row);
Sensors.Show(ViewModel.SensorSeries);
}
@@ -288,6 +288,32 @@ public sealed class CaptureSession(
return observed is null ? SessionEndReason.ExecutableUnreadable : null;
}
/// <summary>The guard refused (and the target is not Vulkan-layered): the outcome, held as Tier 2 unless it is launch mode's cue.</summary>
private async Task<CaptureOutcome> RefusedAsync(AntiCheatVerdict verdict, HookRequest request, ExecutableFingerprint observed,
ITargetLiveness alive, int pid, TimeSpan? launchWait, CancellationToken ct, CancellationToken stop)
{
// A finding about the game turns its hooking off here and now (owner decision 2026-09-22), not only at
// the pre-scan: the guard's start-time scan sees the process and the drivers the pre-scan cannot.
bool turnedOff = await TurnHookingOffAsync(observed, verdict, ct).ConfigureAwait(false);
var refused = new CaptureOutcome
{
Reason = RefusalOf(verdict.Reason),
Verdict = verdict,
LaunchWait = launchWait,
HookingTurnedOff = turnedOff,
ExceptionFamily = request.ToleratedFamily,
};
// Launch mode's two guard refusals are the orchestrator's cue to elect a descendant (04_CAPTURE §Launch
// mode); holding the launcher's session open would delay that. Every other refusal is Tier 2 from here.
// The launcher's pid goes with the cue (beta.15): the election looks for the launcher's descendants BY it, and
// an outcome without it made ElectAfterLaunchAsync return before electing anything — since the election was
// written (#150). Its exit code too, as every other ending records one.
return refused.Reason is SessionEndReason.LaunchTargetExited or SessionEndReason.LaunchNoPresentationRuntime
? refused with { TargetPid = pid, ExitCode = alive.ExitCode }
: await HoldUnhookedAsync(refused, observed.ExePath, alive, pid, ct, stop).ConfigureAwait(false);
}
/// <summary>Gate, attach, drain — shared by both modes; <paramref name="started"/> non-null is launch mode.</summary>
private async Task<CaptureOutcome> SessionAsync(int pid, ITargetLiveness alive, GameConsentRecord record,
ExecutableFingerprint observed, string payloadPath, Stopwatch? started, CancellationToken ct, CancellationToken stop)
@@ -312,23 +338,8 @@ public sealed class CaptureSession(
bool layered = verdict.Reason == AntiCheatRefusalReason.TargetIsVulkanLayered;
if (!verdict.IsAllowed && !layered)
{
// A finding about the game turns its hooking off here and now (owner decision 2026-09-22), not only at
// the pre-scan: the guard's start-time scan sees the process and the drivers the pre-scan cannot.
bool turnedOff = await TurnHookingOffAsync(observed, verdict, ct).ConfigureAwait(false);
var refused = new CaptureOutcome
{
Reason = RefusalOf(verdict.Reason),
Verdict = verdict,
LaunchWait = launchWait,
HookingTurnedOff = turnedOff,
ExceptionFamily = request.ToleratedFamily,
};
channel?.Dispose();
// Launch mode's two guard refusals are the orchestrator's cue to elect a descendant (04_CAPTURE §Launch
// mode); holding the launcher's session open would delay that. Every other refusal is Tier 2 from here.
return refused.Reason is SessionEndReason.LaunchTargetExited or SessionEndReason.LaunchNoPresentationRuntime
? refused
: await HoldUnhookedAsync(refused, observedPath, alive, pid, ct, stop).ConfigureAwait(false);
return await RefusedAsync(verdict, request, observed, alive, pid, launchWait, ct, stop).ConfigureAwait(false);
}
TimeSpan attachBudget = layered ? options.LaunchWaitBudget : options.AttachBudget;
@@ -72,6 +72,11 @@ public sealed class CaptureOrchestrator
// not an entry's, and a launch that spawns five of them is said once.
private readonly Dictionary<int, string> _declined = [];
// beta.15: a process of an executable whose session was still running — often still FINALIZING — when it appeared:
// a game started again at once. The watcher reports a pid once, so until beta.15 it was never recorded. The newest one
// per executable is kept here, under the table's lock, and started when that session ends (Reap).
private readonly Dictionary<string, Deferred> _deferred = new(StringComparer.OrdinalIgnoreCase);
public CaptureOrchestrator(ISessionRecorder recorder, IGameRepository games, IProcessSnapshotSource processes,
IExecutableIdentitySource identity, OrchestratorOptions options, Action<string> log, ILaunchRecorderFactory? launches = null,
ExecutableRelocator? relocator = null, LatestProcessSnapshot? latest = null, CrashReporterWitness? reporters = null)
@@ -158,12 +163,12 @@ public sealed class CaptureOrchestrator
switch (e)
{
case TrackedProcessAppeared { StalePath: false } appeared:
Start(appeared, ct);
Start(appeared, StartedAt(snapshot, appeared.Pid), ct);
break;
case TrackedProcessAppeared nameOnly:
if (await AdoptIfMovedAsync(nameOnly, ct).ConfigureAwait(false) is { } adopted)
{
Start(adopted, ct);
Start(adopted, StartedAt(snapshot, adopted.Pid), ct);
}
else
{
@@ -183,10 +188,23 @@ public sealed class CaptureOrchestrator
}
}
Reap();
Reap(snapshot, ct);
return events;
}
private static DateTimeOffset? StartedAt(IReadOnlyList<ProcessSnapshot> snapshot, int pid)
{
foreach (ProcessSnapshot p in snapshot)
{
if (p.Pid == pid)
{
return p.StartedAt;
}
}
return null;
}
/// <summary>The entries FrameLedger watches for: the library minus those whose recording the user switched off.</summary>
private static List<GameRow> Recorded(IReadOnlyList<GameRow> library) => [.. library.Where(static g => g.RecordSessions)];
@@ -287,12 +305,19 @@ public sealed class CaptureOrchestrator
public async Task<RecordedSession?> ElectAfterLaunchAsync(RecordedSession launched, CancellationToken ct)
{
ArgumentNullException.ThrowIfNull(launched);
if (launched.Outcome.Reason is not (SessionEndReason.LaunchTargetExited or SessionEndReason.LaunchNoPresentationRuntime)
|| launched.Outcome.TargetPid == 0)
if (launched.Outcome.Reason is not (SessionEndReason.LaunchTargetExited or SessionEndReason.LaunchNoPresentationRuntime))
{
return null;
}
// Never silent again (beta.15): an outcome without the launcher's pid returned here without a word, and the operator's
// guide (spike-notes §14.2) told them to read an `election:` line that could not appear.
if (launched.Outcome.TargetPid == 0)
{
_log("election: the launch ended without the launcher's pid; nothing to elect from");
return null;
}
IReadOnlyList<GameRow> watchlist = Recorded(await _games.ListAsync(ct).ConfigureAwait(false));
HashSet<string> tracked = new(watchlist.Select(static g => g.Fingerprint.ExePath), StringComparer.OrdinalIgnoreCase);
ProcessSnapshot? elected = DescendantElection.Elect(_processes.Take(), launched.Outcome.TargetPid, tracked.Contains);
@@ -360,30 +385,33 @@ public sealed class CaptureOrchestrator
}
}
private void Start(TrackedProcessAppeared appeared, CancellationToken ct)
private void Start(TrackedProcessAppeared appeared, DateTimeOffset? startedAt, CancellationToken ct)
{
lock (_table)
{
if (_running.TryGetValue(appeared.ImagePath, out Running? current) && !current.Task.IsCompleted)
{
_log($"watch: pid {appeared.Pid} ({appeared.Game.Name}) appeared while a session for that executable is running; one at a time");
_deferred[appeared.ImagePath] = new Deferred(appeared, startedAt);
_log($"watch: pid {appeared.Pid} ({appeared.Game.Name}) appeared while a session for that executable is running; one at a time"
+ " - it is recorded when that session ends, if it is then the executable's only process");
return;
}
_log($"watch: pid {appeared.Pid} ({appeared.Game.Name}) appeared; starting a session");
var running = new Running(Guid.NewGuid(), appeared.Game.Id);
RecordRequest request = Attach(appeared.ImagePath, appeared.Game.Name, running.SessionGuid, running.Stop.Token);
running.Task = RunAndReportAsync(_recorder, request, ct);
running.Task = RunAndReportAsync(_recorder, request, running, ct);
_running[appeared.ImagePath] = running;
}
}
/// <summary>The session on its own task, reporting its own end; nothing else awaits a stored task.</summary>
private async Task RunAndReportAsync(ISessionRecorder recorder, RecordRequest request, CancellationToken ct)
private async Task RunAndReportAsync(ISessionRecorder recorder, RecordRequest request, Running? running, CancellationToken ct)
{
try
{
RecordedSession r = await Task.Run(() => recorder.RecordAsync(request, ct), ct).ConfigureAwait(false);
running?.Recorded = r;
Report(r, Name(request));
}
catch (OperationCanceledException)
@@ -474,8 +502,9 @@ public sealed class CaptureOrchestrator
};
}
private void Reap()
private void Reap(IReadOnlyList<ProcessSnapshot> snapshot, CancellationToken ct)
{
var restarts = new List<Deferred>();
lock (_table)
{
foreach ((string path, Running running) in _running.ToArray())
@@ -483,10 +512,21 @@ public sealed class CaptureOrchestrator
if (running.Task.IsCompleted)
{
_running.Remove(path);
if (_deferred.Remove(path, out Deferred? deferred) && deferred.StartsAfter(running, snapshot))
{
restarts.Add(deferred);
}
running.Dispose();
}
}
}
foreach (Deferred d in restarts)
{
_log($"watch: pid {d.Appeared.Pid} ({d.Appeared.Game.Name}) started while the last session of its executable was ending; recording it now");
Start(d.Appeared, d.StartedAt, ct);
}
}
private async Task DrainRunningAsync()
@@ -505,6 +545,27 @@ public sealed class CaptureOrchestrator
}
}
/// <summary>
/// A process turned away because its executable's session was running (beta.15). It is recorded when that session ends
/// only if the session ended on its own (a cancelled or faulted one — the host stopping — starts nothing), the process
/// is still the same one (pid and start time), and it is then the executable's ONLY process: a game started again has
/// replaced the old one, where a helper of a multi-process game (NW.js, Electron — one executable, many processes)
/// still has the game beside it, or several of its kind.
/// </summary>
private sealed record Deferred(TrackedProcessAppeared Appeared, DateTimeOffset? StartedAt)
{
public bool StartsAfter(Running ended, IReadOnlyList<ProcessSnapshot> snapshot)
{
if (ended.Recorded is null)
{
return false;
}
ProcessSnapshot[] same = [.. snapshot.Where(p => p.ImagePath is { } image && string.Equals(image, Appeared.ImagePath, StringComparison.OrdinalIgnoreCase))];
return same.Length == 1 && same[0].Pid == Appeared.Pid && (StartedAt is null || same[0].StartedAt == StartedAt);
}
}
/// <summary>One started session: its guid (chosen here, so the stop is addressable), its entry, its task, its stop token.</summary>
private sealed class Running(Guid sessionGuid, long gameId) : IDisposable
{
@@ -517,6 +578,9 @@ public sealed class CaptureOrchestrator
public Task Task { get; set; } = System.Threading.Tasks.Task.CompletedTask;
/// <summary>The session as recorded; null until it ended, and for one cancelled or faulted. Written before <see cref="Task"/> completes.</summary>
public RecordedSession? Recorded { get; set; }
public void Dispose() => Stop.Dispose();
}
}
@@ -11,6 +11,7 @@ set(FL_INJECTOR_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/src/fl_ac_rules.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/fl_guard.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/fl_guard_sources.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/fl_guard_scanset.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/fl_prescan.cpp"
PARENT_SCOPE
)
@@ -20,6 +21,7 @@ add_library(FrameLedger.Injector STATIC
src/fl_ac_rules.cpp
src/fl_guard.cpp
src/fl_guard_sources.cpp
src/fl_guard_scanset.cpp
src/fl_prescan.cpp
)
target_include_directories(FrameLedger.Injector PUBLIC include)
@@ -53,6 +55,7 @@ add_library(FrameLedger.Guard SHARED
src/fl_ac_rules.cpp
src/fl_guard.cpp
src/fl_guard_sources.cpp
src/fl_guard_scanset.cpp
src/fl_prescan.cpp
src/fl_guard_abi.cpp
)
@@ -0,0 +1,63 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
#pragma once
// The §S16 scan set's walk, as a function of one process snapshot (beta.15, owner decision D51).
//
// The guard scans the injection target, its ancestors up to (excluding) the first platform launcher, and its
// descendants. A snapshot links a process to its parent by a pid alone, and Windows reuses pids: a process whose parent
// has exited names a pid that may now belong to anything. Until beta.15 the walk followed that pid - an unrelated
// process scanned as the game's "launcher", a protected one refusing the session as unreadable, a blocklisted one
// turning the game's hooking off for good (19_SAFETY §What a finding does to the game) - and a cycle of reused pids
// sent the same processes again and again.
//
// D51: a parent/child link is cut ONLY when it is proven wrong - both creation times read, and the child created before
// the process whose pid it names as its parent. A time that cannot be read keeps the link: the guard fails closed
// (CLAUDE.md rule 2), and a member it then cannot read refuses as before. Each pid is walked once and sent once.
//
// Pure over its inputs and allocation-free, so guard_test.cpp drives it with rows of its own; EnumerateScanSetImpl
// (fl_guard_sources.cpp) feeds it a Toolhelp snapshot and ProcessCreatedAt.
#include <cstddef>
#include <cstdint>
#include "fl_guard.h"
namespace fl::guard {
// One process of the snapshot.
struct ScanSetRow {
std::uint32_t pid;
std::uint32_t ppid;
bool launcher; // a platform launcher: the ancestor walk stops below it
};
// What the walk asks of its caller: a process's creation time (FILETIME ticks; 0 when it could not be read), and where
// each member goes (false stops the walk, as the scan-set sink does when its set is full).
struct ScanSetEnv {
std::uint64_t (*created)(void* ctx, std::uint32_t pid);
void* createdCtx;
bool (*sink)(void* ctx, std::uint32_t pid);
void* sinkCtx;
};
inline constexpr std::size_t kScanSetMaxDepth = 16; // ancestors walked at most
inline constexpr std::size_t kScanSetFrontier = 512; // the target and its descendants; one more is kFailed
// The target first, then its ancestors nearest first, then its descendants breadth-first. kFailed when the target is
// not in `rows` or the descendants overflow kScanSetFrontier; kOk otherwise, including when the sink stopped the walk.
Collected WalkScanSet(const ScanSetRow* rows, std::size_t count, std::uint32_t targetPid,
const ScanSetEnv& env) noexcept;
// D51's one rule: a link is proven wrong when both times were read and the child was created before its parent. Equal
// times keep it - a parent and a child can be created within one tick of the clock.
constexpr bool ProvenNotItsChild(std::uint64_t parentCreated, std::uint64_t childCreated) noexcept {
return parentCreated != 0 && childCreated != 0 && childCreated < parentCreated;
}
// A process's creation time, read with the module scan's own read-only right (PROCESS_QUERY_LIMITED_INFORMATION) and
// GetProcessTimes, which reads nothing inside the process (rule 4). 0 when it cannot be read. fl_guard_sources.cpp.
std::uint64_t ProcessCreatedAt(std::uint32_t pid) noexcept;
} // namespace fl::guard
@@ -0,0 +1,104 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
#include <fl_guard_scanset.h>
namespace fl::guard {
namespace {
const ScanSetRow* Find(const ScanSetRow* rows, std::size_t count, std::uint32_t pid) noexcept {
for (std::size_t i = 0; i < count; ++i) {
if (rows[i].pid == pid) {
return &rows[i];
}
}
return nullptr;
}
bool Contains(const std::uint32_t* pids, std::size_t count, std::uint32_t pid) noexcept {
for (std::size_t i = 0; i < count; ++i) {
if (pids[i] == pid) {
return true;
}
}
return false;
}
} // namespace
Collected WalkScanSet(const ScanSetRow* rows, std::size_t count, std::uint32_t targetPid,
const ScanSetEnv& env) noexcept {
const ScanSetRow* target = Find(rows, count, targetPid);
if (target == nullptr) {
return Collected::kFailed; // we were asked about a process that is not there
}
// What went to the sink, so nothing goes twice: the target, at most kScanSetMaxDepth ancestors, the descendants.
std::uint32_t sent[1 + kScanSetMaxDepth + kScanSetFrontier];
std::size_t sentCount = 0;
if (!env.sink(env.sinkCtx, targetPid)) {
return Collected::kOk;
}
sent[sentCount++] = targetPid;
const std::uint64_t targetCreated = env.created(env.createdCtx, targetPid);
// Ancestors, stopping below the first platform launcher - and at a parent created after its child: the real parent
// has exited and its pid is reused, so what holds it now is no part of the game, and nor is anything above it.
const ScanSetRow* cur = target;
std::uint64_t curCreated = targetCreated;
for (std::size_t depth = 0; depth < kScanSetMaxDepth && cur->ppid != 0; ++depth) {
const ScanSetRow* parent = Find(rows, count, cur->ppid);
if (parent == nullptr || parent->launcher || Contains(sent, sentCount, parent->pid)) {
break;
}
const std::uint64_t parentCreated = env.created(env.createdCtx, parent->pid);
if (ProvenNotItsChild(parentCreated, curCreated)) {
break;
}
if (!env.sink(env.sinkCtx, parent->pid)) {
return Collected::kOk;
}
sent[sentCount++] = parent->pid;
cur = parent;
curCreated = parentCreated;
}
// Descendants, breadth-first. A process created before the one whose pid it names as its parent is not its child -
// its real parent held that pid earlier. Each pid is walked once, so a cycle of reused pids ends; one already sent
// (an ancestor the snapshot also lists as a child) is walked but not sent again - an unproven link is kept.
std::uint32_t frontier[kScanSetFrontier];
std::uint64_t frontierCreated[kScanSetFrontier];
std::size_t head = 0;
std::size_t tail = 0;
frontier[tail] = targetPid;
frontierCreated[tail++] = targetCreated;
while (head < tail) {
const std::uint32_t p = frontier[head];
const std::uint64_t pCreated = frontierCreated[head++];
for (std::size_t i = 0; i < count; ++i) {
const std::uint32_t child = rows[i].pid;
if (rows[i].ppid != p || Contains(frontier, tail, child)) {
continue;
}
const std::uint64_t created = env.created(env.createdCtx, child);
if (ProvenNotItsChild(pCreated, created)) {
continue;
}
if (tail >= kScanSetFrontier) {
return Collected::kFailed;
}
frontier[tail] = child;
frontierCreated[tail++] = created;
if (Contains(sent, sentCount, child)) {
continue;
}
if (!env.sink(env.sinkCtx, child)) {
return Collected::kOk;
}
sent[sentCount++] = child;
}
}
return Collected::kOk;
}
} // namespace fl::guard
@@ -24,6 +24,7 @@
#include <cwchar>
#include <fl_ac_rules.h>
#include <fl_guard.h>
#include <fl_guard_scanset.h>
#include <fl_prescan.h>
#include <psapi.h>
#include <tlhelp32.h>
@@ -257,19 +258,22 @@ Collected QueryServiceImpl(const char* name, bool* present) noexcept {
// §S16: the injection target, its descendants, and its ancestors up to but
// excluding the first known platform launcher.
std::uint64_t CreatedAtImpl(void*, std::uint32_t pid) {
return ProcessCreatedAt(pid);
}
// The §S16 scan set from one Toolhelp snapshot, walked by WalkScanSet (fl_guard_scanset.cpp), which reads creation
// times as it goes and cuts a link only when they prove it wrong (D51, beta.15). The rows are static because the guard
// is not re-entrant: NativeAntiCheatGuard serialises every call into it.
Collected EnumerateScanSetImpl(std::uint32_t targetPid, bool (*sink)(void*, std::uint32_t), void* ctx) noexcept {
HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (snap == INVALID_HANDLE_VALUE) {
return Collected::kFailed;
}
struct Entry {
DWORD pid;
DWORD ppid;
wchar_t name[MAX_PATH];
};
static Entry entries[4096];
size_t count = 0;
constexpr std::size_t kMaxRows = 4096;
static ScanSetRow rows[kMaxRows];
std::size_t count = 0;
PROCESSENTRY32W pe{};
pe.dwSize = sizeof(pe);
@@ -278,84 +282,16 @@ Collected EnumerateScanSetImpl(std::uint32_t targetPid, bool (*sink)(void*, std:
return Collected::kFailed;
}
do {
if (count >= 4096) {
if (count >= kMaxRows) {
CloseHandle(snap);
return Collected::kFailed; // a machine we cannot fully enumerate
}
entries[count].pid = pe.th32ProcessID;
entries[count].ppid = pe.th32ParentProcessID;
wcscpy_s(entries[count].name, pe.szExeFile);
++count;
rows[count++] = ScanSetRow{pe.th32ProcessID, pe.th32ParentProcessID, IsPlatformLauncher(pe.szExeFile)};
} while (Process32NextW(snap, &pe));
CloseHandle(snap);
bool targetFound = false;
for (size_t i = 0; i < count; ++i) {
if (entries[i].pid == targetPid) {
targetFound = true;
}
}
if (!targetFound) {
return Collected::kFailed; // we were asked about a process that is not there
}
if (!sink(ctx, targetPid)) {
return Collected::kOk;
}
// Ancestors, stopping below the first platform launcher.
DWORD cur = targetPid;
for (int depth = 0; depth < 16; ++depth) {
DWORD parent = 0;
for (size_t i = 0; i < count; ++i) {
if (entries[i].pid == cur) {
parent = entries[i].ppid;
}
}
if (parent == 0) {
break;
}
bool found = false;
for (size_t i = 0; i < count; ++i) {
if (entries[i].pid != parent) {
continue;
}
found = true;
if (IsPlatformLauncher(entries[i].name)) {
parent = 0; // boundary: the game's tree ends here
}
break;
}
if (!found || parent == 0) {
break;
}
if (!sink(ctx, parent)) {
return Collected::kOk;
}
cur = parent;
}
// Descendants of the target, breadth-first over the snapshot.
static DWORD frontier[512];
size_t head = 0;
size_t tail = 0;
frontier[tail++] = targetPid;
while (head < tail) {
const DWORD p = frontier[head++];
for (size_t i = 0; i < count; ++i) {
if (entries[i].ppid != p || entries[i].pid == targetPid) {
continue;
}
if (tail >= 512) {
return Collected::kFailed;
}
frontier[tail++] = entries[i].pid;
if (!sink(ctx, entries[i].pid)) {
return Collected::kOk;
}
}
}
return Collected::kOk;
const ScanSetEnv env{&CreatedAtImpl, nullptr, sink, ctx};
return WalkScanSet(rows, count, targetPid, env);
}
std::size_t ReadRulesFileImpl(char* buffer, std::size_t cap) noexcept {
@@ -1002,6 +938,23 @@ Collected ModuleSignerOrganisationImpl(const wchar_t* modulePath, char* out, std
} // namespace
std::uint64_t ProcessCreatedAt(std::uint32_t pid) noexcept {
HANDLE h = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
if (h == nullptr) {
return 0;
}
FILETIME created{};
FILETIME exited{};
FILETIME kernel{};
FILETIME user{};
const BOOL read = GetProcessTimes(h, &created, &exited, &kernel, &user);
CloseHandle(h);
if (!read) {
return 0;
}
return (static_cast<std::uint64_t>(created.dwHighDateTime) << 32) | created.dwLowDateTime;
}
Sources SystemSources() noexcept {
Sources s;
s.EnumerateModules = &EnumerateModulesImpl;
+198 -2
View File
@@ -24,6 +24,7 @@
#include <cwchar>
#include <fl_ac_rules.h>
#include <fl_guard.h>
#include <fl_guard_scanset.h>
#include <fl_prescan.h>
#include <map>
#include <memory>
@@ -649,8 +650,8 @@ TEST_CASE("EVERY process in the scan set is scanned, not just the target", "[gua
// processes; it does not prove it looked at the right three, and it cannot
// prove it ACTED on what it found in one of them. Both are now assertable.
ResetFake();
// TARGET FIRST, mirroring EnumerateScanSetImpl (fl_guard_sources.cpp emits
// the injection target, then ancestors, then descendants). The order is not
// TARGET FIRST, mirroring WalkScanSet (fl_guard_scanset.cpp sends the
// injection target, then ancestors, then descendants). The order is not
// cosmetic here: with the target last, a guard that scanned only the FIRST
// entry would still refuse in the launcher case below and the section would
// pass while covering nothing. Measured — that is exactly what happened when
@@ -714,6 +715,201 @@ TEST_CASE("EVERY process in the scan set is scanned, not just the target", "[gua
}
}
// ===========================================================================
// D51 (owner decision, beta.15) — the scan set's walk cuts a parent/child link
// only when creation times PROVE it wrong, and walks each pid once.
//
// Windows reuses pids. A launcher that exited after starting its game leaves the
// game naming a pid that may now belong to anything, and until beta.15 the walk
// scanned whatever held it: a protected process refused the session as
// unreadable, a blocklisted one turned the game's hooking off for good. The
// direction that matters most is the other one, and most sections below are
// about it: a link whose times cannot be read is KEPT, so nothing here makes the
// scan set smaller on a guess.
// ===========================================================================
namespace {
struct WalkFixture {
std::vector<ScanSetRow> rows;
std::map<std::uint32_t, std::uint64_t> created; // absent: the time could not be read
std::vector<std::uint32_t> sent;
std::size_t stopAfter = SIZE_MAX;
};
std::uint64_t WalkCreated(void* ctx, std::uint32_t pid) {
const auto* f = static_cast<const WalkFixture*>(ctx);
const auto it = f->created.find(pid);
return it == f->created.end() ? 0 : it->second;
}
bool WalkSink(void* ctx, std::uint32_t pid) {
auto* f = static_cast<WalkFixture*>(ctx);
f->sent.push_back(pid);
return f->sent.size() < f->stopAfter;
}
Collected Walk(WalkFixture& f, std::uint32_t target) {
const ScanSetEnv env{&WalkCreated, &f, &WalkSink, &f};
return WalkScanSet(f.rows.data(), f.rows.size(), target, env);
}
} // namespace
TEST_CASE("D51 — the walk sends the target, its ancestors below the launcher, then its descendants",
"[guard][S16][D51]") {
WalkFixture f;
// steam.exe (10) > the game's launcher (20) > the game (30) > a helper (40) > its child (50); beside them a process
// of nobody's (60) and the launcher's other child (70). Every time read, every link true.
f.rows = {{10, 1, true}, {20, 10, false}, {30, 20, false}, {40, 30, false},
{50, 40, false}, {60, 1, false}, {70, 10, false}};
f.created = {{10, 100}, {20, 200}, {30, 300}, {40, 400}, {50, 500}, {60, 50}, {70, 250}};
CHECK(Walk(f, 30) == Collected::kOk);
CHECK(f.sent == std::vector<std::uint32_t>{30, 20, 40, 50});
}
TEST_CASE("D51 — a link is cut only when creation times prove it wrong", "[guard][S16][D51][failclosed]") {
WalkFixture f;
SECTION("a parent pid now held by a younger process is not the game's parent, nor is anything above it") {
// The game's launcher (pid 20) exited after starting it, and a process started later took pid 20.
f.rows = {{5, 0, false}, {20, 5, false}, {30, 20, false}};
f.created = {{5, 10}, {20, 900}, {30, 300}};
CHECK(Walk(f, 30) == Collected::kOk);
CHECK(f.sent == std::vector<std::uint32_t>{30});
}
SECTION("a process older than the pid it names as its parent is not that process's child, nor are its own") {
// 80 was started (at 100) by an earlier holder of pid 30; the game took the pid at 300. 90 is 80's child.
f.rows = {{30, 0, false}, {80, 30, false}, {40, 30, false}, {90, 80, false}};
f.created = {{30, 300}, {80, 100}, {40, 400}, {90, 150}};
CHECK(Walk(f, 30) == Collected::kOk);
CHECK(f.sent == std::vector<std::uint32_t>{30, 40});
}
SECTION("a time that cannot be read keeps the link — the walk never shrinks on a guess") {
f.rows = {{30, 0, false}, {80, 30, false}, {40, 30, false}, {90, 80, false}};
f.created = {{30, 300}, {40, 400}, {90, 150}}; // 80's time unread
CHECK(Walk(f, 30) == Collected::kOk);
CHECK(f.sent == std::vector<std::uint32_t>{30, 80, 40, 90});
}
SECTION("nor does an unread time at the other end of the link") {
f.rows = {{5, 0, false}, {20, 5, false}, {30, 20, false}, {80, 30, false}};
f.created = {{5, 10}, {20, 900}, {80, 100}}; // the game's own time unread
CHECK(Walk(f, 30) == Collected::kOk);
CHECK(f.sent == std::vector<std::uint32_t>{30, 20, 5, 80});
}
SECTION("equal times keep the link: a parent and its child can start within one tick of the clock") {
f.rows = {{20, 0, false}, {30, 20, false}, {40, 30, false}};
f.created = {{20, 300}, {30, 300}, {40, 300}};
CHECK(Walk(f, 30) == Collected::kOk);
CHECK(f.sent == std::vector<std::uint32_t>{30, 20, 40});
}
}
TEST_CASE("D51 — a cycle of reused pids ends, and no pid is sent twice", "[guard][S16][D51]") {
WalkFixture f;
SECTION("two processes naming each other as parent, their times unread") {
f.rows = {{30, 31, false}, {31, 30, false}};
CHECK(Walk(f, 30) == Collected::kOk);
CHECK(f.sent == std::vector<std::uint32_t>{30, 31});
}
SECTION("an ancestor the snapshot also lists as a child is sent once, and its children are still walked") {
// Without times neither link is proven wrong, so 31's other child (32) is kept as the game's descendant.
f.rows = {{30, 31, false}, {31, 30, false}, {32, 31, false}};
CHECK(Walk(f, 30) == Collected::kOk);
CHECK(f.sent == std::vector<std::uint32_t>{30, 31, 32});
}
}
TEST_CASE("D51 — the walk's limits: a missing target, the frontier, the depth, a sink that is full",
"[guard][S16][D51][failclosed]") {
WalkFixture f;
SECTION("a target that is not in the snapshot fails — there is no tree to scan") {
f.rows = {{20, 0, false}};
CHECK(Walk(f, 30) == Collected::kFailed);
CHECK(f.sent.empty());
}
SECTION("more descendants than the frontier holds fails rather than scanning some of them") {
f.rows.push_back({1, 0, false});
for (std::uint32_t pid = 2; pid < 2 + kScanSetFrontier - 1; ++pid) {
f.rows.push_back({pid, 1, false});
}
CHECK(Walk(f, 1) == Collected::kOk); // the target and its 511 children fill it exactly
f.sent.clear();
f.rows.push_back({5000, 1, false});
CHECK(Walk(f, 1) == Collected::kFailed);
}
SECTION("ancestors stop after kScanSetMaxDepth") {
for (std::uint32_t pid = 100; pid < 130; ++pid) {
f.rows.push_back({pid, pid + 1, false});
}
CHECK(Walk(f, 100) == Collected::kOk);
CHECK(f.sent.size() == 1 + kScanSetMaxDepth);
}
SECTION("a sink that stops the walk ends it, and nothing after is sent") {
f.rows = {{20, 0, false}, {30, 20, false}, {40, 30, false}};
f.stopAfter = 2;
CHECK(Walk(f, 30) == Collected::kOk);
CHECK(f.sent == std::vector<std::uint32_t>{30, 20});
}
}
TEST_CASE("D51 — the real scan set keeps a child this process just started, and reads real creation times",
"[guard][S16][D51][live]") {
const Sources s = SystemSources();
REQUIRE(s.EnumerateScanSet != nullptr);
STARTUPINFOW si{};
PROCESS_INFORMATION pi{};
si.cb = sizeof(si);
wchar_t cmd[] = L"cmd.exe /c exit 0";
REQUIRE(CreateProcessW(nullptr, cmd, nullptr, nullptr, FALSE, CREATE_SUSPENDED | CREATE_NO_WINDOW, nullptr, nullptr,
&si, &pi));
static std::vector<std::uint32_t> members;
members.clear();
const Collected walked = s.EnumerateScanSet(
GetCurrentProcessId(),
[](void*, std::uint32_t pid) {
members.push_back(pid);
return true;
},
nullptr);
const std::uint64_t self = ProcessCreatedAt(GetCurrentProcessId());
const std::uint64_t child = ProcessCreatedAt(pi.dwProcessId);
TerminateProcess(pi.hProcess, 0);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
CHECK(walked == Collected::kOk);
REQUIRE_FALSE(members.empty());
CHECK(members.front() == GetCurrentProcessId());
CHECK(std::count(members.begin(), members.end(), pi.dwProcessId) == 1);
CHECK(std::set<std::uint32_t>(members.begin(), members.end()).size() == members.size());
CHECK(self != 0);
CHECK(child >= self); // a child is never proven older than its parent
CHECK(ProcessCreatedAt(0x7FFFFFFCu) == 0); // no process: unread, which keeps a link
}
// ===========================================================================
// D48 (owner decision, beta.14) — a member still being created, or gone, is read
// again ONCE, and the re-read can only turn "could not read" into a full read.
@@ -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));
}
}
@@ -107,7 +107,12 @@ public sealed class ChartMathTests
{
Dictionary<string, (int R, int G, int B)> palette = Palette(file);
foreach (string[] plot in new[] { SensorsChart.TempsPlot.Select(static s => s.PaletteKey).ToArray(), SensorsChart.VideoMemoryPlot.Select(static s => s.PaletteKey).ToArray(), SensorsChart.SystemMemoryPlot.Select(static s => s.PaletteKey).ToArray() })
// beta.14: the temperatures plot has a seventh line (the card's memory), and the clocks plot is a fourth plot.
foreach (string[] plot in new[]
{
SensorsChart.TempsPlot.Select(static s => s.PaletteKey).ToArray(), SensorsChart.VideoMemoryPlot.Select(static s => s.PaletteKey).ToArray(),
SensorsChart.SystemMemoryPlot.Select(static s => s.PaletteKey).ToArray(), SensorsChart.ClocksPlot.Select(static s => s.PaletteKey).ToArray(),
})
{
for (int i = 0; i < plot.Length; i++)
{
@@ -168,4 +168,50 @@ public sealed class CompareViewModelTests
CompareViewModel.Row("t", close, static r => r.MedianFps, static v => Formats.FpsNumber(v!.Value, twoDecimals: false), higherIsBetter: true)
.Cells.Select(static c => c.IsBest).Should().Equal([true, true, false], "both are shown as 62");
}
/// <summary>
/// beta.14 (D49): the new rows, and the <c>(presented)</c> label — a session whose frame statistics are over its presents
/// says so in its cell, beside one whose statistics are over the game's own frames (rule 6). The best is decided on the
/// number: less time below 60 is better, more frames per watt is better, and a VSync share ranks nothing.
/// </summary>
[Fact]
public async Task APresentOnlySessionsStatisticsAreLabelledAndTheNewRowsRankAsTheySay()
{
CultureInfo? previous = Strings.Culture;
CultureInfo previousCulture = CultureInfo.CurrentCulture;
Strings.Culture = CultureInfo.GetCultureInfo("en");
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en");
try
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow a = await s.GameAsync("Alpha");
await s.SessionAsync(a.Id, DateTimeOffset.UtcNow.AddHours(-2), fgMode: "na", native: null, presented: 72, qualifier: "fg_runtime_loaded",
shape: static r => r with { TimeBelow60Pct = 20, VsyncPresentPct = 100, AppFramesPerJoule = null, UpscaleRatio = 1.5 });
await s.SessionAsync(a.Id, DateTimeOffset.UtcNow.AddHours(-1),
shape: static r => r with { TimeBelow60Pct = 5, VsyncPresentPct = 0, AppFramesPerJoule = 0.31, UpscaleRatio = 2 });
CompareViewModel vm = await BuildAsync(s, new ScriptedMixed(answer: true));
foreach (CompareCandidateViewModel c in vm.Candidates)
{
c.IsSelected = true;
}
vm.CompareCommand.Execute(null);
Task pending = vm.Pending;
await pending;
CompareRowViewModel RowOf(string metric) => vm.Rows.Single(r => string.Equals(r.Metric, metric, StringComparison.Ordinal));
// Newest first: the counted-none session, then the present-only one.
RowOf("1% Low").Cells.Select(static c => c.Text).Should().Equal("48", "48 (presented)");
CompareRowViewModel below = RowOf("Time below 60 FPS");
below.Cells.Select(static c => c.Text).Should().Equal("5.0%", "20.0% (presented)");
below.Cells.Select(static c => c.IsBest).Should().Equal(true, false);
RowOf("Frames per watt").Cells.Select(static c => (c.Text, c.IsBest)).Should().Equal(("0.31 FPS/W", true), ("N/A", false));
RowOf("VSync share").Cells.Should().OnlyContain(static c => !c.IsBest, "a setting, not a score");
RowOf("Render scale").Cells.Select(static c => c.Text).Should().Equal("50.0%", "66.7%");
}
finally
{
Strings.Culture = previous;
CultureInfo.CurrentCulture = previousCulture;
}
}
}
@@ -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,139 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Diagnostics;
using System.IO;
using FluentAssertions;
using FrameLedger.App.Services;
using Xunit;
namespace FrameLedger.App.Tests;
/// <summary>
/// beta.15 (D52): <c>FrameLedger.exe --data-dir &lt;folder&gt;</c> makes the App a viewer over a COPY — and never over the
/// profile's own folder, however that folder is spelled. The "profile" here is a scratch folder of the test's own.
/// </summary>
public sealed class DataFolderArgumentTests : IDisposable
{
private readonly string _root = Path.Combine(Path.GetTempPath(), "fl-datadir-" + Guid.NewGuid().ToString("N"));
public DataFolderArgumentTests()
{
Directory.CreateDirectory(Profile);
Directory.CreateDirectory(Copy);
}
private string Profile => Path.Combine(_root, "FrameLedger");
private string Copy => Path.Combine(_root, "copy");
public void Dispose()
{
try
{
Directory.Delete(_root, recursive: true);
}
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
{
}
}
[Fact]
public void WithoutTheFlagTheAppIsTheProfiles() =>
DataFolderArgument.Read(["--diag"], Profile).Kind.Should().Be(DataFolderChoiceKind.Profile);
[Theory]
[InlineData(false)]
[InlineData(true)]
public void AFolderThatExistsMakesAViewerOverIt(bool joined)
{
string[] args = joined ? [$"--data-dir={Copy}{Path.DirectorySeparatorChar}"] : ["--data-dir", Copy + Path.DirectorySeparatorChar];
DataFolderChoice choice = DataFolderArgument.Read(args, Profile);
choice.Kind.Should().Be(DataFolderChoiceKind.Viewer);
choice.Folder.Should().Be(Copy, "the full path, without its trailing separator");
}
[Fact]
public void TheProfilesOwnFolderIsRefusedHoweverItIsSpelled()
{
string[] spellings =
[
Profile,
Profile + Path.DirectorySeparatorChar,
Profile.ToUpperInvariant(),
Profile.Replace(Path.DirectorySeparatorChar, '/'),
Path.GetRelativePath(Environment.CurrentDirectory, Profile),
Path.Combine(Copy, "..", "FrameLedger"),
];
foreach (string spelling in spellings)
{
DataFolderChoice choice = DataFolderArgument.Read(["--data-dir", spelling], Profile);
choice.Kind.Should().Be(DataFolderChoiceKind.Refused, spelling);
choice.Problem.Should().ContainEquivalentOf(Profile, "the refusal names the folder it refused");
}
}
/// <summary>A junction is a second name for the same folder: the comparison resolves it, as the Agent's identity does.</summary>
[Fact]
public void AJunctionToTheProfilesFolderIsRefused()
{
string link = Path.Combine(_root, "link");
var start = new ProcessStartInfo("cmd.exe") { CreateNoWindow = true, UseShellExecute = false };
foreach (string arg in new[] { "/c", "mklink", "/J", link, Profile })
{
start.ArgumentList.Add(arg);
}
using (Process mklink = Process.Start(start)!)
{
mklink.WaitForExit();
mklink.ExitCode.Should().Be(0, "a junction needs no privilege");
}
DataFolderArgument.Read(["--data-dir", link], Profile).Kind.Should().Be(DataFolderChoiceKind.Refused);
}
[Fact]
public void AFolderThatDoesNotExistIsRefused()
{
string missing = Path.Combine(_root, "missing");
DataFolderChoice choice = DataFolderArgument.Read(["--data-dir", missing], Profile);
choice.Kind.Should().Be(DataFolderChoiceKind.Refused);
choice.Problem.Should().Contain(missing);
}
[Theory]
[InlineData("--data-dir")]
[InlineData("--data-dir", "--diag")]
[InlineData("--data-dir=")]
[InlineData("--data-dir", " ")]
public void AFlagWithoutAFolderIsRefused(params string[] args) =>
DataFolderArgument.Read(args, Profile).Kind.Should().Be(DataFolderChoiceKind.Refused);
[Fact]
public void TwoFoldersAreRefusedRatherThanOneChosen() =>
DataFolderArgument.Read(["--data-dir", Copy, "--data-dir=" + Copy], Profile).Kind.Should().Be(DataFolderChoiceKind.Refused);
/// <summary>Only the profile's folder ITSELF is refused: a copy kept inside it is a folder like any other, with its own ledger.</summary>
[Fact]
public void ACopyKeptInsideTheProfilesFolderIsAViewer()
{
string inside = Path.Combine(Profile, "copy");
Directory.CreateDirectory(inside);
DataFolderArgument.Read(["--data-dir", inside], Profile).Kind.Should().Be(DataFolderChoiceKind.Viewer);
}
/// <summary>The second lock on the door: the path holder refuses the real profile folder too, and is left unset.</summary>
[Fact]
public void ThePathsRefuseTheRealProfileFolderAndStayTheProfiles()
{
FluentActions.Invoking(static () => UiPaths.UseViewerFolder(UiPaths.ProfileDirectory)).Should().Throw<InvalidOperationException>();
UiPaths.IsViewer.Should().BeFalse();
}
}
Loaded 100 of 116 files, more files were not shown because too many files have changed in this diff. Show more