* 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>
7.7 KiB
Agent context map
Read the row for your task before editing. For a cross-domain change, read each affected contract. This is navigation, not a request to load every linked file. Common constraints remain in AGENTS.md; Claude imports it. Repository skill frontmatter defines triggers. If your client does not discover a listed skill automatically, read its SKILL.md directly. Optional global tools are not prerequisites for reading repository contracts.
Development and maintenance
| Area / code ownership | Canonical documents | Repository skill |
|---|---|---|
| Bootstrap, project placement, dependencies, aliases and lint configuration; root Nx config and project-local project.json files | Nx boundaries, security overrides | Nx architecture |
| Angular conventions; docs and skills maintenance | Agent workflow | Use the area's skill below |
Unit, E2E, lint and coverage; tools/coverage |
Validation map | Use the area's validation section |
Performance journeys, counters, benchmark probes and the CI ratchet; apps/electron-backend-e2e/src/journeys, apps/electron-backend-e2e/src/performance, tools/performance |
Performance journeys | Read the contract directly |
Electron entry/events/preload and CDP; apps/electron-backend |
Debugging and trace flags, Electron security | Use the available global electron skill for automation |
Releases, notes, screenshots, native assets, Linux manager metadata; tools/release |
Release pipeline, note format | Release notes, release cut |
Data, sources and networking
| Area / code ownership | Required contracts | Repository skill |
|---|---|---|
SQLite schema/startup; libs/shared/database; Electron DB events/workers/operations |
DB worker, migration ownership and tests | SQLite worker |
M3U import/state/player, XMLTV, source lifecycle, startup readiness and OS file opening; libs/m3u-state, libs/playlist, libs/epg |
M3U module, adding sources across layers | Read both contracts when adding a source |
Xtream API/store/data sources and routed views; libs/portal/xtream |
Xtream compatibility, category management, detail navigation | Xtream |
Stalker/Ministra protocol, identity, sessions and routed views; libs/portal/stalker |
Stalker portal, Stalker EPG for EPG work, store API baseline for store API changes | Stalker |
Browser runtime, HTTP proxies, redirects and backend networking; apps/web-backend, libs/shared/host-health |
PWA/self-hosting, connectivity guard, Electron security for desktop boundary changes | Read the affected runtime contract |
| Source health and selective cleanup; portal shared data access | Desktop source health, subscription expiry | Read the affected provider skill |
| Backup and restore; playlist persistence | Backup/restore, database migrations | Read the affected persistence skill |
Playback, navigation and UI
| Area / code ownership | Required contracts | Repository skill |
|---|---|---|
Web engines, controls, tracks, PiP, radio and display sleep; libs/ui/playback |
Player controls, inline playback/diagnostics/recovery | Read the contract directly |
Embedded MPV, platform engines, addon, pinned runtime and packaging; Electron native services, tools/embedded-mpv |
Native MPV, runtime build and licensing | Read the contract directly |
| Live panels, keyboard focus, grid/layout conventions; shared UI and portal views | UI guidelines, detail navigation | UI design, theme/style |
Workspace routes, title bar, switcher, collections and dashboard; libs/workspace |
Workspace shell, dashboard, collection/detail navigation | UI/theme skills for visible changes |
Remote control, playback queue, channel return and shortcuts; libs/ui/remote-control, apps/remote-control-web |
Remote control | Provider skill when queue ownership changes |
Downloads, offline details, catch-up and file availability; libs/portal/downloads |
Download manager, provider contract for URL resolution | Read the affected provider skill |
VOD source discovery, factual metadata and failover; libs/portal/shared/data-access |
VOD multi-source | Xtream |
TMDB enrichment, artwork, actors and recommendations; libs/services/src/lib/tmdb |
TMDB contracts, dashboard | UI skill for rendering changes |
| Timezones, catch-up formatting and EPG display offsets | Date handling, Xtream compatibility, M3U EPG | Affected provider skill |
Website, blog and download pages; apps/website |
Website README | Use an available website skill |
Mock servers and fictional release fixtures; apps/stalker-mock-server, apps/xtream-mock-server |
Stalker mock, Xtream mock, release screenshot contract | Release-cut for release captures |
Maintenance rules
Keep unique behavior contracts in the authoritative document, procedures in a
skill or development guide, and universal constraints in AGENTS.md. Update this
map when ownership or a canonical destination changes. Preserve release skill
mirrors; do not create extra copies of other contracts for individual agents.
Use normal Markdown links for document destinations so pnpm run agents:validate
can check them. Do not add root imports for the linked documents.
The migration ledger explains how the original root instructions were accounted for. It is historical audit evidence, not another source of current runtime policy or required task context.