Compare commits

..
Author SHA1 Message Date
poli0981andClaude Opus 5.5 e1bb67eb0b release: 0.1.0-beta.27 - its changelog file, HANDOFF's beta.27 section (six faults from the owner's eight sessions; the crash-safety question left to the owner), owner-only item 22, the release lines (beta.27 PR-2)
- docs/changelog/0.1.0-beta.27.md: [Unreleased] moved under its heading, with the opening and how to
  update from beta.26 (nothing shown again - Disclaimer 2.11, Privacy Policy 2.12; schema 21; rules
  2026.10.4; the frame-generation fix reads stored sessions at once, the rest applies to new ones);
  its row in CHANGELOG.md's Releases table.
- docs/HANDOFF.md: beta.26's START HERE moved verbatim to docs/handoff/history/0.1.0-beta.26.md (its
  row in the split table); beta.27's START HERE - no new owner decision, the owner's two ways for
  Steam games and why the note was taken, one question left to the owner (the crash safety counting
  a direct start's hand-off), what the ledger copy measured, the traps; owner-only item 22 (the driver's report and 20(b), Start directly on Lies of P, one window
  per session, display sizes).
- The release lines: README, the accuracy block (legal/ACCURACY.md and its copies), LIMITATIONS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 10:32:00 +07:00
21 changed files with 153 additions and 502 deletions

No files matched your search

