* perf(tooling): compositing probe, report command and route-wide clip-mask guard
Make the instrument that found the dashboard's clip masks part of the
repository: `src/performance/compositing-probe.ts` reads the layer tree
over CDP (bounds in device pixels, compositing reasons and owner nodes,
waiting for Blink's layer debug info), classifies synthesized clip masks
(no owner node and no compositing reason) and reads the renderer's
`cc/tile_memory` from a memory-infra dump. `pnpm run perf:compositing`
seeds one profile against the Xtream mock on a dedicated port, serves the
artwork from memory, fixes the window at 1600x1000 and records tile and
image memory, layer counts, the largest layers, masks and tile warnings
for Live TV, the movie and series details, the dashboard (idle,
crossfade, scrolled) and settings into
dist/performance/compositing/<timestamp>/summary.json and a console
table. Both helpers have node:test coverage in the performance harness.
The dashboard-only compositing E2E becomes `compositing.e2e.ts` and
guards Live TV, a movie detail, a series detail and the dashboard in one
launch, with the backdrop-filtered controls confirmed as composited
layers on the dashboard and the movie detail.
The rule now lives where it triggers: a Rendering Cost section in the
theme/style skill, a validation line in the UI design skill, a context
map row, and a Compositing budget section in the performance journeys
contract (budget, mask mechanism, instruments, why megabytes are
evidence rather than a ratchet). Validation map and README mention the
command.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* perf(tooling): sample the dashboard idle reading with rotation paused
The hero advances after 8 s, so a 9 s wait sampled the next slide one
second into its zoom (backdrop scale 1.116 instead of 1.1, the previous
slide's tiles still pooled): 224 MB read as idle, 122 MB with rotation
paused and the zoom and tile pool settled. The warning delta and its
checkpoint are now taken at one boundary after the sampling, so a
"tile memory limits exceeded" line logged while the layers or the dump
are read counts for that route instead of for none. The report's test
artifacts go under dist/test-results like the other configs'.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* perf(tooling): retry a memory dump that carries no renderer tile memory
One reading of seven came back without `cc/tile_memory`: the dump's
trace events reach the buffer shortly after the request resolves, and
a process can skip a dump it is busy for. The capture now waits briefly
before ending the trace and retries up to three times before a reading
stays null.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* perf(tooling): run the compositing report with motion enabled
With the OS set to reduced motion the hero neither rotates nor renders
its pause button, so the report's click timed out before the summary was
written. The report now emulates `prefers-reduced-motion: no-preference`,
which also keeps the idle and crossfade readings on the same animation
set on every machine.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* perf(tooling): sample the crossfade frozen, count split stderr lines, drop stale layer samples
Review findings on the pushed head, plus the CI failure:
- A layer that vanished between the LayerTree snapshot and its reasons
query was kept with empty reasons; without an owner node it would pass
for a synthesized mask. Such a snapshot is now discarded and retaken.
- The crossfade reading sampled layers, owners and memory across the
700 ms fade, so the row depended on how long the sampling took. The
page's animations are frozen 300 ms into the fade while the reading is
taken, resumed afterwards, and the incoming slide's zoom is allowed to
finish before the scrolled reading.
- A stderr chunk can end mid-line; the warning counter now keeps the
unfinished line for the next chunk.
- The mock server's launch spec lists the new Playwright config.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* test(performance): add the J1 launch-to-usable journey benchmark
Implements plan items A1, A3 (J1 only) and the minimal A4 from
.plans/2026-09-25-performance-journeys-ratchet.md.
- journey-renderer-probe.ts: init-script probe counting DOM mutations,
layout shifts and long tasks until the first source card is visible on
/workspace with the splash removed; unit-tested with jsdom fixtures.
- journey-main-ipc-capture.ts: counts bridge invocations from the preload's
renderer-API trace channel up to a sentinel call the probe fires, so the
IPC counter is exact without touching production code.
- launch.journey.ts + playwright.journeys.config.ts: seeded profile (one
M3U source, one Xtream portal on the loopback mock), one warm-up and five
measured iterations, fresh process and data directory each, writing
dist/performance/journeys/<timestamp>/summary.json with exact counters
and P50/P90 wall-clock.
- Nx target electron-backend-e2e:journeys and root script perf:journeys.
- docs/architecture/performance-journeys.md, README, context and
validation map entries.
renderer.cdTicksToFirstCard and main.sqlStatementsBeforeReadyToShow are
reported as unavailable with the reason instead of being faked.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* test(performance): gate the renderer load so the probes never race startup
Review follow-up for #1698.
- journey-renderer-gate.cjs: a main-process hook loaded with `-r` (the
mechanism Playwright uses for its own loader) makes the first
loadFile/loadURL navigate to about:blank and holds the real load until
the test releases it. Playwright reports no page before a navigation
commits, so this is what lets the renderer probe be registered on the
page before the real document exists; the IPC capture is installed
before the release too. A safety timeout releases the gate on its own
and marks the iteration invalid. Unit-tested with a fake BrowserWindow.
- launch-journey-app.ts: registers the probe on the parked page, releases
the gate, waits for the real document to commit, fails fast when the
probe is missing, and refuses an iteration whose gate timed out, saw a
second load, or released before the probe was in place.
- journey-renderer-probe.ts: entries delivered live after the terminal
batch are buffered and filtered by the same cutoff as queued ones, and
the cutoff is sampled in a timer queued from the first rAF, i.e. after
the card's frame is painted, so the render task's long task and layout
shift are consistently included.
- launch-journey-record.ts: layoutShiftScore rounded to three decimals; a
0.0001 shift flipped in and out of the cutoff between iterations.
- playwright.journeys.config.ts: reuse a mock server left on the journeys
port locally (its fixtures are deterministic); CI still starts its own.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* test(performance): validate the journey gate after the probe completes
Codex follow-up on #1698: the gate state returned by release() cannot see a
reload or recovery navigation that happens before the first card. Re-read the
live state once the renderer probe has finished and validate that instead,
so an iteration spanning an extra navigation is rejected.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* test(performance): fail an iteration whose performance observers were unavailable
Codex follow-up on #1698: a renderer that cannot observe layout-shift or
longtask entries used to pass the probe with zero counters, which a ratchet
could not tell apart from a genuine zero. The probe assertion now rejects
such an iteration and names the missing observer.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: 4gray <fourgray@proton.me>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
- Implemented tests for importing M3U playlists via native dialog.
- Added smoke tests for loading Xtream and Stalker content through IPC.
- Created tests to verify persistence of remote control settings across app restarts.
- Updated smoke tests to check for main window properties and workspace content rendering.
refactor(electron-backend): enhance store service and database path handling
- Modified store service to use a dynamic configuration directory based on environment.
- Refactored database connection to utilize new path utility functions for better path management.
fix(e2e): improve test selectors and structure for better reliability
- Updated test selectors in web-e2e tests to use role-based queries for better accessibility.
- Refactored settings tests to reduce redundancy and improve clarity.
chore(e2e): update TypeScript configuration for better inclusion of test files
- Adjusted tsconfig.json to ensure proper inclusion of e2e test files.
Entire-Checkpoint: bb9a8e2e351e
Add a new Electron smoke test suite using Playwright to verify the
packaged application starts, renders the main window, and exposes
expected window properties. The tests launch the built Electron main
bundle, locate the primary (non-DevTools) window, wait for DOM load,
and assert the title contains "IPTVnator". They also check window
visibility and bounds, validate rendered body content, and capture
screenshots to dist/test-results/electron-backend-e2e for debugging.
Include helpers to resolve project paths, ensure the screenshot
directory exists, and robustly find the main application window. Set
NODE_ENV and ELECTRON_IS_DEV to ensure the app loads built artifacts.