Compare commits
19
Commits
No files matched your search
@@ -116,6 +116,22 @@ jobs:
|
||||
"dry_run=$($dry.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT
|
||||
Write-Host "$(if ($dry) { 'DRY RUN of' } else { 'releasing' }) $full (pre-release: $pre)"
|
||||
|
||||
# The Overlay's build id is `git describe --dirty` at CMake's configure
|
||||
# (src/native/FrameLedger.Shm/CMakeLists.txt), and the next step edits tracked
|
||||
# files: every release until beta.18 shipped "<tag>-dirty". So the id is read
|
||||
# here, from the clean checkout, and handed to CMake through the environment;
|
||||
# buildid-check reads it back out of the published binaries.
|
||||
- name: Build id (the clean checkout)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$id = "$(git describe --always --dirty --abbrev=12)".Trim()
|
||||
if ($LASTEXITCODE -ne 0 -or -not $id) { throw 'git describe failed' }
|
||||
if ($id.EndsWith('-dirty')) { throw "the checkout is dirty before the release has touched it: $id" }
|
||||
if ($id.Length -gt 31) { throw "build id '$id' is $($id.Length) characters; FlShmHandshake::buildId holds 31" }
|
||||
"FL_BUILD_ID=$id" >> $env:GITHUB_ENV
|
||||
Write-Host "FL_BUILD_ID = $id"
|
||||
|
||||
# 12_BUILD §Release-time token substitution: the effective date of a legal
|
||||
# document is the date it ships. The only placeholder that survives into the
|
||||
# repository, substituted here and nowhere else; the App embeds legal/*.md at
|
||||
@@ -200,6 +216,9 @@ jobs:
|
||||
# beta.14 (D50): the managed half too - the eight managed binaries, carrying the tag's full version.
|
||||
./tools/versioninfo-check.ps1 -BuildDir out/app -ManagedDir out/app -ExpectedProductVersion '${{ steps.version.outputs.version }}'
|
||||
if ($LASTEXITCODE -ne 0) { throw 'versioninfo-check over the published tree' }
|
||||
# beta.18: the native binaries carry the build id read from the clean checkout, exactly - never "<tag>-dirty".
|
||||
./tools/buildid-check.ps1 -BuildDir out/app -Expected $env:FL_BUILD_ID
|
||||
if ($LASTEXITCODE -ne 0) { throw 'buildid-check over the published tree' }
|
||||
$size = (Get-ChildItem out/app -Recurse -File | Measure-Object Length -Sum).Sum / 1MB
|
||||
Write-Host ("published tree: {0:N0} MB" -f $size)
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
# The GitHub Wiki is a copy of the repository's own pages (D53/D54, the owner, 2026-10-07): wiki/ (Home, the sidebar,
|
||||
# the developer pages) and guide/ (the user guide, which is the End-user part) with LIMITATIONS.md, assembled and checked
|
||||
# by tools/wiki-build.ps1 - the check build.ps1 runs as `wiki-check`. A page edited on the Wiki tab is overwritten here;
|
||||
# edit wiki/ or guide/ instead (docs/13_CI_CD.md §wiki.yml).
|
||||
#
|
||||
# Separate from release.yml on purpose. The release stays as it was and its dry run stays a pure rehearsal; a wiki that
|
||||
# fails to publish is a red run of its own, re-run on its own, never a red release. A step after `gh release create`
|
||||
# could never be re-run at all: the release would already exist.
|
||||
#
|
||||
# A release that release.yml creates with GITHUB_TOKEN fires no `release` event for other workflows. `workflow_run` does
|
||||
# fire - the Release run itself was started by the owner's tag push - and it runs THIS file as it is on main, so the job
|
||||
# checks out the commit the release was built from (head_sha) and links the repository's files at the tag (head_branch).
|
||||
|
||||
name: Wiki
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [Release]
|
||||
types: [completed]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref:
|
||||
description: 'Branch, tag or commit to build the wiki from; repository files are linked at this ref'
|
||||
required: true
|
||||
default: main
|
||||
type: string
|
||||
publish:
|
||||
description: 'Publish to the Wiki tab (off: build, check and upload the pages only)'
|
||||
required: true
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
# The repository's default token is read-only; pushing to <repo>.wiki.git needs contents: write.
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: wiki
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
wiki:
|
||||
# A rehearsal of release.yml (workflow_dispatch) never publishes the wiki: only a run started by a pushed v* tag
|
||||
# that succeeded.
|
||||
if: >-
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event.workflow_run.conclusion == 'success' &&
|
||||
github.event.workflow_run.event == 'push' &&
|
||||
startsWith(github.event.workflow_run.head_branch, 'v'))
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
# Values reach the scripts through the environment only, never pasted into them.
|
||||
WIKI_REF: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.event.workflow_run.head_branch }}
|
||||
WIKI_PUBLISH: ${{ github.event_name == 'workflow_run' || inputs.publish }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.event.workflow_run.head_sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Build and check the wiki
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
./tools/wiki-build.ps1 -Ref $env:WIKI_REF -Out out/wiki
|
||||
if ($LASTEXITCODE -ne 0) { throw 'wiki-build failed' }
|
||||
|
||||
- name: Upload the pages
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: wiki-${{ github.run_id }}
|
||||
path: out/wiki/**
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
|
||||
- name: Publish to the Wiki tab
|
||||
if: env.WIKI_PUBLISH == 'true'
|
||||
shell: pwsh
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
gh auth setup-git
|
||||
if ($LASTEXITCODE -ne 0) { throw 'gh auth setup-git failed' }
|
||||
git clone --depth 1 "https://github.com/$env:GITHUB_REPOSITORY.wiki.git" wiki-repo
|
||||
if ($LASTEXITCODE -ne 0) { throw 'cloning the wiki failed - it must have one page created on github.com first' }
|
||||
Get-ChildItem wiki-repo -Force | Where-Object Name -ne '.git' | Remove-Item -Recurse -Force
|
||||
Copy-Item out/wiki/* wiki-repo -Recurse
|
||||
Set-Location wiki-repo
|
||||
git add -A
|
||||
git diff --cached --quiet
|
||||
if ($LASTEXITCODE -eq 0) { Write-Host "The wiki already shows $env:WIKI_REF; nothing to publish."; exit 0 }
|
||||
git -c user.name='github-actions[bot]' -c user.email='41898282+github-actions[bot]@users.noreply.github.com' commit -q -m "wiki: $env:WIKI_REF"
|
||||
if ($LASTEXITCODE -ne 0) { throw 'commit failed' }
|
||||
# The wiki repository's branch is master (git ls-remote, 2026-10-07).
|
||||
git push origin HEAD:master
|
||||
if ($LASTEXITCODE -ne 0) { throw 'push failed' }
|
||||
Write-Host "Published the wiki at $env:WIKI_REF"
|
||||
+173
@@ -28,6 +28,179 @@ numeric core and does not move; the heading is the full version — corrected 20
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.1.0-beta.18] - 2026-10-07
|
||||
|
||||
**The eighteenth pre-release: every page readable in the dark theme, notices that say what happened in words, and a
|
||||
release whose build no longer calls itself dirty.** The same unsigned installer: verify its hash against
|
||||
`SHA256SUMS.txt`, then *More info → Run anyway*.
|
||||
|
||||
**Updating from `0.1.0-beta.17`:** 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
|
||||
|
||||
- **Page titles and section headings read in the dark theme again.** Every page's title and its section headings — Dashboard,
|
||||
Recent sessions, Games, Compare, Settings and each of its groups, Logs — were drawn near-black on the dark window
|
||||
(owner's screenshots of beta.17; beta.16 had it too). A page is shown in WPF UI's navigation Frame, which passes no text
|
||||
colour into the page, and a text that sets none is black; a page open during a theme switch picked the right colour up,
|
||||
and the next one navigated to did not. Every page now sets the theme's text colour itself. `AccessibilityTests.EveryPageSetsItsOwnTextColour`
|
||||
and `PagesLoadTests.EveryTextIsReadableInBothThemes` (every surface hosted as the App hosts it, ≥ 3:1 in both themes)
|
||||
went red on the unfixed pages first; the theme-switch check now hosts pages in the Frame too, and its harness derives the
|
||||
accent for each theme as the App does (`docs/08_UI.md` §Contrast, `docs/16_WPFUI_SYNTAX.md` §Gotchas, `docs/14_TESTING.md`).
|
||||
- **Every notice says what happened in words.** With *Disable all hooking* on, a game's notice read "kill switch was
|
||||
detected in this game (the global 'disable all hooking' switch is on (FR-2.4); …)" — it reads "All hooking is switched
|
||||
off in Settings, so nothing was measured." now, and a game blocked before reads as that, not as a finding. A refusal no
|
||||
anti-cheat names read "… reason RefusedByGuard." and is said in the guard's words ("the game is 32-bit, and the hook
|
||||
runs in 64-bit games only"); the agent sends the guard's reason for every refusal (`docs/07_IPC.md`). A safety re-scan
|
||||
that could not look while the game ran read "Access is denied. was detected" and says the check could not be made. And
|
||||
*Measurement stopped* printed "The hook stopped (WriterSelfDisabled); the session continues without measuring." — it
|
||||
says why in a sentence, and no longer that the session went on: a stop ends it. `NoticesFromTheAgentTests` builds the
|
||||
agent's own events for every refusal and every stop and went red with each text above (`docs/08_UI.md` §Notifications policy).
|
||||
- **Disable all hooking says when it applies.** Turning it on said "The capture agent reads it at the next session start";
|
||||
a game being measured stops at its next safety scan, within 30 seconds, and the message says so.
|
||||
- **Turning hooking off with no agent says nothing changed** — Settings' *Turn off*, the game page's switch and a
|
||||
withdrawn exception said "Nothing was enabled.", the enabling path's words.
|
||||
- **A viewer over a copy leaves every agent setting alone.** The user-mode exception option, the three Recording numbers
|
||||
and the update channel stayed live in `--data-dir`, where no agent reads them (`ViewerModeTests`).
|
||||
- `docs/08_UI.md` listed a "PawnIO missing" banner that was never built; struck, with the banners that do exist.
|
||||
- **A release's overlay build no longer calls itself dirty.** The Dashboard read *Overlay build v0.1.0-beta.17-dirty* (and
|
||||
beta.16's, and every release's before): the release workflow writes the release date into the legal documents before
|
||||
the build, and the build id was read from the tree after that. It is read from the clean checkout first and handed to
|
||||
the build, and `tools/buildid-check.ps1` reads it back out of the published binaries (`docs/12_BUILD.md` §Release-time
|
||||
token substitution). Nothing changes for a game: both sides of the ring's handshake always carried the same id.
|
||||
- **Two end-to-end tests no longer fail CI by a race** (developers only). The Vulkan launch test asks the test harness
|
||||
whether this machine can present through Vulkan before it starts the capture host: on GitHub's runners the harness's
|
||||
own "skip" line never reached the host's output, and a scan of the exiting harness failed the test instead of skipping
|
||||
it. The target-exit test holds its harness 15 seconds instead of 6, the margin a slow runner's host needed
|
||||
(`docs/13_CI_CD.md`).
|
||||
|
||||
## [0.1.0-beta.17] - 2026-10-07
|
||||
|
||||
**The seventeenth pre-release: text that keeps up with a change of theme, scroll bars hidden everywhere when you ask, a
|
||||
user guide that answers more, and a wiki.** The same unsigned installer: verify its hash against `SHA256SUMS.txt`, then
|
||||
*More info → Run anyway*.
|
||||
|
||||
**Updating from `0.1.0-beta.16`:** 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
|
||||
|
||||
- **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).
|
||||
- **The first run names the right place to import your library.** Its last step said *File ▸ Import library… on the
|
||||
Games page*; File is the main window's menu, and the Games page has no such button. In Vietnamese it now names the menu
|
||||
as it is shown (*Tệp*).
|
||||
|
||||
### Added
|
||||
|
||||
- **The user guide looks things up too.** Four pages join it, in Help ▸ User guide: *The screens* (every page, menu,
|
||||
button and shortcut), *Every setting* (what each one does and its default), *When something goes wrong* (what you see,
|
||||
what it means, what to do) and *Words FrameLedger uses*. Tests now fail when a setting or a menu item is added without
|
||||
its line in the guide, or a link names a section that does not exist.
|
||||
- **A wiki.** The project's [wiki](https://github.com/poli0981/frameledger/wiki) has two halves: the user guide, the
|
||||
same pages the app shows, and short pages for developers — the architecture, the repository, building and testing,
|
||||
the rules every change keeps, capture, metrics, data, the app's UI and releasing — each linking to its full document.
|
||||
It is published from the repository whenever a release is made (`wiki.yml`), so it always matches the newest
|
||||
release, and `./build.ps1 check` fails on any link in it that leads nowhere (`13_CI_CD` §wiki.yml).
|
||||
|
||||
## [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
|
||||
|
||||
@@ -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
|
||||
@@ -136,7 +138,9 @@ tools/ # accuracy-check, changelog-check, chokepoint-che
|
||||
# gen-ac-floor, hookinventory-check, license-check, license-gather
|
||||
# (+ license-overrides/), notice-check, package-closure-check,
|
||||
# release-notes, rules-validate, test-artifacts-check, vendor-exports,
|
||||
# versioninfo-check, vklayer-blastradius, fps-impact-runbook
|
||||
# versioninfo-check, vklayer-blastradius, fps-impact-runbook,
|
||||
# wiki-build (beta.17: builds and checks the wiki; the wiki-check gate),
|
||||
# buildid-check (beta.18: the release's build id in the shipped natives)
|
||||
# (six names added 2026-10-04)
|
||||
# (PowerShell). This line used to name three, one of which
|
||||
# — resx-audit — ~~does not exist~~ exists since 2026-09-13 with
|
||||
@@ -149,8 +153,13 @@ tools/ # accuracy-check, changelog-check, chokepoint-che
|
||||
# stats, signer, Vulkan layer; fl-baseline-probe;
|
||||
# vendor-stubs/ -> fixture DLLs with the vendors' export names
|
||||
rules/detection-rules.json # engine/platform/capability + anticheat blocklist
|
||||
guide/ # the user guide (beta.12, D44): eight short English pages for players, embedded in the
|
||||
guide/ # the user guide (beta.12, D44): ~~eight~~ short English pages for players, embedded in the
|
||||
# App (Help > User guide); README.md is its contents. docs/ is for developers.
|
||||
# (twelve since beta.17, D54: the screens, every setting, troubleshooting, a glossary;
|
||||
# and the guide is the wiki's End-user part)
|
||||
wiki/ # the wiki's own pages (beta.17, D53): Home, _Sidebar, the developer pages. wiki.yml
|
||||
# publishes them with guide/ and LIMITATIONS.md to the Wiki tab at a release;
|
||||
# tools/wiki-build.ps1 assembles and checks them (build.ps1 wiki-check)
|
||||
docs/ legal/ legal/licenses/
|
||||
```
|
||||
|
||||
|
||||
@@ -27,6 +27,16 @@ 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.
|
||||
|
||||
Documentation lives in three places: `guide/` for players (shown in the app and on the wiki), `wiki/` for the wiki's own
|
||||
pages, and `docs/` for developers. A change a player would notice updates `guide/`; a change to how the code is put
|
||||
together updates `docs/` — and the `wiki/` page that summarises it, if that page now says something else.
|
||||
`./build.ps1 check` builds the wiki and fails on a link that leads nowhere.
|
||||
|
||||
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`:
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Label="Analyzers (build-time only)">
|
||||
<PackageVersion Include="Roslynator.Analyzers" Version="5.0.0" />
|
||||
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.266" />
|
||||
<PackageVersion Include="Roslynator.Analyzers" Version="5.0.1" />
|
||||
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.294" />
|
||||
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="18.7.23" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
+1
-1
@@ -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.18.*
|
||||
|
||||
## Games it will not measure
|
||||
|
||||
|
||||
@@ -5,12 +5,14 @@
|
||||
> No telemetry. No accounts. All data stays on your machine.
|
||||
|
||||
**New here? Start with the [user guide](guide/README.md)** — install, record a game, read your results, stay safe with
|
||||
anti-cheat, and look after your data, a page each. What FrameLedger cannot do is on one page:
|
||||
[Limitations](LIMITATIONS.md). Both are in the app too (Help ▸ User guide, Help ▸ Limitations).
|
||||
anti-cheat, and look after your data, a page each, then every screen, every setting and what to do when something goes
|
||||
wrong. What FrameLedger cannot do is on one page: [Limitations](LIMITATIONS.md). Both are in the app too (Help ▸ User
|
||||
guide, Help ▸ Limitations), and on the project's [wiki](https://github.com/poli0981/frameledger/wiki) with the developer
|
||||
pages.
|
||||
|
||||
<!-- accuracy-block:begin -->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.13`** (2026-10-04), an unsigned installer built from that tag with its
|
||||
> **pre-release is `0.1.0-beta.18`** (2026-10-07), an unsigned installer built from that tag with its
|
||||
> checksums published beside it. The source holds the desktop app
|
||||
> (library, store import, charts, settings) and the background Agent, which records a session when a
|
||||
> game in the library runs (unless you switched its recording off), injects only into games you enabled
|
||||
@@ -161,7 +163,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.18` (2026-10-07); before it `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `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**.
|
||||
@@ -191,6 +193,8 @@ FrameLedger is GPL-3.0-only free software, and you are welcome to build it, chan
|
||||
[`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md). Security reports: [`SECURITY.md`](SECURITY.md).
|
||||
- **Fork or redistribute:** [`FORKING.md`](FORKING.md) — what the GPL asks of anyone who distributes builds, and the names
|
||||
a fork must change so it does not share FrameLedger's update feed, install folder, data, pipe or Vulkan layer.
|
||||
- **Find your way around:** the [wiki](https://github.com/poli0981/frameledger/wiki)'s developer pages are short, and each
|
||||
links to the document it summarises ([`wiki/`](wiki/) is their source).
|
||||
- **Read the design:** the developer documentation is in [`docs/`](docs/). Start with [`CLAUDE.md`](CLAUDE.md), then
|
||||
[`docs/19_SAFETY_AND_ANTICHEAT.md`](docs/19_SAFETY_AND_ANTICHEAT.md) — which constrains everything else — then
|
||||
[`docs/01_ARCHITECTURE.md`](docs/01_ARCHITECTURE.md).
|
||||
@@ -208,4 +212,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). Eighteen 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.
|
||||
@@ -464,6 +464,15 @@ function Invoke-ProjectGates {
|
||||
Invoke-Checked 'notice-check (self-test)' { & $noticeTool -SelfTest }
|
||||
Invoke-Checked 'notice-check' { & $noticeTool -RepoRoot $repo }
|
||||
|
||||
# beta.17 (D53/D54): the GitHub Wiki is built from wiki/, guide/ and LIMITATIONS.md, and wiki.yml publishes it when a
|
||||
# release is made. A link or a section that leads nowhere, a page nothing leads to, a sidebar out of the guide's
|
||||
# order, a path that names nothing or a version written into a page is red here, not on the published wiki.
|
||||
# Self-test first (nine cases, both directions), then the live assembly into a temporary folder.
|
||||
Write-Step 'wiki-check'
|
||||
$wikiTool = Join-Path $repo 'tools/wiki-build.ps1'
|
||||
Invoke-Checked 'wiki-check (self-test)' { & $wikiTool -RepoRoot $repo -SelfTest }
|
||||
Invoke-Checked 'wiki-check' { & $wikiTool -RepoRoot $repo -Check }
|
||||
|
||||
Write-Step 'changelog-check'
|
||||
$changelogTool = Join-Path $repo 'tools/changelog-check.ps1'
|
||||
if (Test-Path $changelogTool) {
|
||||
@@ -479,6 +488,12 @@ function Invoke-ProjectGates {
|
||||
Write-Step 'release-notes'
|
||||
Invoke-Checked 'release-notes (self-test)' { & (Join-Path $repo 'tools/release-notes.ps1') -SelfTest }
|
||||
|
||||
# beta.18: the build id a release hands CMake (read from the clean checkout before the date substitution edits
|
||||
# legal/*.md) is read back out of the published native binaries by release.yml. Self-test only here — the live
|
||||
# pass needs that id, which only a release has (12_BUILD §Release-time token substitution).
|
||||
Write-Step 'buildid-check'
|
||||
Invoke-Checked 'buildid-check (self-test)' { & (Join-Path $repo 'tools/buildid-check.ps1') -SelfTest }
|
||||
|
||||
# 09_I18N's gate, built with the first .resx family (P3 PR-2, 2026-09-13): every key in en/vi/ja, ja
|
||||
# Safety_* marked for human review, the generated accessor current. Self-test first (at least four
|
||||
# cases must go red), then the live pass; a tree with no family is red, not skipped.
|
||||
|
||||
@@ -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.
|
||||
|
||||
+12
-1
@@ -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.
|
||||
>
|
||||
|
||||
+2
-2
@@ -406,8 +406,8 @@ Unchanged in spirit from v1, bumped to `v2` for the new message set.
|
||||
| `SessionHeld` | A→UI | **Added 2026-09-23.** 1 Hz while a client listens, for a session held unhooked only: `{ sessionGuid, elapsedS, gpuTempC?, cpuTempC?, gpuLoadPct?, cpuLoadPct?, gameVramDedicatedMb?, gameRamPrivateMb? }` — how long it has run and the machine's sensors (and since beta.12 the game process's own memory, read from outside it — optional, an older client ignores them). **Never `SessionProgress`**: its `presents5s`, `presentedQualifier` and `fgMode` are required, and zeros there would put measured-looking numbers on the wire for a session that measures nothing (rule 6 has nothing to show and shows nothing) |
|
||||
| `SessionProgress` | A→UI | 1 Hz: `{ sessionGuid, elapsedS, presents5s, presentedFps5s?, presentedQualifier, nativeFps5s?, displayedFps5s?, fgFactor?, fgMode, upscaler?, upscalerQuality?, upscalerDriverReported?, renderW/H?, outputW/H?, rtActive?, gpuTempC?, cpuTempC?, cpuLoadPct?, vramProcMb?, latencyUs?, fgRefusal?, fgRuntimeCensus?, gameVramDedicatedMb?, gameRamPrivateMb? }` (the last two added 2026-10-03, beta.12, optional: the game process's dedicated GPU memory and private working set, MiB, from the newest telemetry tick; `vramProcMb` stays reserved for the in-process figure and has no producer) — a 5 s rolling window over the ring through the SAME Domain calculators the row uses (`SessionProgressCalculator`, D13). **`upscalerDriverReported` added 2026-09-21, optional:** `dlss` when the NVIDIA driver reports an NGX super-resolution feature created and evaluated in the target (`03_METRICS` §The driver-reported rung), so the live card says `DLSS (driver-reported)` where no hook can name the upscaler; identity only. **`cpuLoadPct` added 2026-09-21, optional** (CPU time busy over the last telemetry tick, 0–100; `cpuTempC` has a producer from the same date, present only when the Agent is elevated with PawnIO). **Two fields added 2026-09-14, both optional (an older client ignores them, §C):** `fgRefusal` is the row's `fg_refusal` (schema 0003) — present when `fgMode` names a technology and `fgFactor` is absent, so the live card can say "DLSS-G active — factor not counted" rather than N/A; `fgRuntimeCensus` is the raw census so the `fg_runtime_loaded` chip can name the module. **Rule 6 at the wire (2026-09-13):** `nativeFps5s` / `displayedFps5s` / `fgFactor` are present only when frame generation was measured in the window; otherwise `presentedFps5s` stands alone with `presentedQualifier` (`census_not_run` · `no_fg_runtime` · `fg_runtime_loaded` · `none_withheld`, the row's `presented_qualifier` from the same function). Every unmeasured field is absent, never 0. Suppressed when no client is connected |
|
||||
| `SessionCompleted` | A→UI | `{ sessionGuid, sessionId?, exitStatus, tier, finalize, reason, gameId?, gameName? }` — UI loads the full row from SQLite; `sessionId` is null and `finalize` is `discarded` when the row was not stored (under the minimum length), or `game_removed` when its entry was removed with its sessions while it ran (2026-09-23), or **`faulted` when the session's task threw before it could finalize** (2026-09-23: it follows the `CaptureError SessionFaulted`, with `exitStatus` `interrupted` and `reason` `SessionFaulted`, so the live card and the tray let go of a session that no longer runs; the `.partial` stays for recovery); `exitStatus` is the row's vocabulary (`normal` · `crashed` · `unhooked_safety` · `degraded`); `reason` is the loop's `SessionEndReason`. **`gameId` / `gameName` added 2026-09-23, optional:** the entry the session was stored under — the finalizer's owner when it re-keyed a session whose entry was removed, else the one it started under — so the notice names the session that completed, not whatever the live card last showed |
|
||||
| `CaptureRefused` | A→UI | `{ gameId, gameName, reason, family?, signal?, hookingTurnedOff, guardReason? }` — **`guardReason` (beta.13, optional)** is the guard's own reason when it named a family; `BlockedService` / `BlockedDriver` is a finding on the PC, not in the game, and the notice says so (§S23-3); `reason` stays the session's end reason — **guard fired**; `hookingTurnedOff` (2026-09-22) is true when the finding turned the game's hooking off (`19_SAFETY` §What a finding does to the game); UI shows the plain-language explanation — ~~and the Tier-2 offer~~; there is no alternative measurement to offer, only the option to record the session unmeasured (`08_UI` §Safety events). *(Built: for `RefusedByGuard`, `RefusedPreviouslyBlocked`, `RefusedKillSwitch`, `PreScanCouldNotVerify` and, since 2026-09-21 (beta.4), `TargetUnreadable` — a protected process the Agent could not open (added 2026-10-04) — `PreScanCouldNotVerify` with no family, because "could not verify" is neither a hit nor a pass; `family`/`signal` are the verdict's. A game merely not enabled or not consented raises nothing: that is an ordinary Tier-2 row, not a refusal to explain.)* |
|
||||
| `CaptureDegraded` | A→UI | `{ sessionGuid, from: 1, to: 2, reason }` — Tier 1 → Tier 2 mid-flight, or overlay self-disabled. **Under a two-rung ladder this means measurement STOPPED**, not that it continued at lower fidelity, and the notice must say so. *(Built: `SupervisionLost`, `WriterSelfDisabled`, `WriterStoppedBlocklisted`, `WriterNeverInstalledHooks`, `SupervisionFaulted`, `KillSwitchEngaged` — `RecordedSessionEvents.Classify` is the table.)* |
|
||||
| `CaptureRefused` | A→UI | `{ gameId, gameName, reason, family?, signal?, hookingTurnedOff, guardReason? }` — **`guardReason` (beta.13, optional)** is the guard's own reason ~~when it named a family~~ **whenever it refused (beta.18; beside a family only until then)**: `BlockedService` / `BlockedDriver` is a finding on the PC, not in the game, and the notice says so (§S23-3), and a refusal no family names is said in the guard's words (`Formats.GuardSentence`) — it printed the end's name, "reason RefusedByGuard"; `reason` stays the session's end reason — **guard fired**; `hookingTurnedOff` (2026-09-22) is true when the finding turned the game's hooking off (`19_SAFETY` §What a finding does to the game); UI shows the plain-language explanation — ~~and the Tier-2 offer~~; there is no alternative measurement to offer, only the option to record the session unmeasured (`08_UI` §Safety events). *(Built: for `RefusedByGuard`, `RefusedPreviouslyBlocked`, `RefusedKillSwitch`, `PreScanCouldNotVerify` and, since 2026-09-21 (beta.4), `TargetUnreadable` — a protected process the Agent could not open (added 2026-10-04) — `PreScanCouldNotVerify` with no family, because "could not verify" is neither a hit nor a pass; `family`/`signal` are the verdict's. A game merely not enabled or not consented raises nothing: that is an ordinary Tier-2 row, not a refusal to explain.)* |
|
||||
| `CaptureDegraded` | A→UI | `{ sessionGuid, from: 1, to: 2, reason }` — Tier 1 → Tier 2 mid-flight, or overlay self-disabled. **Under a two-rung ladder this means measurement STOPPED**, not that it continued at lower fidelity, and the notice must say so. *(Since beta.18 it says the end in words, `Formats.EndReasonText`; it printed `reason` raw — "The hook stopped (WriterSelfDisabled); the session continues without measuring" — and a stop ends the session, it does not continue it.)* *(Built: `SupervisionLost`, `WriterSelfDisabled`, `WriterStoppedBlocklisted`, `WriterNeverInstalledHooks`, `SupervisionFaulted`, `KillSwitchEngaged` — `RecordedSessionEvents.Classify` is the table.)* |
|
||||
| `SafetyUnhook` | A→UI | `{ sessionGuid, family?, signal?, hookingTurnedOff, guardReason? }` — `guardReason` as on `CaptureRefused` (beta.13) — anti-cheat appeared mid-session; prominent UI notice; `hookingTurnedOff` as on `CaptureRefused`. *(Built: the verdict that FIRED, not the pass that started the session — `CaptureOutcome.Verdict` carries the supervisor's last verdict on this reason since 2026-09-13.)* |
|
||||
| `HookingTurnedOff` | A→UI | `{ gameId, gameName?, reason, family?, signal? }` — **since 2026-09-25 (beta.8):** the Agent's pre-scan of the library (`19_SAFETY` §What a finding does to the game) found anti-cheat in a game whose hooking the user had turned on, and turned it off. Not a session event — no session is running — so the UI's notice carries no "record without measuring" action, only Dismiss (`SafetyNoticeKind.HookingOff`). A finding on a game whose hooking was already off sends nothing: its page and its library card change, nothing the user switched on did. Additive: a client that does not know the type ignores it (§Versioning). |
|
||||
| `CaptureError` | A→UI | `{ sessionGuid?, code, message }` — `InjectFailed`, `RingVersionMismatch`, `AttachRefused`, ~~`EtwAccessDenied`~~ (struck 2026-09-13 with the tier), ~~`PresentMonMissing`~~ (retired with the tool, 2026-08-27 — a code naming an implementation nobody chose), `TelemetryUnavailable`, `DbWriteFailed`, `SessionFaulted` (the session's task threw before finalize; the `.partial` stays for recovery, and ~~no `SessionCompleted` follows~~ a `SessionCompleted` with `finalize: faulted` follows since 2026-09-23). *(Built: `RingVersionMismatch` for a layout / record-size / build-id refusal — the "restart the game after an update" case — `AttachRefused` for the rest of the ring's refusals, `InjectFailed` for a target that could not be started, pinned, read or singled out.)* |
|
||||
|
||||
+85
-10
@@ -19,6 +19,22 @@ 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 — and, since beta.18,
|
||||
> every setting the Agent reads (the user-mode exception option and the three Recording numbers had been missed, and a
|
||||
> change said the capture agent would read it) and the update channel beside the update check
|
||||
> (`ViewerModeTests.EverySettingTheAgentReadsIsOffInAViewer`). 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**
|
||||
@@ -31,12 +47,16 @@ WPF + **WPF UI (Wpf.Ui, Fluent)**. Shell = `ui:FluentWindow` with custom `ui:Tit
|
||||
> rendered — below; corrected 2026-10-04). It is information, not one of FR-11's documents:
|
||||
> nothing is accepted or recorded, and the Disclaimer points at it.
|
||||
>
|
||||
> **Help ▸ User guide, beta.12 (D44).** `guide/` — eight short English pages for players (install, record a game, read
|
||||
> your results, anti-cheat and safety, your data, questions and answers, the terms in plain words) — embedded in the
|
||||
> **Help ▸ User guide, beta.12 (D44).** `guide/` — ~~eight~~ short English pages for players (install, record a game, read
|
||||
> your results, anti-cheat and safety, your data, questions and answers, the terms in plain words; *since beta.17, D54,
|
||||
> also the screens, every setting, what to do when something goes wrong and the words the App uses — twelve pages,
|
||||
> and the wiki's End-user part*) — embedded in the
|
||||
> App (`Services.EmbeddedDocuments.Guide`, titles from each page's first heading) and shown in a `Windows/DocumentWindow`
|
||||
> with a page list, Limitations last; a link between guide pages opens the page in the window. Help ▸ Documentation is
|
||||
> *Online documentation*: the README at this build's source. `GuideDocumentsTests` holds every page listed and titled and
|
||||
> every link leading somewhere.
|
||||
> every link leading somewhere — and since beta.17 every section link (against the anchors the App's renderer gives the
|
||||
> target), the contents in the App's order, and that *Every setting* and *The screens* name every setting the Settings
|
||||
> page shows and every page and menu item of the main window.
|
||||
>
|
||||
> **Documents are rendered, beta.12 (owner request 4, D45).** Every Markdown document the App shows — the Legal Gate's
|
||||
> three texts, Help ▸ Limitations, the update notes, About's documents — is drawn by `Markdown/MarkdownRenderer`
|
||||
@@ -111,7 +131,7 @@ The Menu sits in its own row **below** the TitleBar (never inside the drag regio
|
||||
## Notifications policy
|
||||
|
||||
- **In-app, transient** (rules updated, export done, non-fatal capture warning): `ISnackbarService` snackbar, 4 s.
|
||||
- **In-app, persistent** (Agent offline, PawnIO missing, update downloaded): `ui:InfoBar` banner pinned above content with action button.
|
||||
- **In-app, persistent** (Agent offline, ~~PawnIO missing,~~ update downloaded, a viewer's folder, the safety notices): `ui:InfoBar` banner pinned above content with action button. *(Corrected 2026-10-07: no PawnIO banner was ever built — CPU temperature reads N/A, and Settings ▸ System says it needs the admin mode and PawnIO; the viewer's banner (D52) and the safety notices were missing from the list.)*
|
||||
- **System-level, app possibly minimized** (session saved with "View" action, capture error while in tray, update available): tray balloon/toast via H.NotifyIcon.
|
||||
- One event → exactly one channel; never duplicate the same event across snackbar *and* tray.
|
||||
|
||||
@@ -150,6 +170,26 @@ The Menu sits in its own row **below** the TitleBar (never inside the drag regio
|
||||
> reads as before. Tests: `SafetyNoticesTests.AServiceOrDriverIsOnThisPcAndAModuleIsInThisGame`,
|
||||
> `…AnUnhookSaysWhereTheFindingWasAndPromisesNoReEnable`, `Tier2ReasonTests`.
|
||||
>
|
||||
> **Every notice in words — beta.18** (found while writing the guide, beta.17). Three texts printed what only the code
|
||||
> knows. The gate's own refusals — *Disable all hooking*, a game blocked before — carry the gate's label where a finding
|
||||
> carries its family, and the kill switch's notice read *"kill switch was detected in this game (the global 'disable all
|
||||
> hooking' switch is on (FR-2.4); …). FrameLedger will not inject into it, and nothing overrides that."* They are said as
|
||||
> the session's end now (`Formats.EndReasonText`: "All hooking is switched off in Settings, so nothing was measured."),
|
||||
> never as a finding. A refusal no family names read *"The anti-cheat guard did not hook this game: reason
|
||||
> RefusedByGuard."*: the events carry the guard's own reason for every refusal since (`07_IPC`), and the sentence is its
|
||||
> words — "… the game is 32-bit, and the hook runs in 64-bit games only."; an older Agent's reads `End_RefusedByGuard`.
|
||||
> A 30 s re-scan that could not look while the game still ran read *"Capture stopped: Access is denied. was detected while
|
||||
> the game was running"*; it reads `Safety_Unhooked_Unnamed_Format` ("Capture stopped while the game was running — the
|
||||
> game's process could not be opened — and FrameLedger unhooked."). And `CaptureDegraded` printed its reason raw and said
|
||||
> the session went on — *"The hook stopped (WriterSelfDisabled); the session continues without measuring."* — where a stop
|
||||
> ends it: the notice is the end's own sentence ("The measuring hook turned itself off after repeated faults, so measuring
|
||||
> stopped."), and `Notice_Degraded_Unknown_Format` names only a reason this build has no words for. Tests:
|
||||
> `NoticesFromTheAgentTests` builds each event as the Agent does — the gate's verdicts, the native facade's
|
||||
> (`AntiCheatVerdict.FromNative`), `RecordedSessionEvents.PublishReason`, the wire's codec — walks every refusal and every
|
||||
> stop, and refuses an enum's name, a requirement's id or "reason X" in any notice; it went red on the unfixed code with
|
||||
> exactly the texts above. Until then the notices' tests raised events written by hand ("GuardBlocked", "HookFaulted", a
|
||||
> guard reason sent as the end), which no Agent sends.
|
||||
>
|
||||
> **Corrected 2026-09-14, after the owner saw a red bar with no way out.** WPF UI 4.3.0's `InfoBar` template has
|
||||
> **no `ContentPresenter`**, so the action button above — placed as the InfoBar's Content, the only dismissal once
|
||||
> `IsClosable="False"` removed the X — was never rendered. The view model was right and the screen was wrong.
|
||||
@@ -591,13 +631,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*
|
||||
@@ -626,7 +672,8 @@ Agent section: elevation state with a plain explanation of what elevation *optio
|
||||
> **Built 2026-09-14 (P3 PR-8a), with three rows deferred to PR-8b and one to PR-9.** `SettingsViewModel` over
|
||||
> `Application.Settings.RegisteredSettings` (the registry of `06_DATA_MODEL` §Settings registry — every write is
|
||||
> one `settings` row, and a key the Agent reads gets the 4 s "Applied. The capture agent reads it at the next
|
||||
> session start" line, D16). **Capture, first:** the kill switch as a `CardExpander` whose header is the toggle
|
||||
> session start" line, D16 — but for turning the kill switch on, which says a game being measured stops at its next
|
||||
> safety scan, within 30 seconds: beta.18; until then it said the next session start). **Capture, first:** the kill switch as a `CardExpander` whose header is the toggle
|
||||
> and whose state line says "All hooking is off" / "Per-game settings decide" — it is `hooking.kill_switch`, the
|
||||
> gate's fourth input (`CaptureSession` consults it at every 30 s re-scan, so a running measured session stops at
|
||||
> its next scan; nothing else needs pushing); the hook-enabled list is `games.hook_enabled` as the ledger has it,
|
||||
@@ -746,7 +793,8 @@ the requirement was one bullet under §UX rules, and nothing checked it.
|
||||
| **Arrows, Home/End, Page Up/Down** | Move within a `DataGrid` (Sessions, Compare picker, Import checklist) | `DataGrid` defaults |
|
||||
| **Esc** | Closes the open `ContentDialog` or `MessageBox` with no result — the same as its Close/Cancel button | `DialogKeyboard`, one class handler per dialog type registered at start-up |
|
||||
|
||||
**Esc is the Close button, never the primary one.** On the consent dialog (FR-2.1) that is "Keep it off": nothing is
|
||||
**Esc is the Close button, never the primary one.** On the consent dialog (FR-2.1) that is ~~"Keep it off"~~ "Keep hooking
|
||||
off" *(the button's text, corrected 2026-10-07)*: nothing is
|
||||
stamped. A dialog that offers no Close button is not dismissed by Esc, and the Legal Gate (FR-11) is a window of its own
|
||||
(`FirstRunWindow`) with explicit Decline and Accept, on which Esc does nothing. WPF UI 4.3.0 handles no key in
|
||||
either dialog type (its `ContentDialog.cs` and `MessageBox.cs` at tag 4.3.0 have no key handler — read 2026-09-15),
|
||||
@@ -808,6 +856,33 @@ 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.
|
||||
>
|
||||
> **A fifth hole, closed 2026-10-07 (beta.18; the owner's screenshots of beta.17 in the dark theme: every page's title and
|
||||
> section headings near-black on the dark window — beta.16's screenshot shows it too).** This text had no colour of ours,
|
||||
> because it had none. A page is shown in WPF UI's `NavigationViewContentPresenter`, a `Frame`, and a Frame passes no
|
||||
> inherited value into its page (`InheritanceBehavior.SkipToAppNow`), so a text that sets no colour falls to the TextBlock
|
||||
> default, which WPF UI 4.3.0 makes black (`16_WPFUI_SYNTAX` §Gotchas). Cards, grids and controls set their own; the bare
|
||||
> titles and headings did not: 19 texts on the six pages at 1.29:1. Every check above laid a page out straight in a
|
||||
> window, whose text colour the page then inherited — a page the App never draws — and a page on screen during a theme
|
||||
> switch did take the window's colour, while each navigation makes a new one that does not, so it came and went. Every
|
||||
> page sets `Foreground="{DynamicResource TextFillColorPrimaryBrush}"` on its root. Held two ways:
|
||||
> `AccessibilityTests.EveryPageSetsItsOwnTextColour`, and `PagesLoadTests.EveryTextIsReadableInBothThemes` — every
|
||||
> surface hosted as the App hosts it, a page in the presenter, and every text that shows ≥ 3:1 over the colour painted
|
||||
> under it, in both themes. `EveryTextFollowsAThemeSwitch` hosts its pages in the presenter too since, and went red with
|
||||
> them: a page made after a switch stayed black. All three went red on the unfixed XAML before they went green.
|
||||
|
||||
### DPI
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}`.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
@@ -263,6 +272,16 @@ substitutes it with ~~the tag date~~ the run's UTC date (corrected 2026-10-04) w
|
||||
address — is resolved in the source files, because an unsubstituted token in a
|
||||
document the app displays for acceptance (FR-11) is a defect, not a template.
|
||||
|
||||
**The build id is read before it (beta.18).** The substitution edits tracked files, and the native build id is
|
||||
`git describe --dirty` at CMake's configure (`src/native/FrameLedger.Shm/CMakeLists.txt`): every release until beta.18
|
||||
shipped `<tag>-dirty` — the owner's Dashboard read *Overlay build v0.1.0-beta.17-dirty*, and that run's log printed
|
||||
`FL_BUILD_ID = v0.1.0-beta.17-dirty` two lines after `RELEASE_DATE = 2026-10-07 in 3 file(s)`. `release.yml` now reads
|
||||
describe from the clean checkout first, refuses one that is already dirty or longer than 31 characters, and passes it
|
||||
as the environment's `FL_BUILD_ID`, which CMake takes as given (checked for the characters a C string literal carries);
|
||||
after the publish, `tools/buildid-check.ps1` reads it back out of the four native binaries that compile it, by their
|
||||
bytes — nothing is loaded. A developer's build still runs describe itself (`+` marks a dirty tree when the long form
|
||||
would not fit).
|
||||
|
||||
## Local quality gate (pre-push)
|
||||
|
||||
`./build.ps1 check`:
|
||||
@@ -289,8 +308,10 @@ document the app displays for acceptance (FR-11) is a defect, not a template.
|
||||
13b. `tools/accuracy-check.ps1 -SelfTest`, then live — the accuracy block is ONE text (`legal/ACCURACY.md`) embedded verbatim in `README.md` and `legal/DISCLAIMER.md` §4; a copy that drifted, a copy with no markers, or an empty source is red. Four self-test cases, both directions (§S23-6, 2026-09-06)
|
||||
13c. **`tools/notice-check.ps1 -SelfTest`, then live** (beta.12, owner decision D45, 2026-10-03) — every first-party source file (`.cs .cpp .h .inl .ps1 .xaml`, tracked or new, minus `src/native/third_party/`) opens with `SPDX-License-Identifier: GPL-3.0-only` and `Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE` in its own comment syntax, because GPLv3 §7 wants additional terms named "in the relevant source files" (`NOTICE` carries them); the second line may name another holder and year in the same form (a contributor's own file).
|
||||
Seven self-test cases, both directions; `./tools/notice-check.ps1 -Fix` writes a missing header, and `tools/resx-gen.ps1` generates the accessor with it
|
||||
13d. **`tools/wiki-build.ps1 -SelfTest`, then `-Check`** (beta.17, owner decisions D53/D54, 2026-10-07) — assembles the GitHub Wiki from `wiki/`, `guide/` and `LIMITATIONS.md` into a temporary folder, as `wiki.yml` does at a release (`13_CI_CD` §wiki.yml), and fails on a link to a file, folder or section that does not exist, two sources for one page, a page that neither Home nor the sidebar leads to, a sidebar that lists the guide in another order than `guide/README.md`, a backticked repository path in a `wiki/` page that names nothing, and a version number written into a `wiki/` page (the footer says which release the wiki shows). Nine self-test cases, both directions
|
||||
14. `tools/changelog-check.ps1 -SelfTest` — nine cases, five expected RED. The live half needs a pull request's changed-file list and is supplied by `ci.yml`
|
||||
14b. `tools/release-notes.ps1 -SelfTest` — five cases over a fixture changelog (a dated and an undated section, a missing one, a prefix that must not match, an empty one). The live half needs a tag's version and runs in `release.yml`, where a missing or empty section is a red release (P4 PR-5)
|
||||
14c. **`tools/buildid-check.ps1 -SelfTest`** (beta.18) — eight cases, both directions: a binary built from a dirty tree (`-dirty`, or the short form's `+`), one with no id, a missing one, and an expected id that is dirty or not an id are red. The live half needs the release's clean-checkout id and runs in `release.yml` over the published tree (§Release-time token substitution)
|
||||
15. `tools/resx-audit.ps1` — ~~**skipped loudly; it does not exist, and no `.resx` file does either**~~ **built 2026-09-13 (P3 PR-2)**: `-SelfTest` first (11 fixture cases, both directions), then the live pass over every `Strings.resx` family under `src/` — key sets equal across en/vi/ja, `Safety_*` in `ja` marked for review or signed, `Strings.Designer.cs` current with `tools/resx-gen.ps1`. A tree with no family is red (`09_I18N` §Translation workflow)
|
||||
16. **struct-mirror** — reads this run's `.trx` and fails when `ShmLayoutMirrorTests` did not execute, so deleting the mirror test is red as well as breaking it
|
||||
16b. **`tools/test-artifacts-check.ps1`** — `-SelfTest` first (seven cases, two RED), then live: an `overlay-*.log` created since this gate started, still in the real `%LOCALAPPDATA%\FrameLedger\logs` after the tests, whose first line names a `hook-harness*` image, fails the gate. It is what makes a test binary without its log sweep red (`17_HOOK_ENGINE` §Native logging, 2026-09-15); a game's log never counts
|
||||
|
||||
+40
-1
@@ -52,6 +52,17 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
|
||||
case. `Kill` now waits for exit (bounded, asserted) and the delete retries. Not §S19(b) either — a test-harness
|
||||
race, and the third flake shape of the day (the registry-subtree race between `VkLayerRegistrationTests` and the
|
||||
GOG reader's test, fixed in #188) was the same kind.
|
||||
- **Two more on 2026-10-07 (beta.18), both re-run green and then fixed the same day.**
|
||||
`WhenTheTargetExitsTheHostStopsAndSaysWhy` ended **`TargetNotRunning`** (#286, run 37619719203): the host resolves its
|
||||
target once, as it starts, and a host slower than the harness's 6 s hold found it gone — the shape recorded since
|
||||
2026-09-21. The hold is 15 s: a margin, not a signal, because the host prints nothing until its session ends.
|
||||
`LaunchModeOnAVulkanTargetAttachesToTheLayersRingAndInjectsNothing` ended **`RefusedByGuard` / `ModuleScanFailed`**
|
||||
(#288, run 37627351438): the hosted runner has the Vulkan loader and no device, so the harness exits 77 with a
|
||||
`[SKIP]` line — but the runner is elevated, the host starts the harness through `CreateProcessWithTokenW`
|
||||
(`UnelevatedProcess`), the child gets no stdout, and the line never reached the host's output; the test then
|
||||
depended on the session reading `LaunchTargetExited`, and a scan that hit the dying harness failed it instead. The
|
||||
test now asks the harness directly, before the host runs (exit 77 = skip, with the harness's own line); hiding the
|
||||
Vulkan ICDs from that probe makes it skip in under a second, and on a machine with a device it runs in full.
|
||||
- **A re-run ERASES the evidence, which is why the count above had to be kept by hand.**
|
||||
`gh run rerun --failed` updates the original run's conclusion, so `gh run list` showed **18 success, 1
|
||||
cancelled, 0 failed** across the twenty runs that contained all three failures above. Anyone measuring
|
||||
@@ -127,6 +138,10 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
|
||||
`VERSION` file (`12_BUILD` §Version); and `CHANGELOG.md` must carry a **non-empty** `## [x.y.z]` section for the
|
||||
full version, extracted by `tools/release-notes.ps1` (self-tested on every `build.ps1 check`). A missing
|
||||
section is a red release, not an empty note — the ledger's header said the opposite for five weeks.
|
||||
- **The build id from the clean checkout** (beta.18): `git describe --always --dirty --abbrev=12` before anything edits a
|
||||
tracked file — a dirty one or one over 31 characters stops the run — into `FL_BUILD_ID` for CMake. Until beta.18 the
|
||||
substitution below ran first and every release's natives called themselves `<tag>-dirty` (`12_BUILD` §Release-time
|
||||
token substitution).
|
||||
- `{{RELEASE_DATE}}` substituted in `legal/*.md` with the run's UTC date **before the build**, because the App
|
||||
embeds those documents (FR-11); any `{{` token left anywhere after that fails the job.
|
||||
- **The identical gate** — `./build.ps1 check`, native first, every tool including `versioninfo-check` against
|
||||
@@ -184,6 +199,29 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
|
||||
- **The `anticheat` block gets extra scrutiny:** schema-valid, non-empty, no entry removed without a justification in the PR body. Removing a blocklist entry is a safety change and requires the same review as a security fix. *(Added 2026-10-04: the PR-only removal step fails the job on any removal, a shrunk per-title list or an added trusted signer, whatever the body says — the justification is for the reviewer, and the job stays red.)*
|
||||
- `permissions: contents: read`.
|
||||
|
||||
### `wiki.yml` — after a successful Release run, and by hand · **repo-local, built 2026-10-07 (beta.17, D53/D54)**
|
||||
- **What:** the GitHub Wiki is a copy of the repository's own pages — `wiki/` (Home, the sidebar, the developer pages)
|
||||
and `guide/` (the user guide: the End-user part, the same pages the App shows) with `LIMITATIONS.md`.
|
||||
`tools/wiki-build.ps1` names each page (a guide page after its first heading, `guide/README.md` as *User-guide*,
|
||||
`LIMITATIONS.md` as *Limitations*), rewrites links between pages to page names and every other repository link to
|
||||
its address on GitHub **at the release's tag**, drops each page's first heading (the wiki prints the page name), and
|
||||
writes a footer naming the tag. The same assembly is `build.ps1`'s `wiki-check` gate (`12_BUILD` §Local quality gate,
|
||||
13d), so a dead link is red on the pull request, never on the published wiki.
|
||||
- **When:** `workflow_run` on `Release`, completed — the job runs only when that run succeeded and was started by a
|
||||
pushed `v*` tag, so a `workflow_dispatch` rehearsal of `release.yml` never publishes. It checks out the run's
|
||||
`head_sha` (a `workflow_run` job runs `main`'s copy of this file) and links at `head_branch`, the tag. By hand:
|
||||
`gh workflow run wiki.yml -f ref=main -f publish=false` builds, checks and uploads the pages as an artifact; with
|
||||
`publish=true` it publishes them.
|
||||
- **Why not a step of `release.yml`:** the release stays as it was, its rehearsal stays a pure rehearsal, and a wiki
|
||||
that fails to publish is a red run of its own that can be re-run — a step after `gh release create` could never be
|
||||
re-run, the release already existing. A release created with `GITHUB_TOKEN` fires no `release` event for other
|
||||
workflows; `workflow_run` fires because the Release run itself was started by a tag push.
|
||||
- **Publishing:** `gh auth setup-git`, a clone of `<repo>.wiki.git`, everything but `.git` replaced, a commit as
|
||||
`github-actions[bot]` only when something changed, `git push origin HEAD:master` (the wiki's branch is `master`). A
|
||||
page edited on the Wiki tab is overwritten at the next release: edit `wiki/` or `guide/`.
|
||||
- `permissions: contents: write` — the repository's default workflow token is read-only (read from the API,
|
||||
2026-10-07), and pushing to the wiki repository needs write.
|
||||
|
||||
## Dependabot (`.github/dependabot.yml`)
|
||||
|
||||
```yaml
|
||||
@@ -215,7 +253,7 @@ Central package management makes Dependabot PRs single-file diffs.
|
||||
|
||||
**In the tree — done:**
|
||||
|
||||
- [x] Repo-local `ci.yml`, `codeql.yml`, `release.yml`, `rules-publish.yml` (all four repo-local by decision, §Workflows); ~~caller stubs pointing at `poli0981/.github`~~ — never the design, see the first paragraph
|
||||
- [x] Repo-local `ci.yml`, `codeql.yml`, `release.yml`, `rules-publish.yml` (all four repo-local by decision, §Workflows); ~~caller stubs pointing at `poli0981/.github`~~ — never the design, see the first paragraph *(and `wiki.yml` since beta.17, repo-local too: five)*
|
||||
- [x] Issue forms `bug_report.yml`, `feature_request.yml`, `safety_gap.yml`; `ISSUE_TEMPLATE/config.yml` pointing a vulnerability at private reporting; PR template referencing CLAUDE.md's definition of done
|
||||
- [x] `.github/dependabot.yml` (nuget + github-actions, weekly)
|
||||
- [x] `SECURITY.md` — the private route for a vulnerability, the public route for a safety gap, and the honest response intent (2026-09-16)
|
||||
@@ -227,4 +265,5 @@ Central package management makes Dependabot PRs single-file diffs.
|
||||
- [ ] `Rules / validate` as a required check (§S23-2, after its skip-shim)
|
||||
- [ ] Dependabot alerts + security updates (the manifest is in the tree; the alerts are a setting)
|
||||
- [x] Private vulnerability reporting enabled (Settings ▸ Security), so `config.yml`'s link resolves *(marked 2026-10-04: GitHub reports it enabled)*
|
||||
- [ ] Wiki editing restricted to collaborators (Settings ▸ General ▸ Features ▸ Wikis ▸ *Restrict editing to collaborators only*): otherwise anyone with a GitHub account can change a page until the next release overwrites it (§wiki.yml, beta.17)
|
||||
- [ ] Repo topics: `windows`, `wpf`, `benchmark`, `fps`, `game-performance` (~~`presentmon`~~ — dropped 2026-08-27, §G)
|
||||
@@ -63,6 +63,34 @@ 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.
|
||||
|
||||
**A page is measured in the Frame the App shows it in, and a theme brings its accent (beta.18).** WPF UI's
|
||||
`NavigationViewContentPresenter` is a `Frame`, which passes no inherited value into the page, the text colour included, so
|
||||
a page laid out straight in a window measures the window's colour and not the App's: the theme-switch check above did, and
|
||||
stayed green over every page title drawn black (`08_UI` §Contrast, fifth hole). The rendered checks host a page in the
|
||||
presenter (`PagesLoadTests.Hosted`), and `PagesLoadTests.EveryTextIsReadableInBothThemes` measures every surface's shown
|
||||
texts at ≥ 3:1 in both themes. `Visuals.UnderTheme` switches as the App does — the accent resources derived for the theme
|
||||
from Windows' default accent (`Visuals.DefaultAccent`, the App's derivation rather than the machine's own palette), then
|
||||
the dictionary — and puts the application's own resources back afterwards. The accent lives in `Application.Resources`,
|
||||
not in a theme dictionary; until then a check under Light measured the dark theme's link blue on the light window, 1.9:1,
|
||||
a colour the App never shows. The theme-switch check compares what can be seen: a text only one of the two instances holds
|
||||
counts where it shows, and a collapsed part is not compared (a switch re-applies the template of a DataGrid's idle scroll
|
||||
bar, and its glyphs exist in the switched instance only).
|
||||
|
||||
**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 +115,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)
|
||||
|
||||
+35
-3
@@ -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
|
||||
@@ -152,6 +152,8 @@ Native `Menu`, `TabControl`, `ComboBox`, `Slider`~~, `ListView`~~ are fine — t
|
||||
styles (`Styles/FrameLedger.xaml`), or the `Pill` style with a `SystemFillColor*BackgroundBrush` and an explicit text
|
||||
brush; `ContrastTests` refuses all five (`08_UI` §Contrast).
|
||||
- Do **not** set `Background` on `FluentWindow` (kills Mica). Page backgrounds transparent by default.
|
||||
- **Every `Page` root sets `Foreground="{DynamicResource TextFillColorPrimaryBrush}"`** (2026-10-07): the navigation's
|
||||
Frame passes no text colour into a page, and a text with none is black (§Gotchas).
|
||||
- Exception to the no-hex rule: the chart palette — defined once per theme in ~~`Styles/ChartPalette.xaml` (two dictionaries)~~ `Styles/ChartPalette.Dark.xaml` and `ChartPalette.Light.xaml` (corrected 2026-10-04), never inline.
|
||||
|
||||
## FlowDocument (rendered documents, beta.12)
|
||||
@@ -254,10 +256,40 @@ 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.
|
||||
- [ ] **A page in the `NavigationView` inherits nothing, its text colour included.** `NavigationViewContentPresenter` is a
|
||||
`Frame`, and `Frame` sets `InheritanceBehavior.SkipToAppNow`: the window's `Foreground` stops there, and a text that sets
|
||||
no colour falls to the TextBlock default, which WPF UI 4.3.0's `TextBlockMetadata` makes `Brushes.Black`. Cards, grids
|
||||
and controls set their own colour in their templates; the bare texts did not — every page's title and section headings
|
||||
were black on the dark window, 1.3:1 (the owner's screenshots of beta.17; beta.16's show it too). It came and went: a
|
||||
page on screen during a theme switch did take the window's new colour through the switch, and every navigation makes a
|
||||
new page that does not. Every `Page` root sets `Foreground="{DynamicResource TextFillColorPrimaryBrush}"`
|
||||
(`AccessibilityTests.EveryPageSetsItsOwnTextColour`). A check that lays a page out straight in a window measures the
|
||||
window's colour, not the App's — beta.17's theme-switch check did and was green over the black titles — so the rendered
|
||||
checks host a page in the presenter, and `PagesLoadTests.EveryTextIsReadableInBothThemes` measures every surface so
|
||||
hosted at ≥ 3:1 in both themes.
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+264
-6
@@ -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.)*
|
||||
@@ -1409,9 +1410,11 @@ stops there"~~ — the override itself is gone since 2026-09-22 (D22).
|
||||
**Found and NOT fixed — each needs its own PR.**
|
||||
- ~~**A refused session is not recorded, though the notice says it is.**~~ **Fixed 2026-09-22 (D23):** the loop holds a
|
||||
refused session open until the target exits, so Tier 2 has a producer and the sentence is true for every refusal.
|
||||
- **A released Overlay logs its build as `v0.1.0-beta.3-dirty`**: the CI checkout is dirty by the time CMake runs
|
||||
- ~~**A released Overlay logs its build as `v0.1.0-beta.3-dirty`**: the CI checkout is dirty by the time CMake runs
|
||||
`git describe`. Both sides of the handshake compile the same string, so nothing breaks; it is a release that calls
|
||||
itself dirty.
|
||||
itself dirty.~~ **Fixed 2026-10-07 (beta.18 PR-3):** the dirt was `release.yml`'s own date substitution in
|
||||
`legal/*.md`; the workflow reads describe from the clean checkout before it and hands it to CMake as `FL_BUILD_ID`,
|
||||
and `tools/buildid-check.ps1` reads it back out of the published binaries (`12_BUILD` §Release-time token substitution).
|
||||
- ~~**An install over a running Agent half-replaces the folder** (three failed starts, `Microsoft.Data.Sqlite` not
|
||||
found).~~ **A GUESS, WITHDRAWN the same evening, and it had already been published in beta.4's notes.** Nothing was
|
||||
installed between the failures (20:59–21:01) and the start that worked (21:02); the PC had been restarted at 20:57
|
||||
@@ -1558,7 +1561,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 +1874,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 +1909,220 @@ 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 *(struck 2026-10-07: the head is §beta.17 below)*
|
||||
|
||||
*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.
|
||||
|
||||
## ~~**START HERE**~~ — 2026-10-07, 0.1.0-beta.17: text that follows a theme switch, scroll bars hidden everywhere, a wiki *(struck 2026-10-07: the head is §beta.18 below)*
|
||||
|
||||
*Status is `CHANGELOG.md` `[0.1.0-beta.17]`; this is what no other file carries. The owner's report (2026-10-07, three
|
||||
screenshots of beta.16): Settings' descriptions kept the old theme's colour after a switch; the Dashboard kept its
|
||||
scroll bar with Hide scroll bars on; "a complete wiki, concise and easy, End-user and Dev". Five stacked PRs — #281 the
|
||||
theme text, #282 the scroll bars, #283 the guide's four new pages, #284 the wiki and its publishing, then the
|
||||
release.*
|
||||
|
||||
**Decisions (owner, 2026-10-07, asked before the plan — do not re-ask):**
|
||||
|
||||
- **D53 — the wiki's source is the repository.** `wiki/` (Home, the sidebar, the developer pages) and `guide/` with
|
||||
`LIMITATIONS.md` are assembled by `tools/wiki-build.ps1` and published to the Wiki tab by `.github/workflows/wiki.yml`
|
||||
after a successful Release run (and by hand); a page edited on the tab is overwritten at the next release. English.
|
||||
- **D54 — the wiki's End-user half is the user guide**, one source: it grows past D44's eight pages (the screens, every
|
||||
setting, troubleshooting, a glossary — twelve) and stays embedded in the App. Tests hold that every setting the
|
||||
Settings page shows and every page and menu item of the main window is named in it.
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **`ui:TextBlock Appearance` pins a brush.** WPF UI 4.3.0 resolves it once (`TryFindResource`) and coerces Foreground
|
||||
to it, so a theme switch leaves the text in the old theme; 129 texts used it. Every contrast check before measured a
|
||||
theme as a surface was *made* under it — a switch needs the surface hosted in a `Window`, because only
|
||||
`Application.Windows` hear a dictionary change (`16_WPFUI_SYNTAX` §Gotchas, `14_TESTING`).
|
||||
- **A class handler on `Loaded` is not a load hook.** WPF raises Loaded only where a subtree listens for it with its own
|
||||
handler, style EventSetter or template trigger — WPF UI's toggle switches carry one, which is why Settings hid its
|
||||
bar and the Dashboard never did. A test that calls `RaiseEvent(Loaded)` proves the handler, never that WPF reaches it;
|
||||
`ScrollChanged` reaches every scroller from its first layout.
|
||||
- **The wiki's git branch is `master`, and the repository's default workflow token is read-only:** `wiki.yml` declares
|
||||
`contents: write`. A release made with `GITHUB_TOKEN` fires no `release` event for another workflow; `workflow_run`
|
||||
does, and runs `main`'s copy of the file — so it checks out the run's `head_sha` and links at its tag.
|
||||
- **A fresh worktree cannot run the full gate** (the native configure, `CONTRIBUTING`): the stack's tip was gated in the
|
||||
main checkout on a detached HEAD, and each PR's own CI ran on its branch.
|
||||
- **Found while writing the guide, not fixed** (a task each): two notices can print an internal name — *"The hook
|
||||
stopped (WriterSelfDisabled)…"*, and a refusal no anti-cheat names reads ~~*"The anti-cheat guard did not hook this
|
||||
game: reason RefusedKillSwitch."*~~ *"…: reason RefusedByGuard."* *(corrected 2026-10-07 by beta.18's tests, which
|
||||
build the Agent's own events: the kill switch's refusal carries the gate's label where a family goes, and read "kill
|
||||
switch was detected in this game (… (FR-2.4) …)"; a re-scan that could not look read "Access is denied. was detected")*; the kill switch's *Applied* strip says "at the next session start" (it applies
|
||||
within 30 s); *Turn off* failing says "Nothing was enabled."; in the viewer, the exception switch, the Recording numbers and the Channel stay enabled;
|
||||
`08_UI` lists a "PawnIO missing" banner that does not exist; and a release's Overlay build id reads `-dirty` (§0.1.0-beta.4,
|
||||
"Found and NOT fixed", still open). *(All but the build id fixed by beta.18 PR-2, 2026-10-07; the build id is PR-3's.)*
|
||||
|
||||
**Owner-only, added to the list below:** item 13.
|
||||
|
||||
## **START HERE** — 2026-10-07, 0.1.0-beta.18: page titles readable in the dark theme, notices in words, a clean build id
|
||||
|
||||
*Status is `CHANGELOG.md` `[0.1.0-beta.18]`; this is what no other file carries. The owner's report (2026-10-07, five
|
||||
screenshots of beta.17 in the dark theme): every page's title and section headings near-black on the dark window — and
|
||||
the two chips beta.17 left (§beta.17, "Found while writing the guide"). Three stacked PRs — #286 the page text, #287
|
||||
the notices and the rest of that list, #288 the release build id — then the release.*
|
||||
|
||||
**No new decisions.** The train is the owner's request of 2026-10-07 ("beta18 with the two chip tasks, and the text that
|
||||
blends into the background in dark mode").
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **A page in the `NavigationView` inherits nothing.** `NavigationViewContentPresenter` is a `Frame`, and a Frame sets
|
||||
`InheritanceBehavior.SkipToAppNow`; WPF UI 4.3.0 makes the TextBlock default black. A page on screen during a theme
|
||||
switch takes the window's new colour through the switch and a page navigated to afterwards does not, so it came and
|
||||
went. Every check before hosted pages straight in a window and measured a page the App never draws — host a page in the
|
||||
presenter (`PagesLoadTests.Hosted`, `16_WPFUI_SYNTAX` §Gotchas).
|
||||
- **The accent is not in the theme dictionary.** WPF UI writes it into `Application.Resources` at every
|
||||
`ApplicationThemeManager.Apply(…, updateAccent: true)`; a test that swaps only the dictionary measures the other theme's
|
||||
accent (`Visuals.UnderTheme` derives it as the App does; `systemAccentColor: true` reads the machine's own palette).
|
||||
- **The gate's own refusals look like findings on the wire.** `HookedCaptureGate` puts a label ("kill switch", "previously
|
||||
blocked") where a family goes; whatever reads a family as "an anti-cheat was found" asks the end reason first. A test
|
||||
of what the user reads builds the event as the Agent does (`NoticesFromTheAgentTests`), never by hand — the
|
||||
hand-written events were why every notice test was green.
|
||||
- **`Safety_Consent_*` strings are versioned with the consent disclosure** (`SafetyDisclosure`): a message that is wrong
|
||||
on one path gets a key of its own rather than a changed meaning.
|
||||
- **A release's natives were `-dirty` by the release's own hand:** its date substitution edits `legal/*.md` before CMake
|
||||
reads describe. The id is read first, handed in, and read back out of the binaries (`tools/buildid-check.ps1`).
|
||||
- **Met again:** `CaptureHostEndToEndTests.WhenTheTargetExitsTheHostStopsAndSaysWhy` (`TargetNotRunning` on a slow
|
||||
runner) failed #286's first CI run; the job was re-run. **And a new one** failed #288's:
|
||||
`…LaunchModeOnAVulkanTargetAttachesToTheLayersRingAndInjectsNothing`. A hosted runner has the Vulkan loader and no
|
||||
device, so the harness exits 77 with a `[SKIP]` line — but the runner is elevated, the launch goes through
|
||||
`CreateProcessWithTokenW` (`UnelevatedProcess`), the child inherits no stdout, and the line never reaches the host's
|
||||
output; when the guard's scan hits the exiting harness (`ModuleScanFailed`) the test fails instead of skipping. Re-run;
|
||||
~~the deterministic fix is a task of its own~~ fixed the same day by beta.18 PR-5 (the test asks the harness itself,
|
||||
before the host runs), which also gave the `TargetNotRunning` case a 15 s hold (`13_CI_CD` §ci.yml).
|
||||
|
||||
**Owner-only, added to the list below:** item 14.
|
||||
|
||||
## Owner-only — no PR can close these
|
||||
|
||||
1. **§S23-2 — branch protection.** `Rules / validate` is not a required status check on
|
||||
@@ -1968,6 +2187,43 @@ 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`.
|
||||
13. **beta.17 on real hardware.** (a) **A theme switch:** on Settings, Dark → Light → Dark, and again with a session's
|
||||
summary window open — every description and caption follows at once. (b) **Hide scroll bars** on: the Dashboard,
|
||||
Games, a game's page, Logs, About, Help ▸ User guide and a drop-down list draw no bar, and the wheel still scrolls;
|
||||
off, the bars come back without a restart. (c) **Help ▸ User guide** lists twelve pages and Limitations; a link to a
|
||||
section opens that section. (d) **The wiki**, once the release is out: the Wiki tab shows Home, the sidebar's two
|
||||
halves and a footer naming `v0.1.0-beta.17` — then tick *Restrict editing to collaborators only* (Settings ▸ General
|
||||
▸ Features ▸ Wikis), or anyone can change a page until the next release overwrites it. (e) The `ja` strings marked
|
||||
`review`.
|
||||
14. **beta.18 on real hardware.** (a) **The dark theme:** every page's title and section headings — Dashboard, Games, a
|
||||
game's page, Compare, Settings, Logs — read light on the dark window, after starting in Dark, after Light → Dark, and
|
||||
after moving between pages. (b) **The overlay build** on the Dashboard's *Capture agent* card reads `v0.1.0-beta.18`,
|
||||
without `-dirty`. (c) **Disable all hooking:** turning it on says a game being measured stops within 30 seconds; with
|
||||
it on, a hooked game's notice reads "All hooking is switched off in Settings, so nothing was measured." (d) The `ja`
|
||||
strings marked `review`, `Safety_Unhooked_Unnamed_Format` among them.
|
||||
|
||||
**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 +2258,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.
|
||||
|
||||
+5
-2
@@ -7,7 +7,8 @@ This folder is for people who build, change or review FrameLedger. **If you only
|
||||
|
||||
| You want to… | Read |
|
||||
|---|---|
|
||||
| Pick up work where it stopped | [`HANDOFF.md`](HANDOFF.md) — sequencing, decisions (D1…D46) and the traps that each cost a cycle. It carries no status on purpose |
|
||||
| Pick up work where it stopped | [`HANDOFF.md`](HANDOFF.md) — sequencing, decisions (~~D1…D46~~ D1 onward — *corrected 2026-10-07: the range grows with every train*) and the traps that each cost a cycle. It carries no status on purpose |
|
||||
| Find your way around first | The [wiki](https://github.com/poli0981/frameledger/wiki)'s developer pages (source: [`../wiki/`](../wiki/), beta.17) — a short page per part, each linking here |
|
||||
| Learn the system | [`../CLAUDE.md`](../CLAUDE.md) (the rules and the layout), then the reading order below |
|
||||
| Build it | [`12_BUILD.md`](12_BUILD.md) — `./build.ps1 check` is the whole gate, the same one CI runs |
|
||||
| Contribute or fork | [`../CONTRIBUTING.md`](../CONTRIBUTING.md), [`../FORKING.md`](../FORKING.md), [`../NOTICE`](../NOTICE) |
|
||||
@@ -76,7 +77,9 @@ are safety items, and something listed there as unresolved should not be built t
|
||||
|
||||
## Beside this folder
|
||||
|
||||
- [`../guide/`](../guide/README.md) — the user guide (players, English).
|
||||
- [`../guide/`](../guide/README.md) — the user guide (players, English); since beta.17 (D54) also the wiki's End-user part.
|
||||
- [`../wiki/`](../wiki/Home.md) — the wiki's own pages: Home, the sidebar, the developer pages (D53). `wiki.yml`
|
||||
publishes them with the guide to the Wiki tab when a release is made; `build.ps1`'s `wiki-check` holds every link.
|
||||
- [`../legal/`](../legal/) — the documents a user accepts, the accuracy statement, the third-party notices and licence
|
||||
texts, the trademark note.
|
||||
- [`../LIMITATIONS.md`](../LIMITATIONS.md) — what the whole software cannot do, in a player's words.
|
||||
|
||||
@@ -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 | |
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
# The screens
|
||||
|
||||
What each part of FrameLedger shows and what each button does. What the numbers mean is in
|
||||
[Read your results](03-read-your-results.md); every setting is in [Every setting](08-settings.md).
|
||||
|
||||
## The main window
|
||||
|
||||
**The badge at the top right** says how the capture agent is doing:
|
||||
|
||||
| Badge | Meaning |
|
||||
|---|---|
|
||||
| Agent connected | Everything works. |
|
||||
| Connecting to agent… · Starting agent… | FrameLedger is reaching the agent, or starting it. Give it a few seconds. |
|
||||
| Waiting for administrator permission… | *Run the agent as administrator* is on, and Windows is asking you. |
|
||||
| Agent offline | The agent is installed but does not answer. FrameLedger keeps trying; **Retry** on the banner tries now. |
|
||||
| Agent not installed | `FrameLedger.Agent.exe` is missing: install FrameLedger again. |
|
||||
| Viewer — no Agent | You opened a copy of a data folder to look at ([When something goes wrong](09-troubleshooting.md#looking-at-a-copy-of-your-data)). |
|
||||
|
||||
**Banners** under the menus stay until you act on them: *Capture agent offline* with **Retry**; *Update* with **Restart to
|
||||
update** (it waits while a game is being recorded); and the safety notices — a game's hooking refused, measurement
|
||||
stopped, hooking turned off — each with one button that only says you have read it.
|
||||
|
||||
**The pages** are on the left: **Dashboard**, **Games**, **Compare**, **Logs**, and **Settings** at the bottom.
|
||||
|
||||
## The menus
|
||||
|
||||
| Menu | Item | What it does |
|
||||
|---|---|---|
|
||||
| **File** | **Add game…** | Pick a game's `.exe` file. It is added with hooking off, and its page opens. |
|
||||
| | **Import library…** | A checklist of the games installed through Steam, GOG Galaxy, Epic and itch.io. |
|
||||
| | **Export** ▸ **Session CSV** · **Session JSON** · **Chart PNG** | Saves the session you last selected or opened. Read [Your data](05-your-data.md) before you share a file. |
|
||||
| | **Exit** | Quits FrameLedger, even when *Minimize to tray on close* is on. |
|
||||
| **Tools** | **Agent status…** | Opens the Dashboard, where the agent's card is. |
|
||||
| | **Update detection rules** | The agent reads its detection rules again and checks your games again. |
|
||||
| | **Vulkan layer registration…** | Opens Settings, where the Vulkan layer is. |
|
||||
| | **Open data folder** | Opens `%LOCALAPPDATA%\FrameLedger` in Explorer. |
|
||||
| | **Database maintenance…** | **Check**, **Back up…**, **Sweep…** and **Compact** your database ([When something goes wrong](09-troubleshooting.md#the-database)). |
|
||||
| **Help** | **User guide** | This guide. |
|
||||
| | **Check for updates** | Asks GitHub now. |
|
||||
| | **Report a bug…** | Builds a report on your PC ([When something goes wrong](09-troubleshooting.md#report-a-problem)). |
|
||||
| | **Online documentation** | The project's page on GitHub. |
|
||||
| | **Limitations** | What FrameLedger cannot do. |
|
||||
| | **About FrameLedger** | The version, the licences and the notices. |
|
||||
|
||||
## Dashboard
|
||||
|
||||
- **Live capture** — the game being recorded right now: its name, **T1** (measured) or **T2** (recorded only), and the
|
||||
time so far. While it is measured: the frame rate, the resolution, the upscaler, frame generation, ray tracing, the GPU
|
||||
and CPU temperatures and the game's memory. *Attached — waiting for the first frames…* means hooking worked and the
|
||||
first frames are on their way.
|
||||
- **Games tracked**, **Total playtime**, **Sessions this week**.
|
||||
- **Capture agent** — *State*, *Agent version*, *Telemetry source* (which sensor readers work on this PC: `l1` is
|
||||
Windows itself, `lhm` is LibreHardwareMonitor, `nvapi` is NVIDIA's own and only on NVIDIA cards), *Overlay build* (the
|
||||
version of the component loaded into games), *Elevated* (whether the agent runs as administrator) and *Running
|
||||
sessions*. Everything reads N/A until the agent answers.
|
||||
- **Recent sessions** — the ten newest. Click one to open its summary.
|
||||
|
||||
## Games
|
||||
|
||||
- **Search games**; sort by **Name**, **Last played** or **Playtime**; **Show as a list** or **Show as a grid**.
|
||||
- **Refresh** reads your library again: it offers games newly installed through a store, and marks a game whose `.exe`
|
||||
is gone as *Not installed*.
|
||||
- **Add game…** — or drop `.exe` files onto the page.
|
||||
- Each game shows its name, its store and engine, and one state: **Hooking on**, **Hooking off**, **Anti-cheat** (found,
|
||||
so it is not hooked), **Exception** (a user-mode exception is in force) or **Not recorded**; then its sessions,
|
||||
playtime and last play. Click it to open its page (in the list: double-click, or Enter).
|
||||
|
||||
## A game's page
|
||||
|
||||
- **At the top:** the name, publisher, version, store and engine, the `.exe` path, the last session, the last measured
|
||||
session's frame rate and its ray-tracing chips. **Edit…** changes the name, publisher, version and notes. **Change
|
||||
executable…** points the entry at another `.exe` and turns hooking back off. **Remove…** asks whether to keep the
|
||||
game's sessions.
|
||||
- **Recording** — off, FrameLedger ignores the program completely: for a launcher or a tool that is not a game.
|
||||
- **Hooking** — on, the game is measured. A warning comes first, and you type `I ACCEPT THE INJECTION RISK` to go on.
|
||||
Read [Anti-cheat and safety](04-anti-cheat-and-safety.md) before you do.
|
||||
- **Anti-cheat** — shown in its place when anti-cheat was found: what was found, and where. **User-mode exception**
|
||||
appears when the game qualifies for the one exception.
|
||||
- **Supports** and **Details** — what the game's own files contain, as far as FrameLedger can tell.
|
||||
- **Tabs:** **Sessions** (every session: double-click a row or press **Open**; **Delete all sessions…** at the top),
|
||||
**Frametime**, **Distribution**, **Trend** (one point per session for a figure you choose, with changes to your
|
||||
hardware or driver marked), **Sensors**, and **Latency** when the game reported it.
|
||||
|
||||
## A session's summary
|
||||
|
||||
It opens from a session row, from the Dashboard, and from the notice when a session is saved.
|
||||
|
||||
- A warning at the top when the game crashed or measuring stopped early.
|
||||
- The **Ray Tracing**, **Path Tracing** and **Ray Reconstruction** chips: click one to correct it by hand, for this
|
||||
session or as the game's default. Your correction is labelled as yours.
|
||||
- The figures, the charts and **Statistics per series** — [Read your results](03-read-your-results.md) explains each.
|
||||
- **Tags and notes** with **Save**, and **Export CSV**, **Export JSON**, **Export PNG**.
|
||||
|
||||
## Compare
|
||||
|
||||
Tick **2 to 5 sessions**, from any of your games, and press **Compare**: one frame-rate curve per measured session, and
|
||||
a table with the best value of each row in bold. Comparing a measured session with an unmeasured one asks first,
|
||||
because they measured different things.
|
||||
|
||||
## Logs
|
||||
|
||||
What FrameLedger and its agent wrote down. Choose **App** or **Agent**, a level, and search; **Pause** stops the view from
|
||||
following new lines. **Open logs folder**, and **Export bug bundle**, which does the same as Help ▸ Report a bug….
|
||||
|
||||
## Settings
|
||||
|
||||
Every switch and box is described in [Every setting](08-settings.md).
|
||||
|
||||
## The tray icon
|
||||
|
||||
The icon by the clock has **Open FrameLedger**, **Pause capture** / **Resume capture**, **Agent status** and **Exit**; a
|
||||
click on it opens the window. **Pause capture** stops measuring the running sessions until you resume, and the paused
|
||||
stretch is left out of their figures. While the window is hidden, a notice pops up when a session is saved or an update
|
||||
is ready.
|
||||
|
||||
## Keyboard and mouse
|
||||
|
||||
- **Ctrl+1** … **Ctrl+5** open Dashboard, Games, Compare, Logs and Settings.
|
||||
- **Alt** or **F10** moves to the menus.
|
||||
- **Esc** closes a dialog the way its Close or Cancel button does.
|
||||
- Over a chart, **Ctrl** and the mouse wheel zoom, dragging pans, and a double-click resets. The wheel alone scrolls the
|
||||
page.
|
||||
@@ -0,0 +1,75 @@
|
||||
# Every setting
|
||||
|
||||
Settings is the last item on the left. Its sections follow, in the order it shows them. Settings marked *agent* are read
|
||||
by the capture agent; unless the row says otherwise, a change applies from the next session.
|
||||
|
||||
## Capture
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Disable all hooking** | Nothing is loaded into any game, whatever each game's own switch says. A game being measured stops being measured at the next safety check, within 30 seconds. Sessions are still recorded. *Agent.* | Off |
|
||||
| **Games with hooking on** | Shown while any game has hooking on: one **Turn off** per game. | — |
|
||||
| **Hide hooking on anti-cheat games** | On, the page of a game where anti-cheat was found shows only what was found; off, it also shows the Hooking switch, greyed out. Such a game is never hooked either way. | On |
|
||||
| **Allow hooking in games whose only anti-cheat runs in user mode** | Turns on the one narrow exception ([Anti-cheat and safety](04-anti-cheat-and-safety.md#the-one-exception-you-can-make)). The games that qualify are listed under it, each with **Make exception…** (after a warning) or **Withdraw**. *Agent.* | Off |
|
||||
| **Vulkan layer** | The component that measures Vulkan games — but only a game FrameLedger starts itself, which the App cannot do yet, so a Vulkan game you start is recorded, not measured. The agent registers and removes it by itself; **Register** and **Unregister** repair that, for your Windows user only. | — |
|
||||
|
||||
The link under them, *Read what the hook does and does not do*, opens the safety document on GitHub.
|
||||
|
||||
## Recording
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Minimum session length (s)** | A shorter session is not kept. 5 to 600 seconds. *Agent.* | 30 |
|
||||
| **Sensor interval (ms)** | How often the PC's sensors are read during a session. 500 to 2000 ms. *Agent.* | 1000 |
|
||||
| **Raw series kept per game** | How many of each game's newest sessions keep their per-frame data; older ones keep their statistics. 0 keeps everything. *Agent.* | 20 |
|
||||
|
||||
## Data
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Delete all sessions** | Deletes every session of every game, with its data and notes, after asking. Your library, your settings and each game's hooking choice stay. It cannot be undone, and it is refused while a game is being recorded. | — |
|
||||
|
||||
## Capture agent
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Run the agent as administrator** | Lets FrameLedger measure games that run as administrator, and read CPU temperature with PawnIO installed. Windows asks every time the agent starts, at logon too. A warning explains the risk first; read [Limitations](../LIMITATIONS.md#running-the-agent-as-administrator). The agent restarts to apply it, or at its next start if a game is being recorded. | Off |
|
||||
| **Start the agent at logon** | **Register**, **Repair** or **Remove** a task that starts the agent when you log on, for your user only and without administrator rights. Without it, FrameLedger starts the agent when you open it. | Not installed |
|
||||
|
||||
## Appearance
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Theme** | Follow system, Light or Dark. Applies at once. | Follow system |
|
||||
| **Language** | English, Tiếng Việt or 日本語. The window is rebuilt in the new language at once. | English |
|
||||
|
||||
## Window
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Start FrameLedger with Windows** | Opens FrameLedger when you log on, for your user only. | Off |
|
||||
| **Minimize to tray on close** | Closing the window keeps FrameLedger running by the clock; quit with **Exit** in the tray's menu or the File menu. | Off |
|
||||
| **Show FPS with two decimals** | Every frame rate with two decimals (62.40) instead of a whole number (62). Pages show it when they next open. | Off |
|
||||
| **Hide scroll bars** | No scroll bars are drawn anywhere; the wheel, the keyboard and touch still scroll. Applies at once. | Off |
|
||||
|
||||
## Updates
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Channel** | *Automatic* follows your copy: a test version (a pre-release) looks for test versions, a release for releases. Or choose *Stable*, or *Beta* (releases and pre-releases). | Automatic |
|
||||
| **Check for updates at startup** | One question to GitHub a few seconds after FrameLedger starts. A new version downloads in the background and installs only when you restart. | On |
|
||||
|
||||
## Logging
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Debug logging** | FrameLedger writes far more detail into its log, for a bug report. The agent keeps its own level. | Off |
|
||||
|
||||
## System
|
||||
|
||||
This PC as FrameLedger records it with every session: processor, graphics card and driver, memory, Windows build and
|
||||
the main display. Nothing is sent anywhere. **Copy** puts the lines on the clipboard, for a bug report.
|
||||
|
||||
## Legal
|
||||
|
||||
**Reopen the legal documents** shows the documents you accepted, and the GPL, again. Nothing is accepted again.
|
||||
@@ -0,0 +1,98 @@
|
||||
# When something goes wrong
|
||||
|
||||
Find what you see, then what it means and what to do. Questions that are not problems are in
|
||||
[Questions and answers](06-faq.md).
|
||||
|
||||
## The capture agent is not working
|
||||
|
||||
| You see | It means | Do this |
|
||||
|---|---|---|
|
||||
| **Connecting to agent…** or **Starting agent…** | FrameLedger is reaching its agent, or starting it. | Wait a few seconds. |
|
||||
| **Agent offline**, and a banner: *The capture agent is not answering* | The agent is installed but does not answer. Your library, sessions and charts still work; only what is live does not. FrameLedger keeps trying. | **Retry** on the banner, or close FrameLedger and open it again. |
|
||||
| **Agent not installed** | `FrameLedger.Agent.exe` is missing from FrameLedger's folder. | Install FrameLedger again from the [Releases page](https://github.com/poli0981/frameledger/releases). |
|
||||
| **Waiting for administrator permission…** | *Run the agent as administrator* is on, and Windows is asking. The prompt may be waiting on the taskbar. | Answer it — or switch the option off in Settings ▸ Capture agent. |
|
||||
| Settings says *the administrator prompt was declined* | The agent runs with your normal rights. | Nothing, unless you need it ([Every setting](08-settings.md#capture-agent)). |
|
||||
|
||||
## A game was recorded but not measured
|
||||
|
||||
The session is **T2**, its frame figures read N/A, and its summary says why on the **Why:** line — go by that line.
|
||||
While the game runs, a notice may say *hooking refused*.
|
||||
|
||||
| Why | Do this |
|
||||
|---|---|
|
||||
| Hooking was off for the game. | Switch **Hooking** on in the game's page, after reading [Anti-cheat and safety](04-anti-cheat-and-safety.md). |
|
||||
| The game's file changed since hooking was switched on — an update, usually. | Switch hooking on again for it. |
|
||||
| The game you added is its launcher. | Add the game's own `.exe` too: hooking a launcher does not reach the game it starts. |
|
||||
| Anti-cheat was found in the game. | Nothing: FrameLedger will not hook it, and hooking stays off. The only exception is narrow ([Anti-cheat and safety](04-anti-cheat-and-safety.md#the-one-exception-you-can-make)). |
|
||||
| An anti-cheat driver or service was running on the PC. It may belong to another game. | Close the program it belongs to: the next session is measured again. |
|
||||
| Anti-cheat appeared while the game was running. | Nothing: measuring stopped, and the summary says *Measurement stopped early*. |
|
||||
| FrameLedger could not check the game's files. | It checks again by itself; Tools ▸ Update detection rules checks now. |
|
||||
| The game runs as administrator. | Settings ▸ Capture agent ▸ *Run the agent as administrator* — read its risk in [Limitations](../LIMITATIONS.md#running-the-agent-as-administrator) first. A game protected by an anti-cheat driver cannot be measured either way. |
|
||||
| The game is 32-bit, uses DirectX 9, or uses Vulkan. | Nothing: these are recorded, not measured ([Limitations](../LIMITATIONS.md#games-it-will-not-measure)). |
|
||||
| **Disable all hooking** is on. | Switch it off in Settings ▸ Capture. |
|
||||
| The game was already running when FrameLedger was updated. | Close the game and start it again. |
|
||||
| Hooking was switched off after the game crashed twice soon after it started. | Switch it on again in the game's page if the cause may be gone — after a driver update, for example. |
|
||||
| The game's file is gone. | If only its drive letter changed, FrameLedger follows it within about 15 seconds; otherwise **Change executable…** on the game's page. |
|
||||
| The component could not be loaded into the game. | [Report a problem](#report-a-problem). |
|
||||
|
||||
## Some numbers read N/A
|
||||
|
||||
- **Everything** reads N/A: the session was not measured — see above.
|
||||
- **1% low** needs 1,000 of the game's own frames, and **0.1% low** 10,000: a shorter session reads N/A for them.
|
||||
- **VSync** reads N/A for OpenGL games.
|
||||
- **VRAM (this game)** reads N/A for the game's first second.
|
||||
- **GPU sensors** on AMD and Intel cards have not been tested, and **GPU held back** is read on NVIDIA cards only.
|
||||
- **A session's charts are gone**: its per-frame data was removed under *Raw series kept per game*
|
||||
([Every setting](08-settings.md#recording)); its statistics stay.
|
||||
- **Presented FPS** instead of the game's own frame rate, **video memory** that differs from an in-game overlay, and
|
||||
**CPU temperature**: see [Questions and answers](06-faq.md).
|
||||
|
||||
## A session says the game crashed
|
||||
|
||||
*How it ended*, on the session's summary:
|
||||
|
||||
| It says | It means |
|
||||
|---|---|
|
||||
| ended normally | The game closed by itself. |
|
||||
| ended with exit code 1 | What *End task* or `taskkill` leaves behind: not a crash. |
|
||||
| crashed (0xC0000005 …) | The game ended with an error code. *0xC0000006* often points at a failing drive. |
|
||||
| crashed (Windows logged an application error) | Windows recorded the game's crash. |
|
||||
| crashed (the game started its crash reporter, …) | The game's own crash reporter started while it was ending. |
|
||||
| interrupted | The agent itself stopped during the session; the session was rebuilt when the agent next started. |
|
||||
|
||||
More in [Limitations](../LIMITATIONS.md#when-a-game-crashed). If FrameLedger itself stops, it says *FrameLedger stopped
|
||||
unexpectedly* and offers to report it.
|
||||
|
||||
## An update does not install
|
||||
|
||||
- *A session is running, so it is applied only after the session ends* — restart FrameLedger once the game has closed.
|
||||
- *… is still loaded in a game FrameLedger measured* — close that game, then **Restart to update**.
|
||||
- *Try again in about an hour* — GitHub limits how often it is asked. *Offline* — no connection.
|
||||
- A download that fails its check twice: [report a problem](#report-a-problem).
|
||||
- Windows warns about the installer: see [Install and first start](01-install.md#download-and-install).
|
||||
|
||||
## The database
|
||||
|
||||
Everything is in one file, the ledger. **Tools ▸ Database maintenance…**:
|
||||
|
||||
- **Check** reads the whole file. If it finds a problem, **Back up…** first, then [report a problem](#report-a-problem).
|
||||
- **Back up…** writes a consistent copy wherever you choose, even while a game is recorded.
|
||||
- **Sweep…** removes old per-frame data, as *Raw series kept per game* does; it needs the agent running.
|
||||
- **Compact** gives freed space back to the disk; it waits until no game is being recorded.
|
||||
- *The ledger was busy* — try again in a moment.
|
||||
|
||||
## Looking at a copy of your data
|
||||
|
||||
`FrameLedger.exe --data-dir <folder>` opens a **copy** of a data folder to look at — one sent with a bug report, for
|
||||
example. The badge reads **Viewer — no Agent**: nothing is recorded and nothing on this PC is changed. It refuses your own
|
||||
data folder.
|
||||
|
||||
## Report a problem
|
||||
|
||||
- **Help ▸ Report a bug…** (or Logs ▸ Export bug bundle) saves a zip on your PC with FrameLedger's logs, a description of
|
||||
your PC and your settings — and, if you tick them, FrameLedger's last crash dump and the last session without its
|
||||
frames, notes or tags. Your Windows user name is removed from the paths in the logs; the crash dump is not cleaned.
|
||||
You see every file, then the issue form opens on GitHub, and you add the zip yourself: FrameLedger sends nothing.
|
||||
- The logs are in `%LOCALAPPDATA%\FrameLedger\logs` (Logs ▸ Open logs folder).
|
||||
- If FrameLedger missed a game's anti-cheat, use the **Safety gap** form instead
|
||||
([Anti-cheat and safety](04-anti-cheat-and-safety.md#if-frameledger-missed-a-games-anti-cheat)).
|
||||
@@ -0,0 +1,60 @@
|
||||
# Words FrameLedger uses
|
||||
|
||||
What the words on FrameLedger's screens mean, in alphabetical order. How each figure is computed is in the developers'
|
||||
[metrics document](../docs/03_METRICS.md).
|
||||
|
||||
- **0.1% low, 1% low** — the frame rate of the game's slowest 0.1% and 1% of frames. The further they fall below the
|
||||
average, the less smooth the game felt. They need 10,000 and 1,000 of the game's own frames.
|
||||
- **Agent** (the capture agent) — the program FrameLedger runs in the background, with your normal rights, that notices
|
||||
a game starting and records it.
|
||||
- **Anti-cheat finding** — what FrameLedger's anti-cheat check found for a game: a component loaded into it, a file or
|
||||
folder of it, or the game itself on a list. A game with a finding is not hooked ([Anti-cheat and
|
||||
safety](04-anti-cheat-and-safety.md)).
|
||||
- **Bug bundle** — the zip **Help ▸ Report a bug…** writes on your PC. Nothing is sent by FrameLedger.
|
||||
- **Compare** — two to five sessions side by side, from any of your games.
|
||||
- **Disable all hooking** — the switch that stops every game from being hooked at once, whatever each game's own switch
|
||||
says. Sessions are still recorded.
|
||||
- **Displayed FPS** — the frames you saw, generated frames included.
|
||||
- **FG factor** — Displayed FPS divided by Native FPS, shown as `×1.9 FG`.
|
||||
- **FPS** — frames per second over the time measured.
|
||||
- **Frame generation** — the technology (DLSS Frame Generation, FSR Frame Generation) that inserts frames the game did
|
||||
not render itself.
|
||||
- **Frame time** — how long one frame took, in milliseconds.
|
||||
- **Frame to frame** — how much one frame's time differs from the next. Lower is smoother.
|
||||
- **Frames per watt** — the game's own frames per second for each watt the graphics card drew.
|
||||
- **GPU held back** — how much of the time the card's power limit or its temperature slowed it down. NVIDIA cards only.
|
||||
- **Hooking** — loading FrameLedger's small component into a game to measure it. Off for every game until you switch
|
||||
it on for that game.
|
||||
- **Ledger** — the one database file that holds your library and sessions, `%LOCALAPPDATA%\FrameLedger\ledger.db`.
|
||||
- **N/A** — not measured. Never 0, and never an estimate.
|
||||
- **Native FPS** — the frames the game rendered itself.
|
||||
- **Overlay build** — the version of the component that hooking loads into a game. It draws nothing on your screen.
|
||||
- **Override** — your own Yes, No or N/A for a ray-tracing chip. The measured value is kept, and yours is marked as
|
||||
yours.
|
||||
- **Presented FPS** — every frame the game handed to Windows, shown when frame generation could not be measured, with a
|
||||
note saying whether generated frames could be among them.
|
||||
- **RAM (this game)** — the game's own memory, what Task Manager's Details tab shows as its private working set.
|
||||
- **Ray tracing, Path tracing, Ray reconstruction** — read *Yes*, *No* or *N/A*. Ray tracing is measured on DirectX 12
|
||||
games; path tracing is never stated as a fact.
|
||||
- **Render scale** — the share of the screen's resolution the game drew at before upscaling. 100% means no upscaling.
|
||||
- **Session** — one run of a game, from its start to its end. A session shorter than 30 seconds is not kept.
|
||||
- **Steady state** — when frame generation changed during a session (menus, loading screens, a settings change), the
|
||||
figures are for the state that lasted longest, with the share of the session it covers: `×1.9 FG · 75%`.
|
||||
- **Stutter** — frames that took more than twice as long as the frames around them, counted, with the share of time
|
||||
they took.
|
||||
- **T1** — a measured session. **T2** — a session that was only recorded: how long you played, your PC's sensors and
|
||||
the game's memory, with every frame figure N/A.
|
||||
- **Tags and notes** — what you write on a session's summary.
|
||||
- **Telemetry source** — which sensor readers work on this PC: `l1` is Windows itself, `lhm` is LibreHardwareMonitor,
|
||||
`nvapi` is NVIDIA's own.
|
||||
- **Time below 60 FPS** — how much of the session ran slower than 60 frames per second (and *below 30*, and *below your
|
||||
display's refresh rate*), not counting the tiny wobble of a game held at its frame limit.
|
||||
- **Trend** — one point per measured session over time, on a game's page.
|
||||
- **Upscaler** — the technology that draws the game at a lower resolution and scales it up (DLSS, FSR).
|
||||
- **User-mode exception** — the one way to hook a game where anti-cheat was found: only an anti-cheat that runs entirely
|
||||
inside the game, one game at a time, after a warning. Its first two sessions are a trial.
|
||||
- **Viewer** — FrameLedger opened over a copy of a data folder: no agent, nothing recorded, nothing changed.
|
||||
- **VRAM (this game)** — the game's own video memory, what Task Manager shows as its *Dedicated GPU memory*.
|
||||
- **VSync** — how many frames asked to wait for the display; *tearing allowed*, how many did not mind tearing. It is
|
||||
what the game asked: your graphics driver can override it.
|
||||
- **Vulkan layer** — the component that measures Vulkan games, used only when FrameLedger starts a game itself.
|
||||
+7
-3
@@ -4,7 +4,7 @@ FrameLedger records how your games run on this PC — frame rate, frame times, t
|
||||
with, temperatures, and how much memory the game uses — and keeps every session so you can compare them later.
|
||||
Everything stays on your PC.
|
||||
|
||||
Each page below takes a minute or two to read.
|
||||
Each page below takes a minute or two to read. The first six are the guide; the next four are there to look things up.
|
||||
|
||||
1. [Install and first start](01-install.md)
|
||||
2. [Record a game](02-record-a-game.md)
|
||||
@@ -12,7 +12,11 @@ Each page below takes a minute or two to read.
|
||||
4. [Anti-cheat and safety](04-anti-cheat-and-safety.md) — read this before you switch hooking on for any game
|
||||
5. [Your data](05-your-data.md)
|
||||
6. [Questions and answers](06-faq.md)
|
||||
7. [The terms, in plain words](terms-in-plain-words.md)
|
||||
7. [The screens](07-screens.md) — what each page, menu and button does
|
||||
8. [Every setting](08-settings.md)
|
||||
9. [When something goes wrong](09-troubleshooting.md)
|
||||
10. [Words FrameLedger uses](10-glossary.md)
|
||||
11. [The terms, in plain words](terms-in-plain-words.md)
|
||||
|
||||
What FrameLedger cannot do is listed on its own page: [Limitations](../LIMITATIONS.md) (in the app: Help ▸
|
||||
Limitations).
|
||||
@@ -21,4 +25,4 @@ Limitations).
|
||||
report on your PC that you can look at before you decide to share it.
|
||||
|
||||
This guide is part of FrameLedger and describes the version it came with. It is also in the project's repository on
|
||||
GitHub, in the `guide` folder.
|
||||
GitHub, in the `guide` folder, and on the project's wiki, which shows the newest release.
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
HTML comments are not part of the block.
|
||||
-->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.13`** (2026-10-04), an unsigned installer built from that tag with its
|
||||
> **pre-release is `0.1.0-beta.18`** (2026-10-07), an unsigned installer built from that tag with its
|
||||
> checksums published beside it. The source holds the desktop app
|
||||
> (library, store import, charts, settings) and the background Agent, which records a session when a
|
||||
> game in the library runs (unless you switched its recording off), injects only into games you enabled
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
|
||||
|
||||
<!-- accuracy-block:begin -->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.13`** (2026-10-04), an unsigned installer built from that tag with its
|
||||
> **pre-release is `0.1.0-beta.18`** (2026-10-07), 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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<sp:WpfPlot x:Name="Histogram" Grid.Column="0" />
|
||||
<sp:WpfPlot x:Name="Percentiles" Grid.Column="2" />
|
||||
<ui:TextBlock x:Name="Note" Grid.Row="1" Grid.ColumnSpan="3" Margin="0,4,0,0" Appearance="Tertiary" TextWrapping="Wrap" Visibility="Collapsed" />
|
||||
<ui:TextBlock x:Name="Note" Grid.Row="1" Grid.ColumnSpan="3" Margin="0,4,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Visibility="Collapsed" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -15,7 +15,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ui:TextBlock x:Name="Note" Grid.Row="0" Margin="0,0,0,4" Appearance="Tertiary" TextWrapping="Wrap" Visibility="Collapsed" />
|
||||
<ui:TextBlock x:Name="Note" Grid.Row="0" Margin="0,0,0,4" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Visibility="Collapsed" />
|
||||
<sp:WpfPlot x:Name="Plot" Grid.Row="1" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -11,7 +11,7 @@
|
||||
where the upscaler's parameters never were. -->
|
||||
<Grid>
|
||||
<sp:WpfPlot x:Name="Plot" />
|
||||
<ui:TextBlock x:Name="NotMeasured" Appearance="Secondary" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
<ui:TextBlock x:Name="NotMeasured" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
Text="{x:Static res:Strings.Chart_RenderScale_NotMeasured}" Visibility="Collapsed" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -33,7 +33,7 @@
|
||||
<Border Padding="12" CornerRadius="6" Background="{DynamicResource SystemFillColorCautionBackgroundBrush}">
|
||||
<ui:TextBlock Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{x:Static vm:FirstRunViewModel.LegalSummary}" TextWrapping="Wrap" />
|
||||
</Border>
|
||||
<ui:TextBlock Margin="0,10,0,0" Appearance="Secondary" Text="{x:Static vm:FirstRunViewModel.LegalBody}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock Margin="0,10,0,0" Style="{StaticResource SecondaryText}" Text="{x:Static vm:FirstRunViewModel.LegalBody}" TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
<ListBox Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
@@ -48,10 +48,10 @@
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Margin="0,0,0,6" Orientation="Horizontal">
|
||||
<!-- beta.12 (D45): the GPL is the user's licence, for information; Accept covers the other three. -->
|
||||
<ui:TextBlock Margin="0,0,12,0" VerticalAlignment="Center" Appearance="Secondary" TextWrapping="Wrap" MaxWidth="460"
|
||||
<ui:TextBlock Margin="0,0,12,0" VerticalAlignment="Center" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" MaxWidth="460"
|
||||
Text="{x:Static res:Strings.FirstRun_Doc_InformationNote}"
|
||||
Visibility="{Binding ViewModel.SelectedDocument.RequiresAcceptance, Converter={StaticResource InverseBoolToVis}}" />
|
||||
<ui:TextBlock VerticalAlignment="Center" Appearance="Secondary" Text="{Binding ViewModel.SelectedDocument.Version}" />
|
||||
<ui:TextBlock VerticalAlignment="Center" Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.SelectedDocument.Version}" />
|
||||
<ui:HyperlinkButton Margin="12,0,0,0"
|
||||
Command="{Binding ViewModel.OpenOnlineCommand}"
|
||||
Content="{x:Static res:Strings.FirstRun_Legal_Online}"
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
<!-- Step 2: Agent setup, the facts as the Agent reports them. -->
|
||||
<StackPanel Grid.Row="1" Margin="0,12,0,0" Visibility="{Binding ViewModel.IsAgentStep, Converter={StaticResource BoolToVis}}">
|
||||
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:FirstRunViewModel.AgentBody}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:FirstRunViewModel.AgentBody}" TextWrapping="Wrap" />
|
||||
<Grid Margin="0,16,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -104,18 +104,18 @@
|
||||
<!-- Step 3: the hooking explainer — the consent dialog's reviewed tier paragraphs, and what "off" means. -->
|
||||
<ScrollViewer Grid.Row="1" Margin="0,12,0,0" Visibility="{Binding ViewModel.IsExplainerStep, Converter={StaticResource BoolToVis}}">
|
||||
<StackPanel>
|
||||
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:FirstRunViewModel.ExplainerIntro}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:FirstRunViewModel.ExplainerIntro}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock Margin="0,16,0,4" FontTypography="BodyStrong" Text="{x:Static res:Strings.Tier_Hooked}" />
|
||||
<ui:TextBlock Text="{x:Static vm:FirstRunViewModel.ExplainerHooked}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock Margin="0,16,0,4" FontTypography="BodyStrong" Text="{x:Static res:Strings.Tier_NotHooked}" />
|
||||
<ui:TextBlock Text="{x:Static vm:FirstRunViewModel.ExplainerNotHooked}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock Margin="0,16,0,0" Appearance="Secondary" Text="{x:Static vm:FirstRunViewModel.ExplainerOff}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock Margin="0,16,0,0" Style="{StaticResource SecondaryText}" Text="{x:Static vm:FirstRunViewModel.ExplainerOff}" TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<!-- Step 4: the import placeholder. -->
|
||||
<StackPanel Grid.Row="1" Margin="0,12,0,0" Visibility="{Binding ViewModel.IsImportStep, Converter={StaticResource BoolToVis}}">
|
||||
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:FirstRunViewModel.ImportBody}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:FirstRunViewModel.ImportBody}" TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Buttons: Decline/Accept on the gate; Back/Next on the middle steps; Finish at the end; Close in read-only mode. -->
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
AutomationProperties.Name="{x:Static vm:AgentAdminDialogViewModel.AcceptText}"
|
||||
Content="{x:Static vm:AgentAdminDialogViewModel.AcceptText}"
|
||||
IsChecked="{Binding Accepted, Mode=TwoWay}" />
|
||||
<ui:TextBlock Margin="0,12,0,0" HorizontalAlignment="Right" Appearance="Tertiary" Text="{x:Static vm:AgentAdminDialogViewModel.Version}" />
|
||||
<ui:TextBlock Margin="0,12,0,0" HorizontalAlignment="Right" Style="{StaticResource TertiaryText}" Text="{x:Static vm:AgentAdminDialogViewModel.Version}" />
|
||||
</StackPanel>
|
||||
</ui:PassiveScrollViewer>
|
||||
</UserControl>
|
||||
@@ -20,11 +20,11 @@
|
||||
<ui:TextBlock TextWrapping="Wrap" Text="{x:Static vm:BugBundleOptionsViewModel.Intro}" />
|
||||
<StackPanel Visibility="{Binding HasCrashDump, Converter={StaticResource BoolToVis}}">
|
||||
<CheckBox Margin="0,12,0,0" IsChecked="{Binding IncludeCrashDump}" Content="{Binding DumpLabel}" />
|
||||
<ui:TextBlock Margin="28,4,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:BugBundleOptionsViewModel.DumpDetail}" />
|
||||
<ui:TextBlock Margin="28,4,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:BugBundleOptionsViewModel.DumpDetail}" />
|
||||
</StackPanel>
|
||||
<StackPanel Visibility="{Binding HasLastSession, Converter={StaticResource BoolToVis}}">
|
||||
<CheckBox Margin="0,12,0,0" IsChecked="{Binding IncludeLastSession}" Content="{Binding SessionLabel}" />
|
||||
<ui:TextBlock Margin="28,4,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:BugBundleOptionsViewModel.SessionDetail}" />
|
||||
<ui:TextBlock Margin="28,4,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:BugBundleOptionsViewModel.SessionDetail}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -30,6 +30,6 @@
|
||||
</ui:PassiveScrollViewer>
|
||||
</Border>
|
||||
<ui:HyperlinkButton Padding="0" Content="{x:Static vm:BugReportPreviewViewModel.ShowZipText}" Command="{Binding ShowZipCommand}" />
|
||||
<ui:TextBlock Margin="0,10,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:BugReportPreviewViewModel.DragInstruction}" />
|
||||
<ui:TextBlock Margin="0,10,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:BugReportPreviewViewModel.DragInstruction}" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -32,7 +32,7 @@
|
||||
<ui:TextBlock Margin="0,14,0,0" FontWeight="SemiBold" Text="{x:Static vm:ConsentDialogViewModel.AntiCheat}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock Margin="0,8,0,0" Text="{x:Static vm:ConsentDialogViewModel.Terms}" TextWrapping="Wrap" />
|
||||
|
||||
<ui:TextBlock Margin="0,18,0,6" Appearance="Secondary" Text="{Binding TypeToConfirm}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock Margin="0,18,0,6" Style="{StaticResource SecondaryText}" Text="{Binding TypeToConfirm}" TextWrapping="Wrap" />
|
||||
<ui:TextBox x:Name="Acknowledgement"
|
||||
AutomationProperties.Name="{Binding TypeToConfirm}"
|
||||
Text="{Binding Typed, UpdateSourceTrigger=PropertyChanged}"
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
session runs; the sweep is the Agent's and asks first. Buttons are disabled while an action runs.
|
||||
-->
|
||||
<StackPanel>
|
||||
<ui:TextBlock MaxWidth="700" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Maintenance_Intro}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock MaxWidth="700" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Maintenance_Intro}" TextWrapping="Wrap" />
|
||||
|
||||
<ui:CardControl Margin="0,12,0,0" Icon="{ui:SymbolIcon ShieldCheckmark24}">
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Maintenance_Integrity_Label}" />
|
||||
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Maintenance_Integrity_Body}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Maintenance_Integrity_Body}" TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</ui:CardControl.Header>
|
||||
<ui:Button MinWidth="120" Command="{Binding CheckIntegrityCommand}" Content="{x:Static res:Strings.Maintenance_Integrity_Button}" />
|
||||
@@ -34,7 +34,7 @@
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Maintenance_Backup_Label}" />
|
||||
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Maintenance_Backup_Body}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Maintenance_Backup_Body}" TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</ui:CardControl.Header>
|
||||
<ui:Button MinWidth="120" Command="{Binding BackUpCommand}" Content="{x:Static res:Strings.Maintenance_Backup_Button}" />
|
||||
@@ -44,7 +44,7 @@
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Maintenance_Sweep_Label}" />
|
||||
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Maintenance_Sweep_Body}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Maintenance_Sweep_Body}" TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</ui:CardControl.Header>
|
||||
<ui:Button MinWidth="120" Command="{Binding SweepCommand}" Content="{x:Static res:Strings.Maintenance_Sweep_Button}" />
|
||||
@@ -54,7 +54,7 @@
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Maintenance_Compact_Label}" />
|
||||
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Appearance="Secondary" Text="{x:Static res:Strings.Maintenance_Compact_Body}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock MaxWidth="440" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" Text="{x:Static res:Strings.Maintenance_Compact_Body}" TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</ui:CardControl.Header>
|
||||
<ui:Button MinWidth="120" Command="{Binding CompactCommand}" Content="{x:Static res:Strings.Maintenance_Compact_Button}" />
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
Visibility="{Binding NameDetected, Converter={StaticResource BoolToVis}}">
|
||||
<TextBlock Style="{StaticResource TagPillText}" Text="{x:Static vm:EditGameViewModel.DetectedBadge}" />
|
||||
</Border>
|
||||
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:EditGameViewModel.NameLabel}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:EditGameViewModel.NameLabel}" />
|
||||
</DockPanel>
|
||||
<ui:TextBox Margin="0,4,0,12" AutomationProperties.Name="{x:Static vm:EditGameViewModel.NameLabel}" Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
Visibility="{Binding PublisherDetected, Converter={StaticResource BoolToVis}}">
|
||||
<TextBlock Style="{StaticResource TagPillText}" Text="{x:Static vm:EditGameViewModel.DetectedBadge}" />
|
||||
</Border>
|
||||
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:EditGameViewModel.PublisherLabel}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:EditGameViewModel.PublisherLabel}" />
|
||||
</DockPanel>
|
||||
<ui:TextBox Margin="0,4,0,12" AutomationProperties.Name="{x:Static vm:EditGameViewModel.PublisherLabel}" Text="{Binding Publisher, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
Visibility="{Binding VersionDetected, Converter={StaticResource BoolToVis}}">
|
||||
<TextBlock Style="{StaticResource TagPillText}" Text="{x:Static vm:EditGameViewModel.DetectedBadge}" />
|
||||
</Border>
|
||||
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:EditGameViewModel.VersionLabel}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:EditGameViewModel.VersionLabel}" />
|
||||
</DockPanel>
|
||||
<ui:TextBox Margin="0,4,0,12" AutomationProperties.Name="{x:Static vm:EditGameViewModel.VersionLabel}" Text="{Binding Version, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<ui:TextBlock Appearance="Secondary" Text="{x:Static vm:EditGameViewModel.NotesLabel}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:EditGameViewModel.NotesLabel}" />
|
||||
<ui:TextBox Margin="0,4,0,0" MinHeight="72" AutomationProperties.Name="{x:Static vm:EditGameViewModel.NotesLabel}" AcceptsReturn="True" TextWrapping="Wrap" Text="{Binding Notes, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -68,7 +68,7 @@
|
||||
<ui:HyperlinkButton Padding="4,0" Content="{x:Static res:Strings.Import_SelectAll}" Command="{Binding SelectAllCommand}" xmlns:res="clr-namespace:FrameLedger.App" />
|
||||
<ui:HyperlinkButton Padding="4,0" Content="{x:Static res:Strings.Import_SelectNone}" Command="{Binding SelectNoneCommand}" xmlns:res="clr-namespace:FrameLedger.App" />
|
||||
</StackPanel>
|
||||
<ui:TextBlock Appearance="Secondary" VerticalAlignment="Center" Text="{Binding SelectedText}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" VerticalAlignment="Center" Text="{Binding SelectedText}" />
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -13,7 +13,7 @@
|
||||
MinWidth="360">
|
||||
<!-- FR-8.3: the override beside the measurement, never over it (06_DATA_MODEL: session_annotations.*_override). -->
|
||||
<StackPanel>
|
||||
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:TriStateOverrideViewModel.Body}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:TriStateOverrideViewModel.Body}" />
|
||||
<RadioButton Margin="0,12,0,0" GroupName="Override" Content="{x:Static vm:TriStateOverrideViewModel.KeepText}" IsChecked="{Binding UseMeasured}" />
|
||||
<RadioButton Margin="0,4,0,0" GroupName="Override" Content="{x:Static vm:TriStateOverrideViewModel.YesText}" IsChecked="{Binding Yes}" />
|
||||
<RadioButton Margin="0,4,0,0" GroupName="Override" Content="{x:Static vm:TriStateOverrideViewModel.NoText}" IsChecked="{Binding No}" />
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -9,12 +9,13 @@
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
Title="{x:Static res:Strings.Compare_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<!-- 08_UI §Compare: the picker (2–5, cross-game), the overlaid percentile curves, the stat table; FR-6.2's guard is the view model's. -->
|
||||
<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 +25,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 +84,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 +93,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>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
xmlns:controls="clr-namespace:FrameLedger.App.Controls"
|
||||
Title="{x:Static res:Strings.Dashboard_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Style="{StaticResource PageRoot}">
|
||||
@@ -24,16 +25,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 +46,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 +58,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 +111,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 +133,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>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
xmlns:controls="clr-namespace:FrameLedger.App.Controls"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
Title="{x:Static res:Strings.Games_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<!--
|
||||
08_UI §Games › Game detail. The two rows — Supports (files on disk) and Last session measured (the
|
||||
@@ -20,7 +21,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 +33,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 +73,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 +95,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 +125,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 +136,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 +150,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 +161,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 +174,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 +188,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 +220,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 +338,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 +353,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 +373,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 +386,16 @@
|
||||
<TabItem Header="{x:Static vm:GameDetailViewModel.TabSensors}">
|
||||
<StackPanel Margin="0,12,0,0">
|
||||
<!-- A session that was not hooked has its sensors (beta.8): the tab's own note and visibility, not the frames'. -->
|
||||
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.SensorsNote}"
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.SensorsNote}"
|
||||
Visibility="{Binding ViewModel.SensorsNote, Converter={StaticResource NullToCollapsed}}" />
|
||||
<charts:SensorsChart x:Name="Sensors" Visibility="{Binding ViewModel.SelectedHasSensors, Converter={StaticResource BoolToVis}}" />
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static vm:GameDetailViewModel.TabLatency}" Visibility="{Binding ViewModel.AnyLatency, Converter={StaticResource BoolToVis}}">
|
||||
<StackPanel Margin="0,12,0,0">
|
||||
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.SelectedNote}"
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.SelectedNote}"
|
||||
Visibility="{Binding ViewModel.SelectedNote, Converter={StaticResource NullToCollapsed}}" />
|
||||
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.LatencyEmptyText}"
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:GameDetailViewModel.LatencyEmptyText}"
|
||||
Visibility="{Binding ViewModel.HasLatency, Converter={StaticResource InverseBoolToVis}}" />
|
||||
<ui:TextBlock FontTypography="BodyStrong" Text="{Binding ViewModel.LatencyText}"
|
||||
Visibility="{Binding ViewModel.HasLatency, Converter={StaticResource BoolToVis}}" />
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
Title="{x:Static res:Strings.Games_Header}"
|
||||
AllowDrop="True"
|
||||
Drop="OnDrop"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<!--
|
||||
08_UI §Games: search, sort, FR-1.1 add by pick or by dropping an .exe here. Since beta.11 (owner requests 2026-10-03):
|
||||
@@ -38,7 +39,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 +62,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 +104,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>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
Title="{x:Static res:Strings.Logs_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<Grid Margin="24,16,24,16">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -25,14 +26,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 +73,7 @@
|
||||
|
||||
<ui:TextBlock Grid.Row="3"
|
||||
Margin="0,6,0,0"
|
||||
Appearance="Secondary"
|
||||
Style="{StaticResource SecondaryText}"
|
||||
Text="{Binding ViewModel.Status}" />
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
Title="{x:Static res:Strings.Settings_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Style="{StaticResource PageRoot}">
|
||||
@@ -24,12 +25,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 +62,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,22 +80,22 @@
|
||||
</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}"
|
||||
IsChecked="{Binding ViewModel.UserModeExceptions, Mode=TwoWay}" />
|
||||
IsChecked="{Binding ViewModel.UserModeExceptions, Mode=TwoWay}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
|
||||
</Grid>
|
||||
</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 +105,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 +128,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 +143,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,24 +158,26 @@
|
||||
</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}"
|
||||
Content="{x:Static res:Strings.Settings_SafetyDocs}"
|
||||
Icon="{ui:SymbolIcon Open24}" />
|
||||
|
||||
<!-- Recording policy: the three numbers and background capture (D16: the Agent reads them at session start). -->
|
||||
<!-- Recording policy: the three numbers and background capture (D16: the Agent reads them at session start) — off in a
|
||||
viewer, which has no Agent (beta.18; every setting the Agent reads is, ViewerModeTests). -->
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Policy_Header}" />
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Timer24}">
|
||||
<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"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Settings_MinSession_Label}"
|
||||
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
|
||||
Maximum="{x:Static vm:SettingsViewModel.MinSessionMaximum}"
|
||||
Minimum="{x:Static vm:SettingsViewModel.MinSessionMinimum}"
|
||||
SpinButtonPlacementMode="Inline"
|
||||
@@ -183,11 +187,12 @@
|
||||
<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"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Settings_Interval_Label}"
|
||||
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
|
||||
Maximum="{x:Static vm:SettingsViewModel.IntervalMaximum}"
|
||||
Minimum="{x:Static vm:SettingsViewModel.IntervalMinimum}"
|
||||
SpinButtonPlacementMode="Inline"
|
||||
@@ -197,11 +202,12 @@
|
||||
<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"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Settings_Retention_Label}"
|
||||
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
|
||||
Maximum="{x:Static vm:SettingsViewModel.RetentionMaximum}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Inline"
|
||||
@@ -217,10 +223,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 +236,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 +274,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 +292,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 +311,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 +322,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 +340,14 @@
|
||||
<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}"
|
||||
IsEnabled="{Binding ViewModel.ActsOnThisPc}"
|
||||
ItemsSource="{Binding ViewModel.UpdateChannels}"
|
||||
SelectedValue="{Binding ViewModel.UpdateChannel, Mode=TwoWay}"
|
||||
SelectedValuePath="Value" />
|
||||
</ui:CardControl>
|
||||
@@ -349,10 +356,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 +367,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 +384,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>
|
||||
|
||||
@@ -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"),
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ public sealed record AntiCheatExceptionResult(AntiCheatExceptionOutcome Outcome,
|
||||
RefusalText() ?? Detail ?? Strings.Common_NotAvailable),
|
||||
AntiCheatExceptionOutcome.VersionMismatch => Shared.Strings.Safety_Exception_VersionMismatch,
|
||||
AntiCheatExceptionOutcome.OptionOff => Shared.Strings.Safety_Exception_OptionOff,
|
||||
AntiCheatExceptionOutcome.AgentUnavailable => Shared.Strings.Safety_Consent_AgentUnavailable,
|
||||
// A grant and a withdrawal alike (beta.18): "Nothing was enabled." was the hooking consent's words, untrue for a withdrawal.
|
||||
AntiCheatExceptionOutcome.AgentUnavailable => Strings.Agent_NotConnected_NothingChanged,
|
||||
AntiCheatExceptionOutcome.Failed => Detail ?? Strings.Common_NotAvailable,
|
||||
_ => null,
|
||||
};
|
||||
|
||||
@@ -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 <folder></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,
|
||||
}
|
||||
@@ -23,6 +23,7 @@ public static class EmbeddedDocuments
|
||||
/// <summary>
|
||||
/// The user guide's pages in reading order (beta.12, D44; <c>guide/</c> in the repository). Each page's title is its
|
||||
/// first heading; <see cref="LimitationsDocument"/> closes the list, so the guide's links to it open in the window.
|
||||
/// beta.17 (D54): the four reference pages after the FAQ make the guide the wiki's End-user part too.
|
||||
/// </summary>
|
||||
public static IReadOnlyList<string> GuidePages { get; } =
|
||||
[
|
||||
@@ -33,6 +34,10 @@ public static class EmbeddedDocuments
|
||||
"guide/04-anti-cheat-and-safety.md",
|
||||
"guide/05-your-data.md",
|
||||
"guide/06-faq.md",
|
||||
"guide/07-screens.md",
|
||||
"guide/08-settings.md",
|
||||
"guide/09-troubleshooting.md",
|
||||
"guide/10-glossary.md",
|
||||
"guide/terms-in-plain-words.md",
|
||||
];
|
||||
|
||||
|
||||
@@ -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>();
|
||||
}
|
||||
}
|
||||
@@ -55,13 +55,16 @@ public sealed class SafetyNotices : IDisposable
|
||||
return new SafetyNotice(SafetyNoticeKind.Unhooked, Strings.Notice_Unhooked_Title, TurnedOff(UnhookText(unhooked), unhooked.HookingTurnedOff), now);
|
||||
// The Agent's pre-scan of the library turned hooking off for a game the user had turned it on for (2026-09-25):
|
||||
// not a session event, so none of a refusal's "this run is still recorded" — no run is going on.
|
||||
// Its reason is the guard's own, and it is sent only for a finding about the game, which names its family.
|
||||
case IpcMessageType.HookingTurnedOff when IpcCodec.Payload<HookingTurnedOffEvent>(envelope) is { } off:
|
||||
return new SafetyNotice(SafetyNoticeKind.HookingOff,
|
||||
string.Format(CultureInfo.CurrentCulture, Strings.Notice_HookingOff_Title_Format, off.GameName ?? Strings.Common_NotAvailable),
|
||||
TurnedOff(RefusalText(off.Reason, off.Reason, off.Family, off.Signal), turnedOff: true), now);
|
||||
TurnedOff(GuardText(off.Reason, off.Family, off.Signal) ?? Shared.Strings.Safety_Refused_Unnamed, turnedOff: true), now);
|
||||
// The session's end in words (beta.18): it printed the enum's name — "The hook stopped (WriterSelfDisabled)" —
|
||||
// and said the session continued without measuring, while a stop ends it (07_IPC: measurement STOPPED).
|
||||
case IpcMessageType.CaptureDegraded when IpcCodec.Payload<CaptureDegradedEvent>(envelope) is { } degraded:
|
||||
return new SafetyNotice(SafetyNoticeKind.Degraded, Strings.Notice_Degraded_Title,
|
||||
string.Format(CultureInfo.CurrentCulture, Strings.Notice_Degraded_Body_Format, degraded.Reason), now);
|
||||
Formats.EndReasonText(degraded.Reason) ?? string.Format(CultureInfo.CurrentCulture, Strings.Notice_Degraded_Unknown_Format, degraded.Reason), now);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -73,35 +76,45 @@ public sealed class SafetyNotices : IDisposable
|
||||
/// <summary>
|
||||
/// A driver or service that started on the PC mid-session is said as that (beta.13, §S23-3) — not "detected while the
|
||||
/// game was running … until you enable it again", which was untrue twice: such a finding turns no hooking off, and a
|
||||
/// finding about the game turns it off for good (the turned-off sentence follows).
|
||||
/// finding about the game turns it off for good (the turned-off sentence follows). A re-scan that could not look while
|
||||
/// the game still ran is said as that too (beta.18): it named its signal as a finding, "Access is denied was detected".
|
||||
/// </summary>
|
||||
private static string UnhookText(SafetyUnhookEvent unhooked) =>
|
||||
Formats.IsMachineWide(unhooked.GuardReason) && unhooked.Family is { } family
|
||||
? string.Format(CultureInfo.CurrentCulture, Shared.Strings.Safety_Unhooked_MachineWide_Format, family, unhooked.Signal ?? Strings.Common_NotAvailable)
|
||||
: string.Format(CultureInfo.CurrentCulture, Shared.Strings.Safety_Unhooked_Format, unhooked.Family ?? unhooked.Signal ?? Strings.Common_NotAvailable);
|
||||
|
||||
/// <summary><paramref name="reason"/> is the session's end reason; <paramref name="guardReason"/> the guard's own, when it named a family.</summary>
|
||||
private static string RefusalText(string reason, string? guardReason, string? family, string? signal)
|
||||
private static string UnhookText(SafetyUnhookEvent unhooked) => unhooked switch
|
||||
{
|
||||
if (string.Equals(reason, "PreScanCouldNotVerify", StringComparison.Ordinal))
|
||||
{
|
||||
return Shared.Strings.Safety_Refused_CouldNotVerify;
|
||||
}
|
||||
{ Family: { } family } when Formats.IsMachineWide(unhooked.GuardReason) =>
|
||||
string.Format(CultureInfo.CurrentCulture, Shared.Strings.Safety_Unhooked_MachineWide_Format, family, unhooked.Signal ?? Strings.Common_NotAvailable),
|
||||
{ Family: null, GuardReason: { Length: > 0 } guardReason } =>
|
||||
string.Format(CultureInfo.CurrentCulture, Shared.Strings.Safety_Unhooked_Unnamed_Format, Formats.GuardReasonText(guardReason)),
|
||||
_ => string.Format(CultureInfo.CurrentCulture, Shared.Strings.Safety_Unhooked_Format, unhooked.Family ?? unhooked.Signal ?? Strings.Common_NotAvailable),
|
||||
};
|
||||
|
||||
if (string.Equals(reason, "TargetUnreadable", StringComparison.Ordinal))
|
||||
{
|
||||
return Shared.Strings.Safety_Refused_TargetUnreadable;
|
||||
}
|
||||
/// <summary>
|
||||
/// A refusal in words. <paramref name="reason"/> is the session's end; <paramref name="guardReason"/> the guard's own,
|
||||
/// sent for every refusal it gave since beta.18 (beside a family only, before).
|
||||
/// </summary>
|
||||
private static string RefusalText(string reason, string? guardReason, string? family, string? signal) => reason switch
|
||||
{
|
||||
"PreScanCouldNotVerify" => Shared.Strings.Safety_Refused_CouldNotVerify,
|
||||
"TargetUnreadable" => Shared.Strings.Safety_Refused_TargetUnreadable,
|
||||
// What the guard found, or could not do; from an agent that sent no reason beside no family, the end's own words.
|
||||
"RefusedByGuard" => GuardText(guardReason, family, signal) ?? Strings.End_RefusedByGuard,
|
||||
// The gate's own refusals (beta.18) — Disable all hooking, a game blocked before — are the user's switch or the row's,
|
||||
// never a finding. The gate labels them in the family's place, and the kill switch's notice read "kill switch was
|
||||
// detected in this game (the global 'disable all hooking' switch is on (FR-2.4); …)".
|
||||
// A name this build has no words for (a newer agent's) is named as it is, never as something detected.
|
||||
_ => Formats.EndReasonText(reason) ?? GuardText(guardReason, family, signal)
|
||||
?? (string.IsNullOrEmpty(reason) ? Shared.Strings.Safety_Refused_Unnamed : Formats.GuardSentence(reason)),
|
||||
};
|
||||
|
||||
// A refusal no anti-cheat family names (beta.8) — the guard could not look, the game is 32-bit — is said as what it
|
||||
// is. It used to name its SIGNAL as the family, and the notice read "Access is denied was detected in this game".
|
||||
if (family is null)
|
||||
{
|
||||
return string.IsNullOrEmpty(reason) ? Shared.Strings.Safety_Refused_Unnamed : Formats.GuardSentence(reason);
|
||||
}
|
||||
|
||||
return Formats.NamedRefusal(guardReason, family, signal ?? reason);
|
||||
}
|
||||
/// <summary>
|
||||
/// What the guard said, as a sentence: an anti-cheat it named, found in this game or on this PC; a refusal no family names
|
||||
/// (beta.8) in its own words — never its signal as the family, which read "Access is denied was detected in this game".
|
||||
/// Null when it said nothing.
|
||||
/// </summary>
|
||||
private static string? GuardText(string? guardReason, string? family, string? signal) =>
|
||||
family is { Length: > 0 }
|
||||
? Formats.NamedRefusal(guardReason, family, signal ?? Strings.Common_NotAvailable)
|
||||
: guardReason is { Length: > 0 } ? Formats.GuardSentence(guardReason) : null;
|
||||
|
||||
private void OnEvent(object? sender, AgentEventArgs e)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 <folder></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;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Generated
+36
-3
@@ -62,12 +62,14 @@ public static class Strings
|
||||
nameof(Agent_Banner_Offline_Body),
|
||||
nameof(Agent_Banner_Offline_Title),
|
||||
nameof(Agent_Banner_Retry),
|
||||
nameof(Agent_NotConnected_NothingChanged),
|
||||
nameof(Agent_State_Connected),
|
||||
nameof(Agent_State_Connecting),
|
||||
nameof(Agent_State_Elevating),
|
||||
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),
|
||||
@@ -220,6 +222,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),
|
||||
@@ -639,8 +646,8 @@ public static class Strings
|
||||
nameof(Nav_Games),
|
||||
nameof(Nav_Logs),
|
||||
nameof(Nav_Settings),
|
||||
nameof(Notice_Degraded_Body_Format),
|
||||
nameof(Notice_Degraded_Title),
|
||||
nameof(Notice_Degraded_Unknown_Format),
|
||||
nameof(Notice_Dismiss),
|
||||
nameof(Notice_Error_Title),
|
||||
nameof(Notice_HookingOff_Title_Format),
|
||||
@@ -804,6 +811,7 @@ public static class Strings
|
||||
nameof(Settings_Interval_Body),
|
||||
nameof(Settings_Interval_Label),
|
||||
nameof(Settings_Invalid_Format),
|
||||
nameof(Settings_KillSwitch_Applied_On),
|
||||
nameof(Settings_KillSwitch_Body),
|
||||
nameof(Settings_KillSwitch_Label),
|
||||
nameof(Settings_KillSwitch_Off),
|
||||
@@ -1047,6 +1055,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);
|
||||
@@ -1115,6 +1126,8 @@ public static class Strings
|
||||
|
||||
public static string Agent_Banner_Retry => ResourceManager.GetString(nameof(Agent_Banner_Retry), Culture) ?? nameof(Agent_Banner_Retry);
|
||||
|
||||
public static string Agent_NotConnected_NothingChanged => ResourceManager.GetString(nameof(Agent_NotConnected_NothingChanged), Culture) ?? nameof(Agent_NotConnected_NothingChanged);
|
||||
|
||||
public static string Agent_State_Connected => ResourceManager.GetString(nameof(Agent_State_Connected), Culture) ?? nameof(Agent_State_Connected);
|
||||
|
||||
public static string Agent_State_Connecting => ResourceManager.GetString(nameof(Agent_State_Connecting), Culture) ?? nameof(Agent_State_Connecting);
|
||||
@@ -1127,6 +1140,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);
|
||||
@@ -1431,6 +1446,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);
|
||||
@@ -2269,10 +2294,10 @@ public static class Strings
|
||||
|
||||
public static string Nav_Settings => ResourceManager.GetString(nameof(Nav_Settings), Culture) ?? nameof(Nav_Settings);
|
||||
|
||||
public static string Notice_Degraded_Body_Format => ResourceManager.GetString(nameof(Notice_Degraded_Body_Format), Culture) ?? nameof(Notice_Degraded_Body_Format);
|
||||
|
||||
public static string Notice_Degraded_Title => ResourceManager.GetString(nameof(Notice_Degraded_Title), Culture) ?? nameof(Notice_Degraded_Title);
|
||||
|
||||
public static string Notice_Degraded_Unknown_Format => ResourceManager.GetString(nameof(Notice_Degraded_Unknown_Format), Culture) ?? nameof(Notice_Degraded_Unknown_Format);
|
||||
|
||||
public static string Notice_Dismiss => ResourceManager.GetString(nameof(Notice_Dismiss), Culture) ?? nameof(Notice_Dismiss);
|
||||
|
||||
public static string Notice_Error_Title => ResourceManager.GetString(nameof(Notice_Error_Title), Culture) ?? nameof(Notice_Error_Title);
|
||||
@@ -2599,6 +2624,8 @@ public static class Strings
|
||||
|
||||
public static string Settings_Invalid_Format => ResourceManager.GetString(nameof(Settings_Invalid_Format), Culture) ?? nameof(Settings_Invalid_Format);
|
||||
|
||||
public static string Settings_KillSwitch_Applied_On => ResourceManager.GetString(nameof(Settings_KillSwitch_Applied_On), Culture) ?? nameof(Settings_KillSwitch_Applied_On);
|
||||
|
||||
public static string Settings_KillSwitch_Body => ResourceManager.GetString(nameof(Settings_KillSwitch_Body), Culture) ?? nameof(Settings_KillSwitch_Body);
|
||||
|
||||
public static string Settings_KillSwitch_Label => ResourceManager.GetString(nameof(Settings_KillSwitch_Label), Culture) ?? nameof(Settings_KillSwitch_Label);
|
||||
@@ -3084,4 +3111,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);
|
||||
}
|
||||
@@ -33,6 +33,10 @@
|
||||
<value>キャプチャエージェントがオフライン</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Agent_NotConnected_NothingChanged" xml:space="preserve">
|
||||
<value>キャプチャエージェントに接続されていません。何も変更されていません。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Agent_Banner_Retry" xml:space="preserve">
|
||||
<value>再試行</value>
|
||||
<comment>review</comment>
|
||||
@@ -61,6 +65,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>
|
||||
@@ -1829,8 +1837,8 @@
|
||||
<value>アプリ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Body_Format" xml:space="preserve">
|
||||
<value>フックが停止しました ({0})。セッションは実測なしで続行します。</value>
|
||||
<data name="Notice_Degraded_Unknown_Format" xml:space="preserve">
|
||||
<value>計測を停止しました ({0})。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Title" xml:space="preserve">
|
||||
@@ -1917,6 +1925,10 @@
|
||||
<value>適用しました。キャプチャエージェントは次回のセッション開始時に読み込みます。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_KillSwitch_Applied_On" xml:space="preserve">
|
||||
<value>すべてのフックを無効にしました。実測中のゲームは次回の安全スキャン (30 秒以内) で実測を停止します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_Capture_Header" xml:space="preserve">
|
||||
<value>キャプチャ</value>
|
||||
<comment>review</comment>
|
||||
@@ -2258,7 +2270,7 @@
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Body" xml:space="preserve">
|
||||
<value>FrameLedger は Steam、GOG Galaxy、Epic、itch.io のインストール済みゲームを読み取り、チェックリストから追加できます — 入った後、ゲームページの「ファイル ▸ ライブラリを取り込む…」から。取り込んだゲームはどれも、手動で追加したものと同じくフック無効で始まります。</value>
|
||||
<value>FrameLedger は Steam、GOG Galaxy、Epic、itch.io のインストール済みゲームを読み取り、チェックリストから追加できます — 入った後、「ファイル ▸ ライブラリをインポート…」から。取り込んだゲームはどれも、手動で追加したものと同じくフック無効で始まります。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Header" xml:space="preserve">
|
||||
@@ -4105,4 +4117,36 @@
|
||||
<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 <フォルダー></value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="DataDir_Twice" xml:space="preserve">
|
||||
<value>--data-dir が複数回指定されました。フォルダーを 1 つだけ指定してください: FrameLedger.exe --data-dir <フォルダー></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>
|
||||
@@ -30,6 +30,9 @@
|
||||
<data name="Agent_Banner_Offline_Title" xml:space="preserve">
|
||||
<value>Capture agent offline</value>
|
||||
</data>
|
||||
<data name="Agent_NotConnected_NothingChanged" xml:space="preserve">
|
||||
<value>The capture agent is not connected. Nothing was changed.</value>
|
||||
</data>
|
||||
<data name="Agent_Banner_Retry" xml:space="preserve">
|
||||
<value>Retry</value>
|
||||
</data>
|
||||
@@ -51,6 +54,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>
|
||||
@@ -1377,8 +1383,8 @@
|
||||
<data name="Logs_Source_Ui" xml:space="preserve">
|
||||
<value>App</value>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Body_Format" xml:space="preserve">
|
||||
<value>The hook stopped ({0}); the session continues without measuring.</value>
|
||||
<data name="Notice_Degraded_Unknown_Format" xml:space="preserve">
|
||||
<value>Measuring stopped ({0}).</value>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Title" xml:space="preserve">
|
||||
<value>Measurement stopped</value>
|
||||
@@ -1443,6 +1449,9 @@
|
||||
<data name="Settings_Applied" xml:space="preserve">
|
||||
<value>Applied. The capture agent reads it at the next session start.</value>
|
||||
</data>
|
||||
<data name="Settings_KillSwitch_Applied_On" xml:space="preserve">
|
||||
<value>All hooking is off. A game being measured stops being measured at its next safety scan, within 30 seconds.</value>
|
||||
</data>
|
||||
<data name="Settings_Capture_Header" xml:space="preserve">
|
||||
<value>Capture</value>
|
||||
</data>
|
||||
@@ -1699,7 +1708,7 @@
|
||||
<value>Finish</value>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Body" xml:space="preserve">
|
||||
<value>FrameLedger can read what Steam, GOG Galaxy, Epic and itch.io have installed and add them from a checklist — File ▸ Import library… on the Games page, once you are in. Every imported game starts with hooking off, exactly like one you add by hand.</value>
|
||||
<value>FrameLedger can read what Steam, GOG Galaxy, Epic and itch.io have installed and add them from a checklist — File ▸ Import library…, once you are in. Every imported game starts with hooking off, exactly like one you add by hand.</value>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Header" xml:space="preserve">
|
||||
<value>Your library</value>
|
||||
@@ -3089,4 +3098,28 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<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 <folder></value>
|
||||
</data>
|
||||
<data name="DataDir_Twice" xml:space="preserve">
|
||||
<value>--data-dir was given more than once. Name one folder: FrameLedger.exe --data-dir <folder></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>
|
||||
@@ -25,6 +25,9 @@
|
||||
<data name="Agent_Banner_Offline_Title" xml:space="preserve">
|
||||
<value>Capture agent ngoại tuyến</value>
|
||||
</data>
|
||||
<data name="Agent_NotConnected_NothingChanged" xml:space="preserve">
|
||||
<value>Capture agent chưa kết nối. Không có gì thay đổi.</value>
|
||||
</data>
|
||||
<data name="Agent_Banner_Retry" xml:space="preserve">
|
||||
<value>Thử lại</value>
|
||||
</data>
|
||||
@@ -46,6 +49,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>
|
||||
@@ -1372,8 +1378,8 @@
|
||||
<data name="Logs_Source_Ui" xml:space="preserve">
|
||||
<value>Ứng dụng</value>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Body_Format" xml:space="preserve">
|
||||
<value>Hook đã dừng ({0}); phiên tiếp tục mà không đo.</value>
|
||||
<data name="Notice_Degraded_Unknown_Format" xml:space="preserve">
|
||||
<value>Việc đo đã dừng ({0}).</value>
|
||||
</data>
|
||||
<data name="Notice_Degraded_Title" xml:space="preserve">
|
||||
<value>Đã dừng đo</value>
|
||||
@@ -1438,6 +1444,9 @@
|
||||
<data name="Settings_Applied" xml:space="preserve">
|
||||
<value>Đã áp dụng. Capture agent đọc ở lần bắt đầu phiên kế tiếp.</value>
|
||||
</data>
|
||||
<data name="Settings_KillSwitch_Applied_On" xml:space="preserve">
|
||||
<value>Đã tắt toàn bộ hooking. Game đang được đo sẽ dừng đo ở lần quét an toàn kế tiếp, trong vòng 30 giây.</value>
|
||||
</data>
|
||||
<data name="Settings_Capture_Header" xml:space="preserve">
|
||||
<value>Thu thập</value>
|
||||
</data>
|
||||
@@ -1694,7 +1703,7 @@
|
||||
<value>Hoàn tất</value>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Body" xml:space="preserve">
|
||||
<value>FrameLedger có thể đọc những gì Steam, GOG Galaxy, Epic và itch.io đã cài và thêm chúng từ một danh sách chọn — File ▸ Nhập thư viện… ở trang Game, khi bạn đã vào trong. Mọi game nhập vào đều bắt đầu với hooking tắt, đúng như game bạn thêm thủ công.</value>
|
||||
<value>FrameLedger có thể đọc những gì Steam, GOG Galaxy, Epic và itch.io đã cài và thêm chúng từ một danh sách chọn — Tệp ▸ Nhập thư viện…, khi bạn đã vào trong. Mọi game nhập vào đều bắt đầu với hooking tắt, đúng như game bạn thêm thủ công.</value>
|
||||
</data>
|
||||
<data name="FirstRun_Import_Header" xml:space="preserve">
|
||||
<value>Thư viện của bạn</value>
|
||||
@@ -3084,4 +3093,28 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
|
||||
<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 <thư mục></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 <thư mục></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>
|
||||
@@ -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");
|
||||
}
|
||||
@@ -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;
|
||||
@@ -217,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;
|
||||
@@ -241,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;
|
||||
@@ -745,7 +755,7 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
try
|
||||
{
|
||||
HookingConsentResult result = await _consent.DisableAsync(Game.Id).ConfigureAwait(true);
|
||||
Notice(result);
|
||||
Notice(result, turningOff: true);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -930,14 +940,17 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
OnPropertyChanged(nameof(NoticeVisible));
|
||||
}
|
||||
|
||||
/// <summary>A refusal, a mismatch or a failure is a persistent notice on the page; a success clears it.</summary>
|
||||
private void Notice(HookingConsentResult result)
|
||||
/// <summary>
|
||||
/// A refusal, a mismatch or a failure is a persistent notice on the page; a success clears it. With no Agent, turning
|
||||
/// hooking off changed nothing — not "Nothing was enabled.", the enable path's words, which it said until beta.18.
|
||||
/// </summary>
|
||||
private void Notice(HookingConsentResult result, bool turningOff = false)
|
||||
{
|
||||
(NoticeText, NoticeSeverity) = result.Outcome switch
|
||||
{
|
||||
HookingConsentOutcome.Refused => (result.RefusalText(), InfoBarSeverity.Error),
|
||||
HookingConsentOutcome.VersionMismatch => (Shared.Strings.Safety_Consent_VersionMismatch, InfoBarSeverity.Warning),
|
||||
HookingConsentOutcome.AgentUnavailable => (Shared.Strings.Safety_Consent_AgentUnavailable, InfoBarSeverity.Warning),
|
||||
HookingConsentOutcome.AgentUnavailable => (turningOff ? Strings.Agent_NotConnected_NothingChanged : Shared.Strings.Safety_Consent_AgentUnavailable, InfoBarSeverity.Warning),
|
||||
// The Agent could not read the executable (beta.8): say whether its drive or the file is missing, not the IPC code.
|
||||
HookingConsentOutcome.Failed when string.Equals(result.Detail, Shared.Ipc.IpcErrorCode.ExecutableUnreadable, StringComparison.Ordinal) && Game is not null
|
||||
=> (Formats.ExecutableMissingText(Game.Fingerprint.ExePath), InfoBarSeverity.Warning),
|
||||
@@ -1099,7 +1112,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);
|
||||
|
||||
@@ -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;
|
||||
@@ -694,7 +712,8 @@ public sealed partial class SettingsViewModel : ObservableObject
|
||||
return;
|
||||
}
|
||||
|
||||
string body = result.Outcome == HookingConsentOutcome.AgentUnavailable ? Shared.Strings.Safety_Consent_AgentUnavailable : result.Detail ?? Strings.Common_NotAvailable;
|
||||
// Turning off with no Agent changed nothing (beta.18): it said the enable path's "Nothing was enabled."
|
||||
string body = result.Outcome == HookingConsentOutcome.AgentUnavailable ? Strings.Agent_NotConnected_NothingChanged : result.Detail ?? Strings.Common_NotAvailable;
|
||||
_strip.Warn(game.Name, body);
|
||||
}
|
||||
|
||||
@@ -747,7 +766,9 @@ public sealed partial class SettingsViewModel : ObservableObject
|
||||
await _settings.SetAsync(definition, value).ConfigureAwait(true);
|
||||
if (definition.AgentReads)
|
||||
{
|
||||
_strip.Info(Strings.Settings_Header, Strings.Settings_Applied);
|
||||
// Disable all hooking does not wait for a session to start (beta.18): a measured one stops at its next safety scan.
|
||||
bool killSwitchOn = ReferenceEquals(definition, SettingsRegistry.HookingKillSwitch) && string.Equals(value, "1", StringComparison.Ordinal);
|
||||
_strip.Info(Strings.Settings_Header, killSwitchOn ? Strings.Settings_KillSwitch_Applied_On : Strings.Settings_Applied);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="0,12,0,0" MaxWidth="760" HorizontalAlignment="Left">
|
||||
<ui:TextBlock FontTypography="Title" Text="{x:Static res:Strings.App_Title}" />
|
||||
<ui:TextBlock x:Name="VersionText" Appearance="Secondary" />
|
||||
<ui:TextBlock x:Name="VersionText" Style="{StaticResource SecondaryText}" />
|
||||
<ui:TextBlock Margin="0,8,0,0" TextWrapping="Wrap" Text="{x:Static res:Strings.About_Tagline}" />
|
||||
<ui:TextBlock Margin="0,20,0,6" FontTypography="Subtitle" Text="{x:Static res:Strings.About_Notices_Header}" />
|
||||
<ui:TextBlock TextWrapping="Wrap" Text="{x:Static res:Strings.About_Notices_Copyright}" />
|
||||
@@ -56,7 +56,7 @@
|
||||
<ui:Button DockPanel.Dock="Right" Margin="12,0,0,0" Click="OnOpenLicencesFolder" Content="{x:Static res:Strings.About_OpenLicencesFolder}" Icon="{ui:SymbolIcon Folder24}" />
|
||||
<ui:TextBlock VerticalAlignment="Center" TextWrapping="Wrap" Text="{x:Static res:Strings.About_ThirdParty_Body}" />
|
||||
</DockPanel>
|
||||
<ui:TextBlock x:Name="NoLicencesFolder" Grid.Row="1" Margin="0,0,0,8" Appearance="Secondary" TextWrapping="Wrap"
|
||||
<ui:TextBlock x:Name="NoLicencesFolder" Grid.Row="1" Margin="0,0,0,8" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
|
||||
Text="{x:Static res:Strings.About_NoLicencesFolder}" Visibility="Collapsed" />
|
||||
<controls:DocumentBrowser x:Name="ThirdParty" Grid.Row="2" />
|
||||
</Grid>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<ui:TitleBar Grid.Row="0" Title="{Binding ViewModel.Title}" ShowMaximize="True" ShowMinimize="True" />
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Style="{StaticResource PageRoot}">
|
||||
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.NotFoundText}"
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.NotFoundText}"
|
||||
Visibility="{Binding ViewModel.NotFound, Converter={StaticResource BoolToVis}}" />
|
||||
|
||||
<ui:InfoBar IsClosable="False" Severity="Error" Margin="0,0,0,12"
|
||||
@@ -39,19 +39,19 @@
|
||||
Message="{x:Static vm:SessionSummaryViewModel.UnhookedBody}" />
|
||||
|
||||
<!-- header line + chips -->
|
||||
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.Line}" />
|
||||
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExitLine}" />
|
||||
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionLine}"
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.Line}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.ExitLine}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.ExceptionLine}"
|
||||
Visibility="{Binding ViewModel.ExceptionLine, Converter={StaticResource NullToCollapsed}}" />
|
||||
<!-- beta.10: how the game was shown, in either tier (03_METRICS §Display mode) -->
|
||||
<ui:TextBlock Appearance="Secondary" TextWrapping="Wrap" Text="{Binding ViewModel.DisplayLine}"
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.DisplayLine}"
|
||||
Visibility="{Binding ViewModel.DisplayLine, Converter={StaticResource NullToCollapsed}}" />
|
||||
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.HardwareLine}" />
|
||||
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.LibrariesLine}"
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.HardwareLine}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.LibrariesLine}"
|
||||
Visibility="{Binding ViewModel.LibrariesLine, Converter={StaticResource NullToCollapsed}}" />
|
||||
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.DriverProfileLine}"
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.DriverProfileLine}"
|
||||
Visibility="{Binding ViewModel.DriverProfileLine, Converter={StaticResource NullToCollapsed}}" />
|
||||
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.DriverStateLine}"
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.DriverStateLine}"
|
||||
Visibility="{Binding ViewModel.DriverStateLine, Converter={StaticResource NullToCollapsed}}" />
|
||||
<ItemsControl Margin="0,8,0,0" ItemsSource="{Binding ViewModel.Chips}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
@@ -82,16 +82,16 @@
|
||||
<DataTemplate DataType="{x:Type vm:StatCardModel}">
|
||||
<ui:Card Margin="0,0,8,8">
|
||||
<StackPanel>
|
||||
<ui:TextBlock Appearance="Secondary" Text="{Binding Label}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding Label}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Text="{Binding Value}" />
|
||||
<ui:TextBlock Appearance="Tertiary" Text="{Binding Suffix}" Visibility="{Binding Suffix, Converter={StaticResource NullToCollapsed}}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" Text="{Binding Suffix}" Visibility="{Binding Suffix, Converter={StaticResource NullToCollapsed}}" />
|
||||
</StackPanel>
|
||||
</ui:Card>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<ui:TextBlock Margin="0,8,0,0" Appearance="Secondary" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.Tier2Text}"
|
||||
<ui:TextBlock Margin="0,8,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.Tier2Text}"
|
||||
Visibility="{Binding ViewModel.IsHooked, Converter={StaticResource InverseBoolToVis}}" />
|
||||
<ui:TextBlock Margin="0,4,0,0" TextWrapping="Wrap" Text="{Binding ViewModel.Tier2Reason}"
|
||||
Visibility="{Binding ViewModel.IsHooked, Converter={StaticResource InverseBoolToVis}}" />
|
||||
@@ -111,7 +111,7 @@
|
||||
<CheckBox Grid.Column="2" Content="{x:Static vm:SessionSummaryViewModel.ShowSensorsText}"
|
||||
IsChecked="{Binding ViewModel.ShowSensors}" IsEnabled="{Binding ViewModel.HasSensors}" />
|
||||
</Grid>
|
||||
<ui:TextBlock Appearance="Tertiary" Text="{Binding ViewModel.DecimationNote}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" Text="{Binding ViewModel.DecimationNote}" />
|
||||
<charts:FrametimeChart x:Name="Frametime" Margin="0,6,0,0" Height="300" />
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.DistributionHeader}" />
|
||||
<charts:DistributionChart x:Name="Distribution" Margin="0,6,0,0" Height="260" />
|
||||
@@ -131,7 +131,7 @@
|
||||
window's wheel. -->
|
||||
<StackPanel Visibility="{Binding ViewModel.HasSensorStats, Converter={StaticResource BoolToVis}}">
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsHeader}" />
|
||||
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsNote}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsNote}" />
|
||||
<StackPanel Margin="0,6,0,0" Grid.IsSharedSizeScope="True">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -166,14 +166,14 @@
|
||||
<ui:TextBlock Grid.Column="2" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Median}" />
|
||||
<ui:TextBlock Grid.Column="3" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Min}" />
|
||||
<ui:TextBlock Grid.Column="4" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Max}" />
|
||||
<ui:TextBlock Grid.Column="5" Margin="0,2,0,2" Appearance="Secondary" TextAlignment="Right" Text="{Binding Readings}" />
|
||||
<ui:TextBlock Grid.Column="5" Margin="0,2,0,2" Style="{StaticResource SecondaryText}" TextAlignment="Right" Text="{Binding Readings}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<ui:TextBlock Margin="0,8,0,0" Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.SensorStatsMissing}"
|
||||
<ui:TextBlock Margin="0,8,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.SensorStatsMissing}"
|
||||
Visibility="{Binding ViewModel.SensorStatsMissing, Converter={StaticResource NullToCollapsed}}" />
|
||||
|
||||
<!-- annotations -->
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -161,8 +161,12 @@ public static class RecordedSessionEvents
|
||||
private static string? NullIfEmpty(string? value) => string.IsNullOrEmpty(value) ? null : value;
|
||||
|
||||
/// <summary>
|
||||
/// The guard's own reason when it named a family (beta.13, §S23-3): the App says a <c>BlockedService</c> or
|
||||
/// <c>BlockedDriver</c> was found on the PC, not in the game. Null when the guard named nothing.
|
||||
/// The guard's own reason whenever it refused: the App says a <c>BlockedService</c> or <c>BlockedDriver</c> was found on
|
||||
/// the PC, not in the game (beta.13, §S23-3), and a refusal no family names in the guard's words — "the game is 32-bit…",
|
||||
/// "the game's loaded modules could not be listed" — rather than by the session's end reason, which printed as
|
||||
/// <c>reason RefusedByGuard</c> (beta.18). Until beta.18 it was sent only beside a family. Null for an allow, and for a
|
||||
/// verdict nobody produced.
|
||||
/// </summary>
|
||||
private static string? GuardReasonOf(AntiCheatVerdict verdict) => string.IsNullOrEmpty(verdict.Family) ? null : verdict.Reason.ToString();
|
||||
private static string? GuardReasonOf(AntiCheatVerdict verdict) =>
|
||||
verdict.Reason is AntiCheatRefusalReason.Allow or AntiCheatRefusalReason.AllowedUnderUserModeException ? null : verdict.Reason.ToString();
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
+3
@@ -76,6 +76,7 @@ public static class Strings
|
||||
nameof(Safety_Refused_Unnamed),
|
||||
nameof(Safety_Unhooked_Format),
|
||||
nameof(Safety_Unhooked_MachineWide_Format),
|
||||
nameof(Safety_Unhooked_Unnamed_Format),
|
||||
];
|
||||
|
||||
public static string Safety_AdminMode_Accept => ResourceManager.GetString(nameof(Safety_AdminMode_Accept), Culture) ?? nameof(Safety_AdminMode_Accept);
|
||||
@@ -171,4 +172,6 @@ public static class Strings
|
||||
public static string Safety_Unhooked_Format => ResourceManager.GetString(nameof(Safety_Unhooked_Format), Culture) ?? nameof(Safety_Unhooked_Format);
|
||||
|
||||
public static string Safety_Unhooked_MachineWide_Format => ResourceManager.GetString(nameof(Safety_Unhooked_MachineWide_Format), Culture) ?? nameof(Safety_Unhooked_MachineWide_Format);
|
||||
|
||||
public static string Safety_Unhooked_Unnamed_Format => ResourceManager.GetString(nameof(Safety_Unhooked_Unnamed_Format), Culture) ?? nameof(Safety_Unhooked_Unnamed_Format);
|
||||
}
|
||||
@@ -33,6 +33,7 @@
|
||||
<data name="Safety_HookingTurnedOff" xml:space="preserve"><value>Hooking has been turned off for this game; its page says what was found.</value><comment>safety: human review required</comment></data>
|
||||
<data name="Safety_Unhooked_Format" xml:space="preserve"><value>Capture stopped: {0} was detected while the game was running, and FrameLedger unhooked.</value><comment>safety: human review required</comment></data>
|
||||
<data name="Safety_Unhooked_MachineWide_Format" xml:space="preserve"><value>Capture stopped: {0} started on this PC while the game was running ({1}) — a driver or service, which may belong to another game or program — and FrameLedger unhooked. The game's next session is measured again once it is no longer running.</value><comment>safety: human review required</comment></data>
|
||||
<data name="Safety_Unhooked_Unnamed_Format" xml:space="preserve"><value>Capture stopped while the game was running — {0} — and FrameLedger unhooked.</value><comment>safety: human review required</comment></data>
|
||||
<data name="Safety_Refused_TargetUnreadable" xml:space="preserve"><value>The game is running, but Windows would not let FrameLedger open its process: it is protected by an anti-cheat driver, or it runs as administrator while FrameLedger does not. Nothing was injected and this run was not measured. FrameLedger will not work around another product's protection. If the game itself runs as administrator, the agent's admin mode in Settings lets FrameLedger open it; a protected process stays closed.</value><comment>safety: human review required</comment></data>
|
||||
<data name="Safety_Exception_Title_Format" xml:space="preserve"><value>Make a user-mode exception for {0}?</value><comment>safety: human review required</comment></data>
|
||||
<data name="Safety_Exception_Intro_Format" xml:space="preserve"><value>FrameLedger found {0} in this game ({1}) and turned its hooking off. This dialog asks whether to make an exception for this game only. It recommends neither choice.</value><comment>safety: human review required</comment></data>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<data name="Safety_HookingTurnedOff" xml:space="preserve"><value>Hooking has been turned off for this game; its page says what was found.</value></data>
|
||||
<data name="Safety_Unhooked_Format" xml:space="preserve"><value>Capture stopped: {0} was detected while the game was running, and FrameLedger unhooked.</value></data>
|
||||
<data name="Safety_Unhooked_MachineWide_Format" xml:space="preserve"><value>Capture stopped: {0} started on this PC while the game was running ({1}) — a driver or service, which may belong to another game or program — and FrameLedger unhooked. The game's next session is measured again once it is no longer running.</value></data>
|
||||
<data name="Safety_Unhooked_Unnamed_Format" xml:space="preserve"><value>Capture stopped while the game was running — {0} — and FrameLedger unhooked.</value></data>
|
||||
<data name="Safety_Refused_TargetUnreadable" xml:space="preserve"><value>The game is running, but Windows would not let FrameLedger open its process: it is protected by an anti-cheat driver, or it runs as administrator while FrameLedger does not. Nothing was injected and this run was not measured. FrameLedger will not work around another product's protection. If the game itself runs as administrator, the agent's admin mode in Settings lets FrameLedger open it; a protected process stays closed.</value></data>
|
||||
<data name="Safety_Exception_Title_Format" xml:space="preserve"><value>Make a user-mode exception for {0}?</value></data>
|
||||
<data name="Safety_Exception_Intro_Format" xml:space="preserve"><value>FrameLedger found {0} in this game ({1}) and turned its hooking off. This dialog asks whether to make an exception for this game only. It recommends neither choice.</value></data>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<data name="Safety_HookingTurnedOff" xml:space="preserve"><value>Hooking đã được tắt cho game này; trang của game ghi rõ đã phát hiện gì.</value></data>
|
||||
<data name="Safety_Unhooked_Format" xml:space="preserve"><value>Đã dừng thu thập: phát hiện {0} khi game đang chạy, và FrameLedger đã gỡ hook.</value></data>
|
||||
<data name="Safety_Unhooked_MachineWide_Format" xml:space="preserve"><value>Đã dừng thu thập: {0} khởi động trên máy này khi game đang chạy ({1}) — một driver hoặc service, có thể thuộc về game hay chương trình khác — và FrameLedger đã gỡ hook. Phiên sau của game sẽ được đo lại khi nó không còn chạy.</value></data>
|
||||
<data name="Safety_Unhooked_Unnamed_Format" xml:space="preserve"><value>Đã dừng thu thập khi game đang chạy — {0} — và FrameLedger đã gỡ hook.</value></data>
|
||||
<data name="Safety_Refused_TargetUnreadable" xml:space="preserve"><value>Game đang chạy, nhưng Windows không cho FrameLedger mở tiến trình của nó: tiến trình được driver anti-cheat bảo vệ, hoặc game chạy với quyền quản trị còn FrameLedger thì không. Không có gì được inject và lần chạy này không được đo. FrameLedger sẽ không tìm cách vượt qua cơ chế bảo vệ của sản phẩm khác. Nếu chính game chạy với quyền quản trị, chế độ quản trị của agent trong Cài đặt cho phép FrameLedger mở nó; tiến trình được bảo vệ vẫn đóng.</value></data>
|
||||
<data name="Safety_Exception_Title_Format" xml:space="preserve"><value>Tạo ngoại lệ user-mode cho {0}?</value></data>
|
||||
<data name="Safety_Exception_Intro_Format" xml:space="preserve"><value>FrameLedger đã phát hiện {0} trong game này ({1}) và đã tắt hooking cho nó. Hộp thoại này hỏi bạn có muốn tạo ngoại lệ cho riêng game này không. Nó không khuyến nghị lựa chọn nào.</value></data>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -22,40 +22,60 @@ target_compile_features(FrameLedger.Shm INTERFACE cxx_std_20)
|
||||
#
|
||||
# KNOWN LIMIT, stated rather than discovered: this runs at CONFIGURE time, so the
|
||||
# `-dirty` suffix reflects the tree when CMake last ran, not when the DLL was
|
||||
# last compiled. For a released build that is exact — CI configures and builds
|
||||
# once from a clean checkout. For a developer editing between configures it is
|
||||
# approximate, and the field is a version-skew signal rather than a provenance
|
||||
# guarantee. Making it exact means re-running git on every build, which is a cost
|
||||
# on every incremental compile for a value only the attach handshake reads.
|
||||
execute_process(
|
||||
COMMAND git describe --always --dirty --abbrev=12
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE FL_BUILD_ID_RAW
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
)
|
||||
if(NOT FL_BUILD_ID_RAW)
|
||||
set(FL_BUILD_ID_RAW "unknown")
|
||||
endif()
|
||||
# buildId is char[32] and the guard side compares the whole array, so a value
|
||||
# that would be truncated must be caught here rather than becoming a permanent
|
||||
# mismatch nobody can explain.
|
||||
string(LENGTH "${FL_BUILD_ID_RAW}" FL_BUILD_ID_LEN)
|
||||
# AFTER THE FIRST TAG the long form stopped fitting on a developer's machine: `v0.1.0-beta.2-2-gd3e74988a7bc-dirty`
|
||||
# is 35 characters, so every local configure with an uncommitted change failed here and the documented workaround
|
||||
# was "commit before you build" (measured 2026-09-17, again 2026-09-21). The id is a version-skew signal, not a
|
||||
# provenance guarantee (above), so the fallback spends fewer characters on the same facts: an 8-digit abbreviation
|
||||
# and `+` for dirty. A released build is a clean checkout AT a tag and never reaches this branch. Still too long
|
||||
# after that is still fatal, for the reason the check exists.
|
||||
if(FL_BUILD_ID_LEN GREATER 31)
|
||||
# last compiled. This comment said that for a released build it was exact, "CI
|
||||
# configures and builds once from a clean checkout", and it was not (corrected
|
||||
# 2026-10-07, beta.18): release.yml writes the release date into the tracked
|
||||
# legal/*.md before the gate configures, and every release until beta.18 shipped
|
||||
# "<tag>-dirty" — the owner's Dashboard read "Overlay build v0.1.0-beta.17-dirty",
|
||||
# and the run's log "FL_BUILD_ID = v0.1.0-beta.17-dirty" two lines after
|
||||
# "RELEASE_DATE = 2026-10-07 in 3 file(s)". A release now hands the id in (below). For a
|
||||
# developer editing between configures it is approximate, and the field is a
|
||||
# version-skew signal rather than a provenance guarantee. Making it exact means
|
||||
# re-running git on every build, which is a cost on every incremental compile for a
|
||||
# value only the attach handshake reads.
|
||||
#
|
||||
# A RELEASE HANDS THE ID IN: release.yml reads describe from the clean checkout, before
|
||||
# anything edits a tracked file, and passes it as the environment's FL_BUILD_ID; it is
|
||||
# taken as given here, and tools/buildid-check.ps1 then reads it back out of the
|
||||
# published binaries. It goes into a C string literal, so it must be what describe can
|
||||
# print and nothing a literal would have to escape.
|
||||
if(DEFINED ENV{FL_BUILD_ID} AND NOT "$ENV{FL_BUILD_ID}" STREQUAL "")
|
||||
set(FL_BUILD_ID_RAW "$ENV{FL_BUILD_ID}")
|
||||
if(NOT FL_BUILD_ID_RAW MATCHES "^[0-9A-Za-z._+-]+$")
|
||||
message(FATAL_ERROR "FL_BUILD_ID '${FL_BUILD_ID_RAW}' from the environment holds a character no build id has (0-9 A-Z a-z . _ + -).")
|
||||
endif()
|
||||
string(LENGTH "${FL_BUILD_ID_RAW}" FL_BUILD_ID_LEN)
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND git describe --always --dirty=+ --abbrev=8
|
||||
COMMAND git describe --always --dirty --abbrev=12
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE FL_BUILD_ID_RAW
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
)
|
||||
if(NOT FL_BUILD_ID_RAW)
|
||||
set(FL_BUILD_ID_RAW "unknown")
|
||||
endif()
|
||||
# buildId is char[32] and the guard side compares the whole array, so a value
|
||||
# that would be truncated must be caught here rather than becoming a permanent
|
||||
# mismatch nobody can explain.
|
||||
string(LENGTH "${FL_BUILD_ID_RAW}" FL_BUILD_ID_LEN)
|
||||
# AFTER THE FIRST TAG the long form stopped fitting on a developer's machine: `v0.1.0-beta.2-2-gd3e74988a7bc-dirty`
|
||||
# is 35 characters, so every local configure with an uncommitted change failed here and the documented workaround
|
||||
# was "commit before you build" (measured 2026-09-17, again 2026-09-21). The id is a version-skew signal, not a
|
||||
# provenance guarantee (above), so the fallback spends fewer characters on the same facts: an 8-digit abbreviation
|
||||
# and `+` for dirty. A released build hands its id in (above) and never reaches this branch. Still too long
|
||||
# after that is still fatal, for the reason the check exists.
|
||||
if(FL_BUILD_ID_LEN GREATER 31)
|
||||
execute_process(
|
||||
COMMAND git describe --always --dirty=+ --abbrev=8
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE FL_BUILD_ID_RAW
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
)
|
||||
string(LENGTH "${FL_BUILD_ID_RAW}" FL_BUILD_ID_LEN)
|
||||
endif()
|
||||
endif()
|
||||
if(FL_BUILD_ID_LEN GREATER 31)
|
||||
message(FATAL_ERROR
|
||||
|
||||
@@ -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;
|
||||
|
||||
Loaded 100 of 137 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user