-1
View File
@@ -41,7 +41,6 @@ Newest first. Each file holds that release's section exactly as it stood here.
| Version | Date | Notes |
|---|---|---|
| `0.1.0-beta.28` | 2026-10-20 | [`docs/changelog/0.1.0-beta.28.md`](docs/changelog/0.1.0-beta.28.md) |
| `0.1.0-beta.27` | 2026-10-20 | [`docs/changelog/0.1.0-beta.27.md`](docs/changelog/0.1.0-beta.27.md) |
| `0.1.0-beta.26` | 2026-10-19 | [`docs/changelog/0.1.0-beta.26.md`](docs/changelog/0.1.0-beta.26.md) |
| `0.1.0-beta.25` | 2026-10-19 | [`docs/changelog/0.1.0-beta.25.md`](docs/changelog/0.1.0-beta.25.md) |
+1 -1
View File
@@ -5,7 +5,7 @@ hooking on for — and reading the graphics calls the game makes. That is why it
resolution, the upscaler, frame generation and ray tracing apart. It is also where its limits come from. This
page lists them in plain words; each item links to the document that has the details.
*Beta software: this page describes version 0.1.0-beta.28.*
*Beta software: this page describes version 0.1.0-beta.27.*
## Games it will not measure
+2 -2
View File
@@ -12,7 +12,7 @@ pages.
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-10-19.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.28`** (2026-10-20), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.27`** (2026-10-20), 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
@@ -174,7 +174,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
## Install
> **The latest pre-release is `v0.1.0-beta.28` (2026-10-20); before it `v0.1.0-beta.27` (2026-10-20), `v0.1.0-beta.26` (2026-10-19), `v0.1.0-beta.25` (2026-10-19), `v0.1.0-beta.24` (2026-10-19), `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `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 the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for 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.27` (2026-10-20); before it `v0.1.0-beta.26` (2026-10-19), `v0.1.0-beta.25` (2026-10-19), `v0.1.0-beta.24` (2026-10-19), `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `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 the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for 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**.
+1 -13
View File
@@ -240,7 +240,7 @@ All screens are `Page`s registered with the navigation page provider and navigat
### Dashboard
- Agent status `ui:CardControl` (state, capability badges as `InfoBadge`: telemetry source, Vulkan layer, ~~ETW fallback~~, PawnIO/CPU-temp, elevation — Repair button on error).
- **Live capture cards** (one per running session since beta.28, two to a row): game name, **tier badge**, elapsed, live `FpsReadout` (5 s rolling), **measured** `renderW×H → outputW×H` with upscaler + quality, RT-active dot, CPU/GPU temp, ~~per-process VRAM~~ the game's own VRAM and RAM (beta.12: read from outside the game, so a held session has them too), sparkline (last 120 s) fed by `SessionProgress`. Tier 1 shows measured settings — this is the payoff of hooking and should read as facts, not guesses.
- **Live capture card** (visible during capture): game name, **tier badge**, elapsed, live `FpsReadout` (5 s rolling), **measured** `renderW×H → outputW×H` with upscaler + quality, RT-active dot, CPU/GPU temp, ~~per-process VRAM~~ the game's own VRAM and RAM (beta.12: read from outside the game, so a held session has them too), sparkline (last 120 s) fed by `SessionProgress`. Tier 1 shows measured settings — this is the payoff of hooking and should read as facts, not guesses.
- Recent sessions list (last 10 across games) → click opens session summary.
- Totals strip: games tracked, total playtime, sessions this week (`ui:Card` row).
@@ -270,18 +270,6 @@ All screens are `Page`s registered with the navigation page provider and navigat
> open is on it at once; the completion notice names the session that completed (`SessionCompleted.gameName`)
> and a `faulted` completion is no notice (the strip's `CaptureError` already said it). Until this date the
> Agent announced only hooked sessions: every other game read "Nothing is being captured." while it ran.
>
> **beta.28: one card per running session** (the owner, 2026-10-20: "Thêm cơ chế hiển thị UI/UX Dashboard khi chạy >=2
> game trong cùng 1 thời điểm"). The Agent records one session per executable, so two games run as two sessions, and
> until beta.28 the second showed only as *Running sessions: 2* — the one card went to a hooked session and stayed with
> it. `DashboardViewModel.LiveCards` keeps a `LiveCaptureViewModel` per session, each fed only its own session's events
> (a card is made by its session's first event or seed and is one session's for life); hooked sessions come first, each
> kind in the order it started, and a card that changes place is moved, never rebuilt. The header counts the games from
> two on (*2 games recording*, `Dashboard_Live_Count_Format`) and the cards stand two to a row (`LiveColumns`); with none
> running, one card says *Nothing is being captured.* Each card is the card it was — name, tier badge, elapsed, the
> readout or why nothing is measured, the measured settings, the temperatures (the machine's, so alike on every card) and
> the game's own memory. Tests: `DashboardViewModelTests` (two games, a third, each ending), `LiveCaptureViewModelTests`,
> and the page in `PagesLoadTests`' surfaces with a hooked and a held session, in both themes and through a switch.
### Games (grid → detail)
- `GridView`-style panel of cover cards (`ui:CardAction`): name, platform badge, engine badge, total playtime, last played, mini trend sparkline (avg Native FPS last 10 sessions). Sort/filter/`ui:AutoSuggestBox` search.
+38 -26
View File
@@ -66,7 +66,6 @@ owner-only items stay below; the history of every train, the passed owner-only i
| `§beta.24` | [`handoff/history/0.1.0-beta.24.md`](handoff/history/0.1.0-beta.24.md) |
| `§beta.25` | [`handoff/history/0.1.0-beta.25.md`](handoff/history/0.1.0-beta.25.md) |
| `§beta.26` | [`handoff/history/0.1.0-beta.26.md`](handoff/history/0.1.0-beta.26.md) |
| `§beta.27` | [`handoff/history/0.1.0-beta.27.md`](handoff/history/0.1.0-beta.27.md) |
| `§Owner-only`, an open item | [§Owner-only](#owner-only--no-pr-can-close-these) below |
| `§Owner-only`, a passed item (3, 12, 14–19) | [`handoff/owner-only-passed.md`](handoff/owner-only-passed.md) |
| `§Traps`, `§Two corrections carried forward` | [`handoff/traps.md`](handoff/traps.md) |
@@ -74,33 +73,51 @@ owner-only items stay below; the history of every train, the passed owner-only i
---
## **START HERE** — 2026-10-20, 0.1.0-beta.28: the Dashboard with two or more games
## **START HERE** — 2026-10-20, 0.1.0-beta.27: the owner's eight sessions of 2026-10-20
*Status is `docs/changelog/0.1.0-beta.28.md`; this is what no other file carries.* The owner, while beta.27 was being
released: "Thêm cơ chế hiển thị UI/UX Dashboard khi chạy >=2 game trong cùng 1 thời điểm nếu được nhé." and "Bạn có thể
chờ beta27 xong xử lý tiếp luôn bản 28 nếu được." #332 (the cards) and this release, the same day as beta.27 — whose
section, with the open crash-safety question, is `handoff/history/0.1.0-beta.27.md`.
*Status is `docs/changelog/0.1.0-beta.27.md`; this is what no other file carries.* The owner ran the installed
beta.26 the morning after it shipped: "Bạn có thể kiểm tra kết quả ở khoảng 8 kết quả gần nhất. Sửa luôn 2 test flake
luôn trong phiên này và fix bug, publish bản mới nếu có bug." — and, mid-way: "1. cyberpunk 2077 là switch in-game.
2. Fix bug mở xem 1 session nhiều lần ra nhiều cửa sổ." — then, on the Steam hand-off: "bạn có thể lựa chọn: note vào
giao diện UI là các game trên Steam sẽ tự trigger Steam trước / Thêm Setting cố định trên game Steam là luôn chạy qua
steam client". #330 (six fixes, the Steam note, the two flaky tests, `spike-notes` §23) and this release.
**No new owner decision.** The Agent always recorded one session per executable, so two games were two sessions; the
Dashboard's one live card went to a hooked session and kept it, and the other game read only as *Running sessions: 2*.
Each running session now has its card (`08_UI` §Dashboard).
**No new owner decision.** Each fix makes the code do what a document already said: a state is a frame generation's
whole multiplier (`03_METRICS` §The mix), the driver's report is the session's and not the dead pid's (§The
driver-reported rung), a game started again is recorded (`04_CAPTURE`, beta.15) — after a launch too —, a summary is
one window, the display sizes are the ones seen.
**Choices made here** — the owner asked for a way to show them, not for a layout: a card per session, each read the
way the one card was, rather than one large card and a list of the rest; hooked sessions first, each kind in the order
it started, a card moved rather than rebuilt when its place changes; two to a row from two on; the header counts the
games from two on. The machine's temperatures repeat on every card: each session's tick carries them.
**The owner's two ways for Steam games, and the one taken.** The owner offered a note in the UI or a fixed rule that
Steam's games always go through the Steam client, and left the choice open. The note was taken (`08_UI` §Games, Play):
the rule would have cost what *Start directly* exists for — three of the five Steam games started directly on
2026-10-20 ran and were measured from their first frame, and a Vulkan game is measured only when FrameLedger starts it
(Everhex Demo, a Steam game). Not every Steam game hands itself to Steam: Lies of P did, Expedition 33 closed instead.
**One question for the owner, not taken:** the crash safety counts a direct start's early exit — Lies of P handing
itself to Steam, Expedition 33 closing within five seconds even unhooked — and two such starts turn hooking off for
the game (`19_SAFETY` §Crash & stability safety, measured `spike-notes` §23). The policy cannot tell a hand-off from
the hang it exists for, so it stands, and users are told to start such a game through its store. An exemption — an
exit followed by the same executable within seconds — would loosen a safety rule and is the owner's to decide.
**Measured on the owner's ledger** (a read-only backup copy, the App's own loader in a scratch test): of 70 sessions,
the ×2.52 row was the only stored state between two multipliers; none of the 14 sessions the driver answered kept
`CREATED | EVALUATE` (Expedition 33: `0x8067F` while it ran on 2026-09-06, `0x8007F` stored); two Lies of P and three
Dark Souls III sessions stored no window size.
**Traps met on the way:**
- **C# written from a Python string**: `@"D:\another\…"` in a non-raw Python string turned `\a` into BEL inside a test,
and the test still passed — both of its paths were mangled alike. Write C# through raw strings, and scan a diff for
control characters before committing.
- **An items panel binds to the page**: inside an `ItemsPanelTemplate`, `{Binding ViewModel.LiveColumns}` reads the
ItemsControl's DataContext — the page — so the panel's column count is the page view model's.
- **A page rendered for a look has no background of its own**: under the dark theme the light text is drawn on
transparency. Read the light render, or put the page on a `Border` with `ApplicationBackgroundBrush`.
- **A probe taken after the target exits is not the session's.** NVIDIA's driver still answers for a dead pid, with
the bits that say a feature ran cleared; any per-process question asked at a session's end must check that the game
still lives (`CaptureSession`'s last snapshot), or the last answer erases the session's.
- **A launch's own process reaches the watcher after the launch began**, so it lands among the processes turned away
"one at a time"; whatever acts on those must leave out the launch's own pids (`Running.Targets`).
- **The logs are the timeline of what the owner did**: `ui-*.log`'s `play:` lines say *through the agent* (Start
directly) or *through steam*; `agent-*.log` has every session's end, a discarded one included — the ledger keeps no
row for it. A hooking switch the user flips leaves no line: say what the logs show, not why hooking was off.
- **Decode the windows before naming a cause**: the ×2.52 windows' runs — 251 application frames followed by one
generated frame, 270 by two — showed the stepping at a glance.
**Owner-only:** item 23 added; beta.27's item 22 and the crash-safety question stand.
**Owner-only:** items 20 and 21 annotated (§23); item 22 added.
## Owner-only — no PR can close these
@@ -247,11 +264,6 @@ games from two on. The machine's temperatures repeat on every card: each session
counts the hand-off: after two such starts hooking is off again (`19_SAFETY`). (c) **One window per session:** open a session from a Sessions tab, then again from the game
page or its notification → the same window comes forward, restored if minimised. (d) **A game in exclusive
full-screen** (Dark Souls III, Lies of P) → its summary's Display card shows the window size.
23. **beta.28 on real hardware.** Two games at once — one hooked, one with hooking off (or refused) → the Dashboard
shows two cards side by side, the hooked one first, and *2 games recording* beside *Live capture*; each card's
numbers are its own game's; closing one leaves the other's card where it is, and the count goes. A third game → a
third card on the next row and *3 games recording*. (The `ja` string `Dashboard_Live_Count_Format` is marked
`review`.)
**Answered 2026-08-05, do not re-ask:** remove `gameguard` and keep `guard` (approved
over a red `Rules` gate, with the reasoning recorded in the merge commit); vendor NVAPI
headers **and** `amd64/nvapi64.lib`; Windows 11 is the **measurement scope** only —
-26
View File
@@ -1,26 +0,0 @@
<!-- Moved from CHANGELOG.md's [Unreleased] when 0.1.0-beta.28 was cut, 2026-10-20 (D66). CHANGELOG.md lists every release. -->
## [0.1.0-beta.28] - 2026-10-20
**The twenty-eighth pre-release: the Dashboard shows every game being recorded.** The same unsigned installer: verify
its hash against `SHA256SUMS.txt`, then *More info → Run anyway*.
**Updating from `0.1.0-beta.27`:** Help ▸ Check for updates, then *Restart to update* with no game running. Nothing is
shown for you to accept again (the Disclaimer stays 2.11, the Privacy Policy 2.12), the ledger stays at schema 21, and
no game is read again: the detection rules (`2026.10.4`) are beta.27's. Only the App changes; the capture agent and
what it records are beta.27's.
### Added
- **The Dashboard shows every game being recorded.** Two games running at once are two sessions, and until now the
Dashboard's *Live capture* card showed one of them — a measured one first — while the other appeared only as
*Running sessions: 2*. Each running game now has its own card, side by side, with its own frame rate, settings,
elapsed time and memory, or why it is recorded without being measured; measured games come first, and the title
says how many games are being recorded (*2 games recording*). In en/vi/ja (ja marked for review).
### Fixed
- **A native injection test that failed under load** (developers only). Two `fl_guard_test` cases — the OpenGL hook,
and a swap chain on a real window — waited 4 seconds for twenty frames, and on a loaded CI runner (the suite took
115 s) the OpenGL hook, installed, had recorded none. They now wait up to 12 seconds, the harness presenting for 16,
and a failure says the writer's state.
-49
View File
@@ -1,49 +0,0 @@
# HANDOFF history — 0.1.0-beta.27
*Moved verbatim from `docs/HANDOFF.md` when 0.1.0-beta.28 was cut, 2026-10-20 (owner decision D66); `docs/HANDOFF.md` §How this file is split lists every part. Nothing below was edited, so its "below" and "above" point inside the original file.*
## **START HERE** — 2026-10-20, 0.1.0-beta.27: the owner's eight sessions of 2026-10-20
*Status is `docs/changelog/0.1.0-beta.27.md`; this is what no other file carries.* The owner ran the installed
beta.26 the morning after it shipped: "Bạn có thể kiểm tra kết quả ở khoảng 8 kết quả gần nhất. Sửa luôn 2 test flake
luôn trong phiên này và fix bug, publish bản mới nếu có bug." — and, mid-way: "1. cyberpunk 2077 là switch in-game.
2. Fix bug mở xem 1 session nhiều lần ra nhiều cửa sổ." — then, on the Steam hand-off: "bạn có thể lựa chọn: note vào
giao diện UI là các game trên Steam sẽ tự trigger Steam trước / Thêm Setting cố định trên game Steam là luôn chạy qua
steam client". #330 (six fixes, the Steam note, the two flaky tests, `spike-notes` §23) and this release.
**No new owner decision.** Each fix makes the code do what a document already said: a state is a frame generation's
whole multiplier (`03_METRICS` §The mix), the driver's report is the session's and not the dead pid's (§The
driver-reported rung), a game started again is recorded (`04_CAPTURE`, beta.15) — after a launch too —, a summary is
one window, the display sizes are the ones seen.
**The owner's two ways for Steam games, and the one taken.** The owner offered a note in the UI or a fixed rule that
Steam's games always go through the Steam client, and left the choice open. The note was taken (`08_UI` §Games, Play):
the rule would have cost what *Start directly* exists for — three of the five Steam games started directly on
2026-10-20 ran and were measured from their first frame, and a Vulkan game is measured only when FrameLedger starts it
(Everhex Demo, a Steam game). Not every Steam game hands itself to Steam: Lies of P did, Expedition 33 closed instead.
**One question for the owner, not taken:** the crash safety counts a direct start's early exit — Lies of P handing
itself to Steam, Expedition 33 closing within five seconds even unhooked — and two such starts turn hooking off for
the game (`19_SAFETY` §Crash & stability safety, measured `spike-notes` §23). The policy cannot tell a hand-off from
the hang it exists for, so it stands, and users are told to start such a game through its store. An exemption — an
exit followed by the same executable within seconds — would loosen a safety rule and is the owner's to decide.
**Measured on the owner's ledger** (a read-only backup copy, the App's own loader in a scratch test): of 70 sessions,
the ×2.52 row was the only stored state between two multipliers; none of the 14 sessions the driver answered kept
`CREATED | EVALUATE` (Expedition 33: `0x8067F` while it ran on 2026-09-06, `0x8007F` stored); two Lies of P and three
Dark Souls III sessions stored no window size.
**Traps met on the way:**
- **A probe taken after the target exits is not the session's.** NVIDIA's driver still answers for a dead pid, with
the bits that say a feature ran cleared; any per-process question asked at a session's end must check that the game
still lives (`CaptureSession`'s last snapshot), or the last answer erases the session's.
- **A launch's own process reaches the watcher after the launch began**, so it lands among the processes turned away
"one at a time"; whatever acts on those must leave out the launch's own pids (`Running.Targets`).
- **The logs are the timeline of what the owner did**: `ui-*.log`'s `play:` lines say *through the agent* (Start
directly) or *through steam*; `agent-*.log` has every session's end, a discarded one included — the ledger keeps no
row for it. A hooking switch the user flips leaves no line: say what the logs show, not why hooking was off.
- **Decode the windows before naming a cause**: the ×2.52 windows' runs — 251 application frames followed by one
generated frame, 270 by two — showed the stepping at a glance.
**Owner-only:** items 20 and 21 annotated (§23); item 22 added.
+4 -5
View File
@@ -44,11 +44,10 @@ stopped, hooking turned off — each with one button that only says you have rea
## Dashboard
- **Live capture** — each game being recorded right now, one card per game (two games side by side, and *2 games
recording* beside the title): 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.
- **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
+1 -1
View File
@@ -12,7 +12,7 @@
HTML comments are not part of the block.
-->
> ⚠ **What FrameLedger actually measures today — 2026-10-19.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.28`** (2026-10-20), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.27`** (2026-10-20), an unsigned installer built from that tag with its
> checksums published beside it. The source holds the desktop app
> (library, store import, charts, settings) and the background Agent, which records a session when a
> game in the library runs (unless you switched its recording off), injects only into games you enabled
+1 -1
View File
@@ -114,7 +114,7 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
<!-- accuracy-block:begin -->
> ⚠ **What FrameLedger actually measures today — 2026-10-19.** The software is a beta; its latest
> **pre-release is `0.1.0-beta.28`** (2026-10-20), an unsigned installer built from that tag with its
> **pre-release is `0.1.0-beta.27`** (2026-10-20), 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
+37 -55
View File
@@ -15,62 +15,44 @@
<StackPanel Style="{StaticResource PageRoot}">
<ui:TextBlock FontTypography="Title" Text="{x:Static vm:DashboardViewModel.Header}" />
<!-- 08_UI §Dashboard: the live capture cards — one per running session since beta.28 (the owner, 2026-10-20: two or
more games at once), hooked sessions first — fed by SessionStarted / SessionProgress / SessionHeld /
SessionCompleted. A session recorded without measuring (Tier 2) shows why, and no readout (2026-09-23). -->
<StackPanel Margin="0,16,0,0" Orientation="Horizontal">
<ui:TextBlock FontTypography="Subtitle" Text="{x:Static vm:LiveCaptureViewModel.Header}" />
<Border Style="{StaticResource Pill}" Visibility="{Binding ViewModel.LiveCountText, Converter={StaticResource NullToCollapsed}}">
<TextBlock Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{Binding ViewModel.LiveCountText}" />
</Border>
</StackPanel>
<ui:Card Margin="0,8,0,0" HorizontalAlignment="Stretch" Visibility="{Binding ViewModel.LiveIdle, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:LiveCaptureViewModel.IdleText}" />
<!-- 08_UI §Dashboard: the live capture card, fed by SessionStarted / SessionProgress / SessionHeld / SessionCompleted.
A session recorded without measuring (Tier 2) shows why, and no readout (2026-09-23). -->
<ui:Card Margin="0,16,0,0" HorizontalAlignment="Stretch">
<StackPanel>
<StackPanel Orientation="Horizontal">
<ui:TextBlock FontTypography="Subtitle" Text="{x:Static vm:LiveCaptureViewModel.Header}" />
<Border Style="{StaticResource Pill}" Visibility="{Binding ViewModel.Live.IsActive, Converter={StaticResource BoolToVis}}">
<TextBlock Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{Binding ViewModel.Live.TierText}" />
</Border>
</StackPanel>
<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 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 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}}" />
<WrapPanel Margin="0,8,0,0">
<ui:TextBlock Margin="0,0,16,0" Text="{Binding ViewModel.Live.ResolutionText}" />
<ui:TextBlock Margin="0,0,16,0" Text="{Binding ViewModel.Live.UpscalerText}" />
<ui:TextBlock Margin="0,0,16,0" Text="{Binding ViewModel.Live.FgText}" />
<Border Style="{StaticResource Pill}" Margin="0,0,16,0" Background="{DynamicResource AccentFillColorDefaultBrush}" BorderThickness="0"
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" 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>
</ui:Card>
<!-- The right margin of the last column is taken back here, so the cards line up with the cards below. -->
<ItemsControl Margin="0,0,-8,0" Focusable="False" ItemsSource="{Binding ViewModel.LiveCards}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="{Binding ViewModel.LiveColumns}" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type vm:LiveCaptureViewModel}">
<ui:Card Margin="0,8,8,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="Top"
AutomationProperties.Name="{Binding GameName}">
<StackPanel>
<StackPanel Orientation="Horizontal">
<ui:TextBlock FontTypography="BodyStrong" Text="{Binding GameName}" TextTrimming="CharacterEllipsis" />
<Border Style="{StaticResource Pill}" Visibility="{Binding TierText, Converter={StaticResource NullToCollapsed}}">
<TextBlock Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{Binding TierText}" />
</Border>
</StackPanel>
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding ElapsedText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:LiveCaptureViewModel.WaitingText}"
Visibility="{Binding WaitingForFrames, Converter={StaticResource BoolToVis}}" />
<StackPanel Margin="0,8,0,0" Visibility="{Binding IsHeld, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Text="{x:Static vm:LiveCaptureViewModel.HeldText}" TextWrapping="Wrap" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding HeldReason}" TextWrapping="Wrap" />
</StackPanel>
<controls:FpsReadout Margin="0,8,0,0" Model="{Binding Readout}"
Visibility="{Binding IsHeld, Converter={StaticResource InverseBoolToVis}}" />
<WrapPanel Margin="0,8,0,0">
<ui:TextBlock Margin="0,0,16,0" Text="{Binding ResolutionText}" />
<ui:TextBlock Margin="0,0,16,0" Text="{Binding UpscalerText}" />
<ui:TextBlock Margin="0,0,16,0" Text="{Binding FgText}" />
<Border Style="{StaticResource Pill}" Margin="0,0,16,0" Background="{DynamicResource AccentFillColorDefaultBrush}" BorderThickness="0"
Visibility="{Binding RtActive, Converter={StaticResource BoolToVis}}">
<TextBlock Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}" Text="{x:Static vm:LiveCaptureViewModel.RtOnText}" />
</Border>
<ui:TextBlock Margin="0,0,16,0" Style="{StaticResource SecondaryText}" Text="{Binding GpuTempText}" />
<ui:TextBlock Margin="0,0,16,0" Style="{StaticResource SecondaryText}" Text="{Binding CpuTempText}" />
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding MemoryText}" />
</WrapPanel>
</StackPanel>
</ui:Card>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- totals strip -->
<UniformGrid Margin="0,12,0,0" Columns="3">
-3
View File
@@ -214,7 +214,6 @@ public static class Strings
nameof(Dashboard_Agent_Version),
nameof(Dashboard_Empty),
nameof(Dashboard_Header),
nameof(Dashboard_Live_Count_Format),
nameof(Dashboard_Live_CpuTemp_Format),
nameof(Dashboard_Live_Elapsed_Format),
nameof(Dashboard_Live_GameMemory_Format),
@@ -1542,8 +1541,6 @@ public static class Strings
public static string Dashboard_Header => ResourceManager.GetString(nameof(Dashboard_Header), Culture) ?? nameof(Dashboard_Header);
public static string Dashboard_Live_Count_Format => ResourceManager.GetString(nameof(Dashboard_Live_Count_Format), Culture) ?? nameof(Dashboard_Live_Count_Format);
public static string Dashboard_Live_CpuTemp_Format => ResourceManager.GetString(nameof(Dashboard_Live_CpuTemp_Format), Culture) ?? nameof(Dashboard_Live_CpuTemp_Format);
public static string Dashboard_Live_Elapsed_Format => ResourceManager.GetString(nameof(Dashboard_Live_Elapsed_Format), Culture) ?? nameof(Dashboard_Live_Elapsed_Format);
-4
View File
@@ -489,10 +489,6 @@
<value>—</value>
<comment>review</comment>
</data>
<data name="Dashboard_Live_Count_Format" xml:space="preserve">
<value>{0} 本のゲームを記録中</value>
<comment>review</comment>
</data>
<data name="Dashboard_Live_CpuTemp_Format" xml:space="preserve">
<value>CPU {0} °C</value>
<comment>review</comment>
-3
View File
@@ -372,9 +372,6 @@
<data name="Common_Dash" xml:space="preserve">
<value>—</value>
</data>
<data name="Dashboard_Live_Count_Format" xml:space="preserve">
<value>{0} games recording</value>
</data>
<data name="Dashboard_Live_CpuTemp_Format" xml:space="preserve">
<value>CPU {0} °C</value>
</data>
-3
View File
@@ -367,9 +367,6 @@
<data name="Common_Dash" xml:space="preserve">
<value>—</value>
</data>
<data name="Dashboard_Live_Count_Format" xml:space="preserve">
<value>Đang ghi {0} game</value>
</data>
<data name="Dashboard_Live_CpuTemp_Format" xml:space="preserve">
<value>CPU {0} °C</value>
</data>
@@ -14,7 +14,7 @@ namespace FrameLedger.App.ViewModels;
/// <summary>
/// The Dashboard (08_UI §Dashboard): the Agent status card (what <c>HelloAck</c> and <c>StatusAck</c> said, every
/// value <c>N/A</c> until the Agent answered — never a placeholder that reads as a measurement), the live capture
/// cards fed by the pipe's events — one per running session since beta.28 —, the recent sessions, and the totals strip.
/// card fed by the pipe's events, the recent sessions, and the totals strip.
/// </summary>
/// <remarks>
/// <b>It listens only while its page is on screen (beta.23):</b> <see cref="Attach"/> on Loaded, <see cref="Detach"/> on
@@ -22,7 +22,6 @@ namespace FrameLedger.App.ViewModels;
/// the root container kept every Dashboard ever opened, each answering every event and reloading its lists on the UI thread
/// at every session's end. FR-3.8's notice, which it raised, is <see cref="SessionNotices"/>'s.
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed partial class DashboardViewModel : ObservableObject
{
private readonly IAgentLink _agent;
@@ -93,24 +92,7 @@ public sealed partial class DashboardViewModel : ObservableObject
public static string TotalsThisWeek => Strings.Dashboard_Totals_ThisWeek;
/// <summary>
/// The live capture cards: one per session the Agent is running (beta.28 — the owner, 2026-10-20: the Dashboard when two
/// or more games run at once), hooked sessions first and each kind in the order it started. Until beta.28 there was one
/// card, which a hooked session took from an unhooked one, and a second game showed only as the status card's count.
/// </summary>
public ObservableCollection<LiveCaptureViewModel> LiveCards { get; } = [];
/// <summary>No session is running: one card says nothing is being captured.</summary>
[ObservableProperty]
private bool _liveIdle = true;
/// <summary>"2 games recording" beside the header from two sessions on; null for one or none.</summary>
[ObservableProperty]
private string? _liveCountText;
/// <summary>The cards side by side from two sessions on, two to a row.</summary>
[ObservableProperty]
private int _liveColumns = 1;
public LiveCaptureViewModel Live { get; } = new();
public ObservableCollection<RecentSessionViewModel> Recent { get; } = [];
@@ -206,58 +188,38 @@ public sealed partial class DashboardViewModel : ObservableObject
});
/// <summary>
/// Every session already running has its card (2026-09-23; one card each since beta.28): the Dashboard is rebuilt on
/// every visit, so one that started while another page was open had no start event here and read "Nothing is being
/// captured.". A card with no name yet — made by a tick that came before the session was known — gets its name here.
/// A session already running takes the idle card (2026-09-23): the Dashboard is rebuilt on every visit, so one that
/// started while another page was open had no start event here and read "Nothing is being captured.". A hooked
/// session is preferred over one recorded without measuring.
/// </summary>
private void SeedLive()
{
foreach (RunningSession session in _sessions?.Current ?? [])
if (Live.IsActive || _sessions?.Current is not { Count: > 0 } running)
{
if (Find(session.SessionGuid) is { } card)
{
if (card.GameName.Length == 0)
{
card.Seed(session);
}
continue;
}
var seeded = new LiveCaptureViewModel(session.SessionGuid);
seeded.Seed(session);
LiveCards.Add(seeded);
return;
}
Arrange();
Live.Seed(running.FirstOrDefault(static s => s.Tier == 1) ?? running[0]);
}
/// <summary>The four session events drive the cards, each its own session's; a completed session reloads the lists (07_IPC §Client behavior: the row is in SQLite).</summary>
/// <summary>The three session events drive the live card; a completed session reloads the lists (07_IPC §Client behavior: the row is in SQLite).</summary>
private void Dispatch(IpcEnvelope envelope)
{
switch (envelope.Type)
{
case IpcMessageType.SessionStarted when IpcCodec.Payload<SessionStartedEvent>(envelope) is { } started:
CardFor(started.SessionGuid).Start(started);
Arrange();
Live.Start(started);
break;
case IpcMessageType.SessionProgress when IpcCodec.Payload<SessionProgressEvent>(envelope) is { } progress:
// A tick is hooked: a session that attached since it started moves among the hooked ones.
CardFor(progress.SessionGuid).Update(progress);
Arrange();
Live.Update(progress);
break;
case IpcMessageType.SessionHeld when IpcCodec.Payload<SessionHeldEvent>(envelope) is { } held:
CardFor(held.SessionGuid).Hold(held);
Live.Hold(held);
break;
case IpcMessageType.SessionCompleted when IpcCodec.Payload<SessionCompletedEvent>(envelope) is { } completed:
// FR-3.8's notice is SessionNotices' (beta.23); the cards and the lists are this page's.
if (Find(completed.SessionGuid) is { } ended)
{
ended.Stop(completed);
LiveCards.Remove(ended);
}
Arrange();
// FR-3.8's notice is SessionNotices' (beta.23); the card and the lists are this page's.
Live.Stop(completed);
SeedLive();
Pending = LoadAsync();
break;
default:
@@ -265,47 +227,6 @@ public sealed partial class DashboardViewModel : ObservableObject
}
}
private LiveCaptureViewModel? Find(Guid sessionGuid) => LiveCards.FirstOrDefault(c => c.SessionGuid == sessionGuid);
/// <summary>
/// The card of <paramref name="sessionGuid"/>, made when its first event arrives: named from the running sessions when
/// they know it, else by its seed when they do (<see cref="SeedLive"/>).
/// </summary>
private LiveCaptureViewModel CardFor(Guid sessionGuid)
{
if (Find(sessionGuid) is { } card)
{
return card;
}
card = new LiveCaptureViewModel(sessionGuid);
if (_sessions?.Current.FirstOrDefault(s => s.SessionGuid == sessionGuid) is { } running)
{
card.Seed(running);
}
LiveCards.Add(card);
return card;
}
/// <summary>Hooked sessions first, each kind in the order it came — moved, never rebuilt, so a card keeps its bindings.</summary>
private void Arrange()
{
List<LiveCaptureViewModel> ordered = [.. LiveCards.OrderBy(static c => c.Tier == 1 ? 0 : 1)];
for (int i = 0; i < ordered.Count; i++)
{
int at = LiveCards.IndexOf(ordered[i]);
if (at != i)
{
LiveCards.Move(at, i);
}
}
LiveIdle = LiveCards.Count == 0;
LiveColumns = LiveCards.Count >= 2 ? 2 : 1;
LiveCountText = LiveCards.Count >= 2 ? string.Format(CultureInfo.CurrentCulture, Strings.Dashboard_Live_Count_Format, LiveCards.Count) : null;
}
private void Refresh()
{
AgentState = AgentStatusPresentation.Pill(_agent.State).Text;
@@ -10,7 +10,7 @@ using FrameLedger.Shared.Ipc;
namespace FrameLedger.App.ViewModels;
/// <summary>
/// One of the Dashboard's live capture cards (<c>08_UI</c> §Dashboard), fed by <c>SessionStarted</c> / <c>SessionProgress</c> /
/// The Dashboard's live capture card (<c>08_UI</c> §Dashboard), fed by <c>SessionStarted</c> / <c>SessionProgress</c> /
/// <c>SessionHeld</c> / <c>SessionCompleted</c>. Tier 1 shows measured settings as facts; the readout follows the FPS
/// display rule at 1 Hz, qualifier included, and since beta.12 the game's own memory. There is no sparkline: this said it
/// was PR-6's, and PR-6 shipped without one (<c>08_UI</c> §Dashboard).
@@ -19,9 +19,7 @@ namespace FrameLedger.App.ViewModels;
/// <b>A session that is not measured is shown too (2026-09-23).</b> Its name, its tier, how long it has run, the machine's
/// temperatures, and why nothing is measured — the same words its summary will use — with no readout at all. Until this
/// date the Agent announced only hooked sessions, and a hooking-off or refused game read "Nothing is being captured." for
/// as long as it ran. <b>A card is one session's (beta.28):</b> the Dashboard keeps one per running session
/// (<see cref="DashboardViewModel.LiveCards"/>); until then there was one card, which a hooked session took from an
/// unhooked one, and a second game was shown nowhere.
/// as long as it ran. When two sessions run, a hooked one takes the card.
/// </remarks>
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public sealed partial class LiveCaptureViewModel : ObservableObject
@@ -79,14 +77,6 @@ public sealed partial class LiveCaptureViewModel : ObservableObject
[ObservableProperty]
private string _memoryText = string.Empty;
/// <summary>A card for no session yet; its first start, seed or tick says whose it is.</summary>
public LiveCaptureViewModel()
{
}
/// <summary>A card for <paramref name="sessionGuid"/> (beta.28): an event of another session leaves it alone.</summary>
public LiveCaptureViewModel(Guid sessionGuid) => SessionGuid = sessionGuid;
public Guid? SessionGuid { get; private set; }
public static string Header => Strings.Dashboard_Live_Header;
@@ -130,8 +120,8 @@ public sealed partial class LiveCaptureViewModel : ObservableObject
private void Show(Guid sessionGuid, string? gameName, int tier, SessionHold? hold)
{
// A card is one session's (beta.28): another session has a card of its own.
if (SessionGuid is Guid shown && shown != sessionGuid)
// A hooked session takes the card from an unhooked one, never the other way round.
if (IsActive && SessionGuid is Guid shown && shown != sessionGuid && (Tier == 1 || tier != 1))
{
return;
}
+5 -13
View File
@@ -2778,11 +2778,8 @@ TEST_CASE("OpenGL: the injected Overlay hooks opengl32!wglSwapBuffers and record
"[guard][inject][shm][opengl]") {
// The harness's --opengl mode calls gdi32's SwapBuffers -- the route a real title
// takes -- and the Overlay's hook must see it through opengl32!wglSwapBuffers.
// Held 16 s and waited on for up to 12 (beta.28): the CI runner of 2026-10-20 ran this suite in 115 s and the hook,
// installed (apiMask said OpenGL), had recorded nothing in the 4 s the loop used to wait. The wait ends at the 20th
// record either way; the child is terminated when the case ends, so the longer hold costs nothing.
Child child;
if (!StartHarness(child, L"--opengl --hold-presenting 16")) {
if (!StartHarness(child, L"--opengl --hold-presenting 8")) {
DWORD code = 0;
GetExitCodeProcess(child.pi.hProcess, &code);
if (code == 77u) {
@@ -2798,13 +2795,11 @@ TEST_CASE("OpenGL: the injected Overlay hooks opengl32!wglSwapBuffers and record
MappedRing r;
REQUIRE(OpenRingFor(child.pi.dwProcessId, r));
for (int i = 0; i < 240 && r.st->writeIndex < 20; ++i) {
for (int i = 0; i < 80 && r.st->writeIndex < 20; ++i) {
++r.ctl->guardTicks;
Sleep(50);
}
INFO("writeIndex " << r.st->writeIndex << " apiMask 0x" << std::hex << r.st->apiMask << " hooks 0x"
<< r.st->hooksInstalledMask << std::dec << " status " << r.st->status << " harness "
<< (WaitForSingleObject(child.pi.hProcess, 0) == WAIT_TIMEOUT ? "running" : "gone"));
INFO("writeIndex " << r.st->writeIndex << " apiMask 0x" << std::hex << r.st->apiMask);
REQUIRE(r.st->writeIndex >= 20u);
CHECK((r.st->apiMask & (1u << fl::FL_API_OPENGL)) != 0u);
CHECK((r.st->hooksInstalledMask & fl::FL_HOOK_PRESENT) != 0u);
@@ -2838,10 +2833,8 @@ TEST_CASE("region 4 describes a swap chain on a real window: its window, its bac
// this one binds a D3D11 chain to a real (hidden, windowed) window. Exclusive fullscreen needs a real output and is
// the owner's measurement on real hardware -- here the claim is the one a runner can check: the swap chain SAID
// windowed.
// Held 16 s and waited on for up to 12, as the OpenGL case beside it (beta.28): the same 4 s wait, under the
// same load.
Child child;
if (!StartHarness(child, L"--hold-presenting-hwnd 16")) {
if (!StartHarness(child, L"--hold-presenting-hwnd 8")) {
DWORD code = 0;
GetExitCodeProcess(child.pi.hProcess, &code);
if (code == 77u) {
@@ -2857,11 +2850,10 @@ TEST_CASE("region 4 describes a swap chain on a real window: its window, its bac
MappedRing r;
REQUIRE(OpenRingFor(child.pi.dwProcessId, r));
for (int i = 0; i < 240 && r.st->writeIndex < 20; ++i) {
for (int i = 0; i < 80 && r.st->writeIndex < 20; ++i) {
++r.ctl->guardTicks;
Sleep(50);
}
INFO("writeIndex " << r.st->writeIndex << " status " << r.st->status);
REQUIRE(r.st->writeIndex >= 20u);
const auto* ring =
reinterpret_cast<const fl::FlFrameRecord*>(static_cast<unsigned char*>(r.base) + FL_SHM_RING_OFFSET);
@@ -9,9 +9,8 @@ using FrameLedger.Shared.Ipc;
namespace FrameLedger.App.Tests;
/// <summary>The Dashboard over a scratch ledger and a fake link: totals and recent from the tables; the live cards — one per running session since beta.28 — driven by the session events; a completed session reloads.</summary>
/// <summary>The Dashboard over a scratch ledger and a fake link: totals and recent from the tables; the live card driven by the three session events; a completed session reloads.</summary>
[Collection(StringsCultureCollection.Name)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the expected texts are resources that follow the UI culture")]
public sealed class DashboardViewModelTests
{
private sealed class FakeLink : IAgentLink
@@ -102,16 +101,15 @@ public sealed class DashboardViewModelTests
vm.Attach();
Task pending2 = vm.Pending;
await pending2;
vm.LiveCards.Should().BeEmpty();
vm.Live.IsActive.Should().BeFalse();
vm.RecentEmpty.Should().BeTrue();
var guid = Guid.NewGuid();
link.Raise(IpcMessageType.SessionStarted, new SessionStartedEvent(guid, game.Id, "Alpha", 4242, 1, DateTimeOffset.UtcNow));
LiveCaptureViewModel card = vm.LiveCards.Should().ContainSingle().Subject;
vm.LiveCountText.Should().BeNull("one game needs no count");
card.IsActive.Should().BeTrue();
card.WaitingForFrames.Should().BeTrue();
card.GameName.Should().Be("Alpha");
card.TierText.Should().Be(Strings.Tier_Hooked);
vm.Live.IsActive.Should().BeTrue();
vm.Live.WaitingForFrames.Should().BeTrue();
vm.Live.GameName.Should().Be("Alpha");
vm.Live.TierText.Should().Be(Strings.Tier_Hooked);
link.Raise(IpcMessageType.SessionProgress, new SessionProgressEvent
{
@@ -132,26 +130,22 @@ public sealed class DashboardViewModelTests
GameVramDedicatedMb = 4100,
GameRamPrivateMb = 2048,
});
card.WaitingForFrames.Should().BeFalse();
card.Readout.Kind.Should().Be(FpsReadoutKind.Presented);
card.UpscalerText.Should().Be("DLSS Quality");
card.RtActive.Should().BeTrue();
card.GpuTempText.Should().Contain("71");
card.MemoryText.Should().Be(GameMemoryText.Live(4100, 2048), "the game's own memory from the newest tick (beta.12)");
vm.Live.WaitingForFrames.Should().BeFalse();
vm.Live.Readout.Kind.Should().Be(FpsReadoutKind.Presented);
vm.Live.UpscalerText.Should().Be("DLSS Quality");
vm.Live.RtActive.Should().BeTrue();
vm.Live.GpuTempText.Should().Contain("71");
vm.Live.MemoryText.Should().Be(GameMemoryText.Live(4100, 2048), "the game's own memory from the newest tick (beta.12)");
// A progress for another session is that session's card (beta.28) and leaves this one alone; the completion of ours
// ends our card and reloads the lists.
var other = Guid.NewGuid();
link.Raise(IpcMessageType.SessionProgress, new SessionProgressEvent { SessionGuid = other, ElapsedS = 1, Presents5s = 10, PresentedQualifier = "census_not_run", FgMode = "na", RtActive = false });
card.RtActive.Should().BeTrue();
vm.LiveCards.Select(static c => c.SessionGuid).Should().Equal(guid, other);
// A progress for another session is ignored; the completion of ours ends the card and reloads the lists.
link.Raise(IpcMessageType.SessionProgress, new SessionProgressEvent { SessionGuid = Guid.NewGuid(), ElapsedS = 1, Presents5s = 10, PresentedQualifier = "census_not_run", FgMode = "na", RtActive = false });
vm.Live.RtActive.Should().BeTrue();
long id = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddMinutes(-2), seconds: 65);
link.Raise(IpcMessageType.SessionCompleted, new SessionCompletedEvent(guid, id, "normal", 1, "saved", "TargetExited"));
Task pending3 = vm.Pending;
await pending3;
card.IsActive.Should().BeFalse();
vm.LiveCards.Should().ContainSingle().Which.SessionGuid.Should().Be(other);
vm.Live.IsActive.Should().BeFalse();
vm.Recent.Should().ContainSingle();
}
@@ -177,22 +171,20 @@ public sealed class DashboardViewModelTests
Task loaded = vm.Pending;
await loaded;
LiveCaptureViewModel card = vm.LiveCards.Should().ContainSingle("until 2026-09-23 this read \"Nothing is being captured.\" for as long as the game ran").Subject;
card.IsActive.Should().BeTrue();
card.IsHeld.Should().BeTrue();
card.GameName.Should().Be("Alpha");
vm.Live.IsActive.Should().BeTrue("until 2026-09-23 this read \"Nothing is being captured.\" for as long as the game ran");
vm.Live.IsHeld.Should().BeTrue();
vm.Live.GameName.Should().Be("Alpha");
vm.RunningSessions.Should().Be("1");
link.Raise(IpcMessageType.SessionHeld, new SessionHeldEvent(guid, 30));
card.ElapsedText.Should().NotBeEmpty();
vm.Live.ElapsedText.Should().NotBeEmpty();
long id = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddMinutes(-1), seconds: 30);
link.Raise(IpcMessageType.SessionCompleted, new SessionCompletedEvent(guid, id, "normal", 2, "saved", "RefusedHookNotEnabled", game.Id, "Alpha"));
Task reloaded = vm.Pending;
await reloaded;
vm.LiveCards.Should().BeEmpty();
vm.LiveIdle.Should().BeTrue();
vm.Live.IsActive.Should().BeFalse();
strip.Shown.Should().ContainSingle().Which.Body.Should().Contain("Alpha");
vm.RunningSessions.Should().Be("0");
}
@@ -213,109 +205,19 @@ public sealed class DashboardViewModelTests
var held = Guid.NewGuid();
link.Raise(IpcMessageType.SessionStarted, new SessionStartedEvent(hooked, 1, "Hooked", 1, 1, DateTimeOffset.UtcNow));
link.Raise(IpcMessageType.SessionStarted, new SessionStartedEvent(held, 2, "Held", 2, 2, DateTimeOffset.UtcNow, new SessionHold("RefusedHookNotEnabled")));
vm.LiveCards.Select(static c => c.GameName).Should().Equal(["Hooked", "Held"], "each game its card since beta.28, a hooked one first");
vm.Live.GameName.Should().Be("Hooked", "a hooked session keeps the card");
link.Raise(IpcMessageType.SessionCompleted, new SessionCompletedEvent(held, null, "normal", 2, "discarded", "RefusedHookNotEnabled", 2, "Held"));
Task first = vm.Pending;
await first;
strip.Shown.Should().ContainSingle().Which.Body.Should().Contain("Held", "the completed session's own name, not a card's");
vm.LiveCards.Should().ContainSingle().Which.GameName.Should().Be("Hooked");
strip.Shown.Should().ContainSingle().Which.Body.Should().Contain("Held", "the completed session's own name, not the card's");
vm.Live.GameName.Should().Be("Hooked");
link.Raise(IpcMessageType.SessionCompleted, new SessionCompletedEvent(hooked, null, "interrupted", 1, "faulted", "SessionFaulted", 1, "Hooked"));
Task second = vm.Pending;
await second;
strip.Shown.Should().ContainSingle("a faulted session is the strip's CaptureError already; \"discarded\" would say what did not happen");
vm.LiveCards.Should().BeEmpty();
}
/// <summary>
/// beta.28 (the owner, 2026-10-20: the Dashboard when two or more games run at once): each running session has its card,
/// hooked ones first and each kind in the order it started; each event reaches its own session's card; the header counts
/// the games from two on, and the cards stand two to a row.
/// </summary>
[Fact]
public async Task TwoGamesRecordingAtOnceEachHaveTheirOwnCardAndTheirOwnEvents()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
(FakeLink link, LiveSessions sessions, Guid held, Guid hooked) = TwoRecording();
using LiveSessions owned = sessions;
DashboardViewModel vm = await AttachedAsync(s, link, sessions);
vm.LiveCards.Select(static c => c.GameName).Should().Equal(["Hooked second", "Held first"], "a hooked session first");
vm.LiveCountText.Should().Be(string.Format(System.Globalization.CultureInfo.CurrentCulture, Strings.Dashboard_Live_Count_Format, 2));
vm.LiveColumns.Should().Be(2);
vm.LiveIdle.Should().BeFalse();
link.Raise(IpcMessageType.SessionProgress, new SessionProgressEvent { SessionGuid = hooked, ElapsedS = 60, Presents5s = 600, PresentedFps5s = 120, PresentedQualifier = "no_fg_runtime", FgMode = "na", RtActive = true });
link.Raise(IpcMessageType.SessionHeld, new SessionHeldEvent(held, 300, GpuTempC: 66));
LiveCaptureViewModel hookedCard = vm.LiveCards[0];
LiveCaptureViewModel heldCard = vm.LiveCards[1];
hookedCard.RtActive.Should().BeTrue();
hookedCard.Readout.Kind.Should().Be(FpsReadoutKind.Presented);
hookedCard.ElapsedText.Should().Contain(Formats.Duration(60));
heldCard.IsHeld.Should().BeTrue("a tick of the other session does not reach this card");
heldCard.ElapsedText.Should().Contain(Formats.Duration(300));
heldCard.RtActive.Should().BeFalse();
}
[Fact]
public async Task AThirdGameHasACardAndEachEndLeavesTheOthersInTheOrderTheyStarted()
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
(FakeLink link, LiveSessions sessions, Guid held, Guid hooked) = TwoRecording();
using LiveSessions owned = sessions;
DashboardViewModel vm = await AttachedAsync(s, link, sessions);
LiveCaptureViewModel heldCard = vm.LiveCards[1];
var third = Guid.NewGuid();
link.Raise(IpcMessageType.SessionStarted, new SessionStartedEvent(third, 3, "Third", 43, 2, DateTimeOffset.UtcNow, new SessionHold("RefusedHookNotEnabled")));
vm.LiveCards.Select(static c => c.GameName).Should().Equal(["Hooked second", "Held first", "Third"]);
vm.LiveCountText.Should().Be(string.Format(System.Globalization.CultureInfo.CurrentCulture, Strings.Dashboard_Live_Count_Format, 3));
await CompleteAsync(vm, link, hooked, 1, "Hooked second");
vm.LiveCards.Select(static c => c.GameName).Should().Equal(["Held first", "Third"]);
vm.LiveCards[0].Should().BeSameAs(heldCard, "a card is moved, never rebuilt");
await CompleteAsync(vm, link, held, 2, "Held first");
vm.LiveCountText.Should().BeNull("one game left");
vm.LiveColumns.Should().Be(1);
await CompleteAsync(vm, link, third, 2, "Third");
vm.LiveCards.Should().BeEmpty();
vm.LiveIdle.Should().BeTrue();
}
/// <summary>A held game that started first and a hooked one that started after it, as the Agent's status lists them.</summary>
private static (FakeLink Link, LiveSessions Sessions, Guid Held, Guid Hooked) TwoRecording()
{
var held = Guid.NewGuid();
var hooked = Guid.NewGuid();
DateTimeOffset now = DateTimeOffset.UtcNow;
var link = new FakeLink
{
Status = new StatusAck("recording", null, null,
[
new ActiveSession(held, 1, "Held first", 41, 2, now.AddMinutes(-5), new SessionHold("RefusedHookNotEnabled")),
new ActiveSession(hooked, 2, "Hooked second", 42, 1, now.AddMinutes(-1), null),
]),
};
return (link, new LiveSessions(link), held, hooked);
}
private static async Task<DashboardViewModel> AttachedAsync(ScratchLedger s, FakeLink link, LiveSessions sessions)
{
var vm = new DashboardViewModel(link, s.Library, new GameSelection(), new FakeNavigator(), new NoSummaries(), sessions: sessions);
vm.Attach();
Task loaded = vm.Pending;
await loaded.ConfigureAwait(true);
return vm;
}
private static async Task CompleteAsync(DashboardViewModel vm, FakeLink link, Guid session, int tier, string name)
{
link.Raise(IpcMessageType.SessionCompleted, new SessionCompletedEvent(session, null, "normal", tier, "discarded", "TargetExited", 0, name));
Task reloaded = vm.Pending;
await reloaded.ConfigureAwait(true);
vm.Live.IsActive.Should().BeFalse();
}
/// <summary>
/// beta.23: a Dashboard hears the Agent only while its page is on screen. Every visit made a new one and none went
@@ -344,8 +246,8 @@ public sealed class DashboardViewModelTests
var guid = Guid.NewGuid();
link.Raise(IpcMessageType.SessionStarted, new SessionStartedEvent(guid, game.Id, "Alpha", 4242, 1, DateTimeOffset.UtcNow));
visits[^1].LiveCards.Should().ContainSingle("the Dashboard on screen follows the session");
visits.Take(4).Should().OnlyContain(static v => v.LiveCards.Count == 0, "a Dashboard that was navigated away from hears nothing");
visits[^1].Live.IsActive.Should().BeTrue("the Dashboard on screen follows the session");
visits.Take(4).Should().OnlyContain(static v => !v.Live.IsActive, "a Dashboard that was navigated away from hears nothing");
long id = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow.AddMinutes(-2), seconds: 65);
link.Raise(IpcMessageType.SessionCompleted, new SessionCompletedEvent(guid, id, "normal", 1, "saved", "TargetExited"));
@@ -10,8 +10,8 @@ namespace FrameLedger.App.Tests;
/// <summary>
/// The live card's two kinds of session (2026-09-23): a hooked one reads its readout; one held without measuring reads its
/// name, its tier, its elapsed time and why — never a readout. Since beta.28 a card is one session's, and another session's
/// events leave it alone. In the culture collection because it compares against the resources it reads.
/// name, its tier, its elapsed time and why — never a readout — and a hooked session takes the card from it, never the
/// reverse. In the culture collection because it compares against the resources it reads.
/// </summary>
[Collection(StringsCultureCollection.Name)]
public sealed class LiveCaptureViewModelTests
@@ -71,27 +71,21 @@ public sealed class LiveCaptureViewModelTests
card.WaitingForFrames.Should().BeTrue();
}
/// <summary>beta.28: the Dashboard keeps a card per session, so a card never changes hands — until then a hooked session took the one card from a held one.</summary>
[Fact]
public void ACardIsOneSessionsAndAnotherSessionsEventsLeaveItAlone()
public void AHookedSessionTakesTheCardFromAHeldOneNeverTheReverse()
{
var guid = Guid.NewGuid();
var card = new LiveCaptureViewModel(guid);
var card = new LiveCaptureViewModel();
var hooked = Guid.NewGuid();
card.Start(Started(Guid.NewGuid(), 1, "Another"));
card.IsActive.Should().BeFalse("another session's start is that session's card's");
card.Start(Started(guid, 2, "Held", new SessionHold("RefusedHookNotEnabled")));
card.Start(Started(Guid.NewGuid(), 1, "Hooked elsewhere"));
card.Seed(new RunningSession(Guid.NewGuid(), 9, "Another hooked", 1, DateTimeOffset.UnixEpoch, Hold: null));
card.Update(new SessionProgressEvent { SessionGuid = Guid.NewGuid(), ElapsedS = 5, Presents5s = 10, PresentedQualifier = "census_not_run", FgMode = "na" });
card.SessionGuid.Should().Be(guid);
card.GameName.Should().Be("Held");
card.IsHeld.Should().BeTrue();
card.Start(Started(guid, 1, "Held"));
card.Tier.Should().Be(1, "its own session attached");
card.Start(Started(Guid.NewGuid(), 2, "Held", new SessionHold("RefusedHookNotEnabled")));
card.Start(Started(hooked, 1, "Hooked"));
card.SessionGuid.Should().Be(hooked);
card.IsHeld.Should().BeFalse();
card.Start(Started(Guid.NewGuid(), 2, "Another held", new SessionHold("RefusedHookNotEnabled")));
card.Seed(new RunningSession(Guid.NewGuid(), 9, "Another hooked", 1, DateTimeOffset.UnixEpoch, Hold: null));
card.SessionGuid.Should().Be(hooked, "the card keeps a hooked session until it ends");
card.GameName.Should().Be("Hooked");
}
}
@@ -15,7 +15,6 @@ using FrameLedger.Application.Settings;
using FrameLedger.Application.TriState;
using FrameLedger.Domain.Metrics;
using FrameLedger.Infrastructure.Persistence;
using FrameLedger.Shared.Ipc;
namespace FrameLedger.App.Tests;
@@ -89,16 +88,8 @@ public sealed partial class PagesLoadTests
var strip = new NoStrip();
var consent = new HookingConsent(new NoAgent(), new NoPrompt());
// The view models load off the STA thread; the pages bind to them on it. beta.28: two games recording at once, a
// hooked one and one held, so the Dashboard's two cards are drawn and read in both themes.
var recording = new RecordingAgent(
[
new ActiveSession(Guid.NewGuid(), gameId, "Alpha", 41, 1, DateTimeOffset.UtcNow.AddMinutes(-2), null),
new ActiveSession(Guid.NewGuid(), gameId, "Beta", 42, 2, DateTimeOffset.UtcNow.AddMinutes(-1), new SessionHold("RefusedHookNotEnabled")),
]);
LiveSessions live = Own(new LiveSessions(recording));
Dashboard = new DashboardViewModel(recording, s.Library, selection, nav, new NoSummaries(), sessions: live);
Dashboard.Attach();
// The view models load off the STA thread; the pages bind to them on it.
Dashboard = new DashboardViewModel(new NoAgent(), s.Library, selection, nav, new NoSummaries());
Task pending1 = Dashboard.Pending;
await pending1.ConfigureAwait(false);
Games = new GamesViewModel(s.Library, selection, nav, new AddGameFlow(s.Library, new NoPicker(), selection, nav, strip));
@@ -203,37 +194,6 @@ public sealed partial class PagesLoadTests
}
}
/// <summary>An Agent that answers with the sessions it is recording and says nothing else (beta.28's two live cards).</summary>
private sealed class RecordingAgent(IReadOnlyList<ActiveSession> sessions) : IAgentLink
{
public AgentConnectionState State => AgentConnectionState.Connected;
public StatusAck? Status { get; } = new("recording", null, null, sessions);
public HelloAck? Hello => null;
public bool IsConnected => true;
public event EventHandler? Changed
{
add { }
remove { }
}
public event EventHandler<AgentEventArgs>? EventReceived
{
add { }
remove { }
}
public Task<IpcEnvelope> RequestAsync<TRequest>(string type, TRequest payload, CancellationToken ct = default)
where TRequest : class => throw new NotSupportedException();
public void SetLaunchHold(bool hold)
{
}
}
/// <summary>A folder the test made, deleted with the surfaces.</summary>
private sealed class DeletesOnDispose(string directory) : IDisposable
{