diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md new file mode 100644 index 000000000..a713920c1 --- /dev/null +++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md @@ -0,0 +1,59 @@ +# PR_26175_DELTA_008-replay-clone-service-tests + +## Summary + +Team Delta moved `ReplayTimeline` clone operations onto the shared runtime clone helper and added replay service tests for the no-`structuredClone` fallback path. + +The replay model and replay system already used `cloneRuntimeValue(...)`; this PR finishes the timeline surface so replay snapshots, returned entries, and replacement frames use the same shared clone behavior. + +## Scope + +- Team: Delta +- Branch: `PR_26175_DELTA_008-replay-clone-service-tests` +- Runtime file changed: `src/engine/replay/ReplayTimeline.js` +- Test file changed: `tests/replay/ReplayTimeline.test.mjs` +- Service test command added: `npm run test:service:replay-clone` +- Site-wide command preserved: `npm test` + +## Runtime Impact + +PASS - Replay timeline cloning remains backward compatible and now works when `structuredClone` is unavailable. + +## Requirement Checklist + +| Requirement | Status | Notes | +|---|---|---| +| One PR purpose only | PASS | Replay clone service testability only. | +| Team Delta ownership only | PASS | Replay runtime and shared runtime test coverage are Delta-owned. | +| No team-specific test runner | PASS | No Delta-named runner or command added. | +| No `scripts/run-delta-runtime-validation.mjs` | PASS | File was not added. | +| No `test:delta-runtime` | PASS | Script was not added. | +| Testing organized by service/page level | PASS | Added `test:service:replay-clone`. | +| Keep `npm test` as site-wide command | PASS | Existing `npm test` is unchanged. | +| No UI changes | PASS | No UI files changed. | +| No browser-owned product data | PASS | Replay tests use in-memory runtime snapshots only. | +| No silent fallbacks or hidden defaults | PASS | Fallback clone path is explicit through `cloneRuntimeValue(...)`. | + +## Validation Lane Report + +| Command | Status | Notes | +|---|---|---| +| `node --check src/engine/replay/ReplayTimeline.js` | PASS | Replay timeline syntax valid. | +| `node --check tests/replay/ReplayTimeline.test.mjs` | PASS | Replay test syntax valid. | +| `npm run test:service:replay-clone` | PASS | 2 targeted replay test files passed. | +| `git diff --check` | PASS | No whitespace errors before report generation. | +| `npm run codex:review-artifacts` | PASS | Regenerated `codex_review.diff` and `codex_changed_files.txt`. | + +## Manual Validation Notes + +- Confirmed `ReplayTimeline` no longer calls `structuredClone` directly. +- Confirmed returned timeline entries are cloned and cannot mutate stored snapshots. +- Confirmed replacement snapshots are cloned before storage. +- Playwright was not run; this is Node replay service coverage. + +## ZIP + +Expected repo-structured delta ZIP: + +`tmp/PR_26175_DELTA_008-replay-clone-service-tests_delta.zip` + diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md new file mode 100644 index 000000000..c71a5db85 --- /dev/null +++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md @@ -0,0 +1,11 @@ +# PR_26175_DELTA_008 Branch Validation + +| Check | Status | Evidence | +|---|---|---| +| Returned to `main` before branch | PASS | Checked out `main` after PR_26175_DELTA_007 draft PR creation. | +| Pulled latest `main` | PASS | `git pull --ff-only` fast-forwarded to `41eaa1dcd`. | +| Local/origin sync before branch | PASS | `git rev-list --left-right --count main...origin/main` returned `0 0`. | +| Worktree clean before branch | PASS | `git status --short` returned no entries. | +| Working branch | PASS | `PR_26175_DELTA_008-replay-clone-service-tests`. | +| Direct commit to `main` avoided | PASS | Changes were made only on the PR branch. | + diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md new file mode 100644 index 000000000..f5d6ac905 --- /dev/null +++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md @@ -0,0 +1,9 @@ +# PR_26175_DELTA_008 Manual Validation Notes + +- Reviewed changed files for replay clone scope. +- Confirmed no UI files changed. +- Confirmed no persisted browser-owned product data was introduced. +- Confirmed no `scripts/run-delta-runtime-validation.mjs` file was added. +- Confirmed no `test:delta-runtime` script was added. +- Confirmed `npm test` remains the site-wide/all-tests command. + diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md new file mode 100644 index 000000000..32c102507 --- /dev/null +++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md @@ -0,0 +1,11 @@ +# PR_26175_DELTA_008 Requirements Checklist + +| Requirement | Status | Notes | +|---|---|---| +| Branch from updated main | PASS | Branch created after pull and sync check. | +| Build smallest scoped change | PASS | Updated replay timeline clone path and focused replay tests. | +| Validate targeted tests | PASS | `npm run test:service:replay-clone` passed. | +| Required reports created | PASS | PR report, branch validation, checklist, validation lane, manual notes, review diff, changed files. | +| Repo-structured ZIP created | PASS | `tmp/PR_26175_DELTA_008-replay-clone-service-tests_delta.zip`. | +| Open PR | PENDING | Opened after commit and push. | +| Stop before merge approval | PASS | This PR is draft/open only; no merge performed. | diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md new file mode 100644 index 000000000..7c5688af1 --- /dev/null +++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md @@ -0,0 +1,20 @@ +# PR_26175_DELTA_008 Validation Lane + +## Targeted Lane + +`npm run test:service:replay-clone` + +## Results + +| Command | Result | +|---|---| +| `node --check src/engine/replay/ReplayTimeline.js` | PASS | +| `node --check tests/replay/ReplayTimeline.test.mjs` | PASS | +| `npm run test:service:replay-clone` | PASS | +| `git diff --check` | PASS | + +## Notes + +- The service lane is replay-focused and not named for Team Delta. +- Full `npm test` was not run because this PR is scoped to replay clone service coverage. + diff --git a/docs_build/dev/reports/codex_changed_files.txt b/docs_build/dev/reports/codex_changed_files.txt index 4dd326015..9e2afd5c6 100644 --- a/docs_build/dev/reports/codex_changed_files.txt +++ b/docs_build/dev/reports/codex_changed_files.txt @@ -1,31 +1,26 @@ -# git diff --name-only pr/26177-CHARLIE-034-startup-runtime-report-cleanup -- -assets/theme-v2/css/status.css -assets/theme-v2/css/tables.css -docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md -docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md -docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md -docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md -docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md -docs_build/dev/reports/codex_changed_files.txt -docs_build/dev/reports/codex_review.diff -docs_build/dev/reports/coverage_changed_js_guardrail.txt -docs_build/dev/reports/playwright_v8_coverage_report.txt - # git status --short - M docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md +M docs_build/dev/reports/codex_changed_files.txt M docs_build/dev/reports/codex_review.diff - M docs_build/dev/reports/coverage_changed_js_guardrail.txt + M package.json + M src/engine/replay/ReplayTimeline.js + M tests/replay/ReplayTimeline.test.mjs +?? docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md +?? docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md +?? docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md +?? docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md +?? docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md + +# git ls-files --others --exclude-standard +docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md +docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md +docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md +docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md +docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md -# git diff --stat pr/26177-CHARLIE-034-startup-runtime-report-cleanup -- - assets/theme-v2/css/status.css | 52 ++ - assets/theme-v2/css/tables.css | 37 ++ - ...PR_26177_CHARLIE_035-system-health-ui-polish.md | 25 + - ...35-system-health-ui-polish_branch-validation.md | 14 + - ...tem-health-ui-polish_manual-validation-notes.md | 8 + - ...stem-health-ui-polish_requirements-checklist.md | 12 + - ..._035-system-health-ui-polish_validation-lane.md | 10 + - docs_build/dev/reports/codex_changed_files.txt | 57 +- - docs_build/dev/reports/codex_review.diff | 617 +++++++-------------- - .../dev/reports/coverage_changed_js_guardrail.txt | 4 +- - .../dev/reports/playwright_v8_coverage_report.txt | 10 +- - 11 files changed, 382 insertions(+), 464 deletions(-) +# git diff --stat +docs_build/dev/reports/codex_changed_files.txt | 51 +- + docs_build/dev/reports/codex_review.diff | 794 ++++++++++++++++++------- + package.json | 1 + + src/engine/replay/ReplayTimeline.js | 7 +- + tests/replay/ReplayTimeline.test.mjs | 25 + + 5 files changed, 628 insertions(+), 250 deletions(-) \ No newline at end of file diff --git a/docs_build/dev/reports/codex_review.diff b/docs_build/dev/reports/codex_review.diff index f3fb5cb1d..d75972e26 100644 --- a/docs_build/dev/reports/codex_review.diff +++ b/docs_build/dev/reports/codex_review.diff @@ -1,245 +1,1107 @@ -diff --git a/assets/theme-v2/css/status.css b/assets/theme-v2/css/status.css -index a82c83065..8fdef0123 100644 ---- a/assets/theme-v2/css/status.css -+++ b/assets/theme-v2/css/status.css -@@ -289,3 +289,55 @@ body.tool-focus-mode .tool-center-panel { - max-width: 30vw - } - } +diff --git a/docs_build/dev/reports/codex_changed_files.txt b/docs_build/dev/reports/codex_changed_files.txt +index 4dd326015..c90ad16a6 100644 +--- a/docs_build/dev/reports/codex_changed_files.txt ++++ b/docs_build/dev/reports/codex_changed_files.txt +@@ -1,31 +1,26 @@ +-# git diff --name-only pr/26177-CHARLIE-034-startup-runtime-report-cleanup -- +-assets/theme-v2/css/status.css +-assets/theme-v2/css/tables.css +-docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md +-docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md +-docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md +-docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md +-docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md +-docs_build/dev/reports/codex_changed_files.txt +-docs_build/dev/reports/codex_review.diff +-docs_build/dev/reports/coverage_changed_js_guardrail.txt +-docs_build/dev/reports/playwright_v8_coverage_report.txt +- + # git status --short +- M docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md ++M docs_build/dev/reports/codex_changed_files.txt + M docs_build/dev/reports/codex_review.diff +- M docs_build/dev/reports/coverage_changed_js_guardrail.txt ++ M package.json ++ M src/engine/replay/ReplayTimeline.js ++ M tests/replay/ReplayTimeline.test.mjs ++?? docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md ++?? docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md ++?? docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md ++?? docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md ++?? docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md ++ ++# git ls-files --others --exclude-standard ++docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md ++docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md ++docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md ++docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md ++docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md + +-# git diff --stat pr/26177-CHARLIE-034-startup-runtime-report-cleanup -- +- assets/theme-v2/css/status.css | 52 ++ +- assets/theme-v2/css/tables.css | 37 ++ +- ...PR_26177_CHARLIE_035-system-health-ui-polish.md | 25 + +- ...35-system-health-ui-polish_branch-validation.md | 14 + +- ...tem-health-ui-polish_manual-validation-notes.md | 8 + +- ...stem-health-ui-polish_requirements-checklist.md | 12 + +- ..._035-system-health-ui-polish_validation-lane.md | 10 + +- docs_build/dev/reports/codex_changed_files.txt | 57 +- +- docs_build/dev/reports/codex_review.diff | 617 +++++++-------------- +- .../dev/reports/coverage_changed_js_guardrail.txt | 4 +- +- .../dev/reports/playwright_v8_coverage_report.txt | 10 +- +- 11 files changed, 382 insertions(+), 464 deletions(-) ++# git diff --stat ++docs_build/dev/reports/codex_changed_files.txt | 40 +-- ++ docs_build/dev/reports/codex_review.diff | 323 ++++++------------------- ++ package.json | 1 + ++ src/engine/replay/ReplayTimeline.js | 7 +- ++ tests/replay/ReplayTimeline.test.mjs | 25 ++ ++ 5 files changed, 121 insertions(+), 275 deletions(-) +\ No newline at end of file +diff --git a/docs_build/dev/reports/codex_review.diff b/docs_build/dev/reports/codex_review.diff +index f3fb5cb1d..79fa8f3c9 100644 +--- a/docs_build/dev/reports/codex_review.diff ++++ b/docs_build/dev/reports/codex_review.diff +@@ -1,245 +1,601 @@ +-diff --git a/assets/theme-v2/css/status.css b/assets/theme-v2/css/status.css +-index a82c83065..8fdef0123 100644 +---- a/assets/theme-v2/css/status.css +-+++ b/assets/theme-v2/css/status.css +-@@ -289,3 +289,55 @@ body.tool-focus-mode .tool-center-panel { +- max-width: 30vw +- } +- } ++diff --git a/docs_build/dev/reports/codex_changed_files.txt b/docs_build/dev/reports/codex_changed_files.txt ++index 4dd326015..8dffe2a1f 100644 ++--- a/docs_build/dev/reports/codex_changed_files.txt +++++ b/docs_build/dev/reports/codex_changed_files.txt ++@@ -1,31 +1,13 @@ ++-# git diff --name-only pr/26177-CHARLIE-034-startup-runtime-report-cleanup -- ++-assets/theme-v2/css/status.css ++-assets/theme-v2/css/tables.css ++-docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md ++-docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md ++-docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md ++-docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md ++-docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md ++-docs_build/dev/reports/codex_changed_files.txt ++-docs_build/dev/reports/codex_review.diff ++-docs_build/dev/reports/coverage_changed_js_guardrail.txt ++-docs_build/dev/reports/playwright_v8_coverage_report.txt ++- ++ # git status --short ++- M docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md ++- M docs_build/dev/reports/codex_review.diff ++- M docs_build/dev/reports/coverage_changed_js_guardrail.txt +++M package.json +++ M src/engine/replay/ReplayTimeline.js +++ M tests/replay/ReplayTimeline.test.mjs +++ +++# git ls-files --others --exclude-standard +++(no output) ++ ++-# git diff --stat pr/26177-CHARLIE-034-startup-runtime-report-cleanup -- ++- assets/theme-v2/css/status.css | 52 ++ ++- assets/theme-v2/css/tables.css | 37 ++ ++- ...PR_26177_CHARLIE_035-system-health-ui-polish.md | 25 + ++- ...35-system-health-ui-polish_branch-validation.md | 14 + ++- ...tem-health-ui-polish_manual-validation-notes.md | 8 + ++- ...stem-health-ui-polish_requirements-checklist.md | 12 + ++- ..._035-system-health-ui-polish_validation-lane.md | 10 + ++- docs_build/dev/reports/codex_changed_files.txt | 57 +- ++- docs_build/dev/reports/codex_review.diff | 617 +++++++-------------- ++- .../dev/reports/coverage_changed_js_guardrail.txt | 4 +- ++- .../dev/reports/playwright_v8_coverage_report.txt | 10 +- ++- 11 files changed, 382 insertions(+), 464 deletions(-) +++# git diff --stat +++package.json | 1 + +++ src/engine/replay/ReplayTimeline.js | 7 ++++--- +++ tests/replay/ReplayTimeline.test.mjs | 25 +++++++++++++++++++++++++ +++ 3 files changed, 30 insertions(+), 3 deletions(-) ++\ No newline at end of file ++diff --git a/docs_build/dev/reports/codex_review.diff b/docs_build/dev/reports/codex_review.diff ++index f3fb5cb1d..693209ba5 100644 ++--- a/docs_build/dev/reports/codex_review.diff +++++ b/docs_build/dev/reports/codex_review.diff ++@@ -1,245 +1,82 @@ ++-diff --git a/assets/theme-v2/css/status.css b/assets/theme-v2/css/status.css ++-index a82c83065..8fdef0123 100644 ++---- a/assets/theme-v2/css/status.css ++-+++ b/assets/theme-v2/css/status.css ++-@@ -289,3 +289,55 @@ body.tool-focus-mode .tool-center-panel { ++- max-width: 30vw ++- } +++diff --git a/package.json b/package.json +++index 72c3c9c32..462426324 100644 +++--- a/package.json ++++++ b/package.json +++@@ -3,6 +3,7 @@ +++ "scripts": { +++ "pretest": "node docs_build/dev/toolbox/checkSharedExtractionGuard.mjs", +++ "test": "node ./scripts/run-node-tests.mjs", ++++ "test:service:replay-clone": "node ./scripts/run-node-test-files.mjs tests/replay/ReplayTimeline.test.mjs tests/replay/ReplaySystem.test.mjs", +++ "test:audit:locations": "node ./scripts/audit-playwright-test-locations.mjs", +++ "test:playwright:structure": "node ./scripts/audit-playwright-test-locations.mjs", +++ "test:playwright:zero-browser": "node ./scripts/run-targeted-test-lanes.mjs --zero-browser-only", +++diff --git a/src/engine/replay/ReplayTimeline.js b/src/engine/replay/ReplayTimeline.js +++index b4d0f1cc5..105ad6153 100644 +++--- a/src/engine/replay/ReplayTimeline.js ++++++ b/src/engine/replay/ReplayTimeline.js +++@@ -8,11 +8,12 @@ import { asNonNegativeInteger, asPositiveInteger } from "../../shared/math/numbe +++ import { +++ SHARED_REPLAY_TIMELINE_DEFAULT_WINDOW_FRAMES, +++ } from "../../shared/contracts/replayContracts.js"; ++++import { cloneRuntimeValue } from "../../shared/runtime/snapshotClone.js"; + + +-+[data-admin-system-health] [data-health-status] { +-+ font-weight: var(--font-weight-heavy); +-+ letter-spacing: 0; +-+ text-transform: uppercase +-+} +-+ +-+[data-admin-system-health] td[data-health-status] { +-+ width: 1%; +-+ min-width: 7rem; +-+ text-align: center; +-+ white-space: nowrap +-+} +-+ +-+[data-admin-system-health] p[data-health-status] { +-+ display: inline-flex; +-+ align-items: center; +-+ justify-content: center; +-+ width: fit-content; +-+ max-width: 100%; +-+ min-height: var(--space-28); +-+ padding: var(--space-4) var(--space-10); +-+ border: var(--border-standard); +-+ border-radius: var(--radius-pill); +-+ overflow-wrap: anywhere +-+} +-+ +-+[data-admin-system-health] [data-health-status="PASS"] { +-+ border-color: color-mix(in srgb, var(--green) 58%, var(--line)); +-+ background: color-mix(in srgb, var(--green) 16%, transparent); +-+ color: var(--green) +-+} +-+ +-+[data-admin-system-health] [data-health-status="WARN"], +-+[data-admin-system-health] [data-health-status="PENDING"] { +-+ border-color: color-mix(in srgb, var(--gold) 54%, var(--line)); +-+ background: color-mix(in srgb, var(--gold) 13%, transparent); +-+ color: var(--gold) +-+} +-+ +-+[data-admin-system-health] [data-health-status="FAIL"] { +-+ border-color: color-mix(in srgb, var(--red) 58%, var(--line)); +-+ background: color-mix(in srgb, var(--red) 15%, transparent); +-+ color: var(--deep-red) +-+} +-+ +-+[data-admin-system-health] [data-health-status="INFO"], +-+[data-admin-system-health] [data-health-status="SKIP"] { +-+ border-color: color-mix(in srgb, var(--cyan) 52%, var(--line)); +-+ background: color-mix(in srgb, var(--cyan) 12%, transparent); +-+ color: var(--cyan) +-+} +-diff --git a/assets/theme-v2/css/tables.css b/assets/theme-v2/css/tables.css +-index 915a235e9..43bde5f3b 100644 +---- a/assets/theme-v2/css/tables.css +-+++ b/assets/theme-v2/css/tables.css +-@@ -178,3 +178,40 @@ td { +- max-width: 100%; +- width: 100% +++ function cloneEntry(entry) { +++ return { +++ frameId: entry.frameId, +++- snapshot: structuredClone(entry.snapshot), ++++ snapshot: cloneRuntimeValue(entry.snapshot), +++ }; ++ } ++-+ ++-+[data-admin-system-health] [data-health-status] { ++-+ font-weight: var(--font-weight-heavy); ++-+ letter-spacing: 0; ++-+ text-transform: uppercase ++-+} ++-+ ++-+[data-admin-system-health] td[data-health-status] { ++-+ width: 1%; ++-+ min-width: 7rem; ++-+ text-align: center; ++-+ white-space: nowrap ++-+} ++-+ ++-+[data-admin-system-health] p[data-health-status] { ++-+ display: inline-flex; ++-+ align-items: center; ++-+ justify-content: center; ++-+ width: fit-content; ++-+ max-width: 100%; ++-+ min-height: var(--space-28); ++-+ padding: var(--space-4) var(--space-10); ++-+ border: var(--border-standard); ++-+ border-radius: var(--radius-pill); ++-+ overflow-wrap: anywhere ++-+} ++-+ ++-+[data-admin-system-health] [data-health-status="PASS"] { ++-+ border-color: color-mix(in srgb, var(--green) 58%, var(--line)); ++-+ background: color-mix(in srgb, var(--green) 16%, transparent); ++-+ color: var(--green) ++-+} ++-+ ++-+[data-admin-system-health] [data-health-status="WARN"], ++-+[data-admin-system-health] [data-health-status="PENDING"] { ++-+ border-color: color-mix(in srgb, var(--gold) 54%, var(--line)); ++-+ background: color-mix(in srgb, var(--gold) 13%, transparent); ++-+ color: var(--gold) ++-+} ++-+ ++-+[data-admin-system-health] [data-health-status="FAIL"] { ++-+ border-color: color-mix(in srgb, var(--red) 58%, var(--line)); ++-+ background: color-mix(in srgb, var(--red) 15%, transparent); ++-+ color: var(--deep-red) ++-+} ++-+ ++-+[data-admin-system-health] [data-health-status="INFO"], ++-+[data-admin-system-health] [data-health-status="SKIP"] { ++-+ border-color: color-mix(in srgb, var(--cyan) 52%, var(--line)); ++-+ background: color-mix(in srgb, var(--cyan) 12%, transparent); ++-+ color: var(--cyan) ++-+} ++-diff --git a/assets/theme-v2/css/tables.css b/assets/theme-v2/css/tables.css ++-index 915a235e9..43bde5f3b 100644 ++---- a/assets/theme-v2/css/tables.css ++-+++ b/assets/theme-v2/css/tables.css ++-@@ -178,3 +178,40 @@ td { ++- max-width: 100%; ++- width: 100% +++ +++@@ -30,7 +31,7 @@ class ReplayTimeline { +++ const normalizedFrameId = asNonNegativeInteger(frameId, this.entries.length); +++ const entry = { +++ frameId: normalizedFrameId, +++- snapshot: structuredClone(snapshot), ++++ snapshot: cloneRuntimeValue(snapshot), +++ }; +++ this.entries.push(entry); +++ this.pruneOldSnapshots(); +++@@ -88,7 +89,7 @@ class ReplayTimeline { +++ for (let i = 0; i < snapshots.length; i += 1) { +++ nextEntries.push({ +++ frameId: normalizedFrameId + i, +++- snapshot: structuredClone(snapshots[i]), ++++ snapshot: cloneRuntimeValue(snapshots[i]), +++ }); +++ } +++ } +++diff --git a/tests/replay/ReplayTimeline.test.mjs b/tests/replay/ReplayTimeline.test.mjs +++index 03fea1226..f249aeee2 100644 +++--- a/tests/replay/ReplayTimeline.test.mjs ++++++ b/tests/replay/ReplayTimeline.test.mjs +++@@ -37,4 +37,29 @@ export function run() { +++ +++ timeline.clear(); +++ assert.equal(timeline.toArray().length, 0); ++++ ++++ const originalStructuredClone = globalThis.structuredClone; ++++ try { ++++ globalThis.structuredClone = undefined; ++++ const fallbackTimeline = new ReplayTimeline({ maxFrames: 3 }); ++++ const fallbackSnapshot = { ++++ input: { jump: true }, ++++ state: { status: 'recording' }, ++++ }; ++++ const pushed = fallbackTimeline.pushSnapshot(0, fallbackSnapshot); ++++ fallbackSnapshot.input.jump = false; ++++ pushed.snapshot.state.status = 'mutated-return'; ++++ ++++ assert.equal(fallbackTimeline.getSnapshot(0).snapshot.input.jump, true); ++++ assert.equal(fallbackTimeline.getSnapshot(0).snapshot.state.status, 'recording'); ++++ ++++ const replacement = [{ input: { jump: false }, state: { status: 'patched' } }]; ++++ const replacedFallback = fallbackTimeline.replaceFromFrame(0, replacement); ++++ replacement[0].state.status = 'mutated-input'; ++++ replacedFallback[0].snapshot.state.status = 'mutated-return'; ++++ ++++ assert.equal(fallbackTimeline.getLatestSnapshot().snapshot.state.status, 'patched'); ++++ } finally { ++++ globalThis.structuredClone = originalStructuredClone; ++++ } ++ } ++-+ ++-+[data-admin-system-health] .table-wrapper { ++-+ border: var(--border-standard); ++-+ border-radius: var(--radius-lg); ++-+ background: var(--panel-overlay); ++-+ box-shadow: var(--shadow-sm) ++-+} ++-+ ++-+[data-admin-system-health] .data-table { ++-+ min-width: 720px; ++-+ background: transparent ++-+} ++-+ ++-+[data-admin-system-health] .data-table caption { ++-+ padding: var(--space-12) var(--space-14); ++-+ border-bottom: var(--border-standard); ++-+ background: var(--panel-soft); ++-+ color: var(--gold) ++-+} ++-+ ++-+[data-admin-system-health] .data-table th, ++-+[data-admin-system-health] .data-table td { ++-+ padding: var(--space-10) var(--space-12); ++-+ vertical-align: top ++-+} ++-+ ++-+[data-admin-system-health] .data-table th { ++-+ color: var(--cyan) ++-+} ++-+ ++-+[data-admin-system-health] .data-table tbody tr:nth-child(even) { ++-+ background: var(--panel-soft-subtle) ++-+} ++-+ ++-+[data-admin-system-health] .data-table td { ++-+ overflow-wrap: anywhere ++-+} ++-diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md ++-new file mode 100644 ++-index 000000000..83221164d ++---- /dev/null ++-+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md ++-@@ -0,0 +1,25 @@ ++-+# PR_26177_CHARLIE_035-system-health-ui-polish ++-+ ++-+Team: Charlie ++-+Branch: pr/26177-CHARLIE-035-system-health-ui-polish ++-+Base: pr/26177-CHARLIE-034-startup-runtime-report-cleanup ++-+Lifecycle: Build / Validation ++-+Repair: Rebased onto repaired PR_26177_CHARLIE_034 branch on 2026-06-25. ++-+ ++-+## Scope ++-+- Added Theme V2 styling for System Health table wrappers, captions, row rhythm, and dense table spacing. ++-+- Added Theme V2 status treatment for System Health status indicators. ++-+- Kept the change visual-only with no new API, runtime, UI behavior, or page-local CSS. ++-+ ++-+## Changed Files ++-+- assets/theme-v2/css/status.css ++-+- assets/theme-v2/css/tables.css ++-+- docs_build/dev/reports/coverage_changed_js_guardrail.txt ++-+- docs_build/dev/reports/playwright_v8_coverage_report.txt ++-+ ++-+## Validation ++-+- PASS: npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line ++-+- PASS: git diff --check ++-+ ++-+## ZIP ++-+- Generated after repair: C:\Users\DavidQ\Documents\GitHub\HTML-JavaScript-Gaming\tmp\PR_26177_CHARLIE_035-system-health-ui-polish_delta.zip ++-diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md ++-new file mode 100644 ++-index 000000000..1fb9628c1 ++---- /dev/null ++-+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md ++-@@ -0,0 +1,14 @@ ++-+# PR_26177_CHARLIE_035 Branch Validation ++-+ ++-+Branch: pr/26177-CHARLIE-035-system-health-ui-polish ++-+Base: pr/26177-CHARLIE-034-startup-runtime-report-cleanup ++-+ ++-+## Results ++-+- PASS: Continued the stacked Charlie workstream from PR_26177_CHARLIE_034. ++-+- PASS: Branch is based on repaired PR_26177_CHARLIE_034 branch. ++-+- PASS: Rebase conflict scope was generated report artifacts only. ++-+- PASS: Worktree was clean before edits. ++-+- PASS: Changes are limited to Theme V2 visual polish and reports. ++-+- PASS: No start_of_day files were modified. ++-+- PASS: No direct commit to main was made. ++-+- PASS: PR branch will be pushed for draft PR creation. ++-diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md ++-new file mode 100644 ++-index 000000000..2202ab001 ++---- /dev/null ++-+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md ++-@@ -0,0 +1,8 @@ ++-+# PR_26177_CHARLIE_035 Manual Validation Notes ++-+ ++-+- Confirmed System Health tables use scoped Theme V2 table wrapper and caption polish. ++-+- Confirmed status indicators have distinct PASS, WARN/PENDING, FAIL, INFO, and SKIP treatments. ++-+- Confirmed the page still uses external Theme V2 CSS and JavaScript only. ++-+- Confirmed no runtime behavior, API contract, database contract, or storage contract was changed. ++-+- Confirmed branch repair conflict was limited to generated report artifacts. ++-+- Confirmed no start_of_day files changed. ++-diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md ++-new file mode 100644 ++-index 000000000..5539cd503 ++---- /dev/null ++-+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md ++-@@ -0,0 +1,12 @@ ++-+# PR_26177_CHARLIE_035 Requirement Checklist ++-+ ++-+- PASS: Theme V2 polish only. ++-+- PASS: Improve System Health layout/readability/status indicators. ++-+- PASS: No new functionality beyond visual polish. ++-+- PASS: Use existing Theme V2 CSS assets. ++-+- PASS: No inline styles, style blocks, script blocks, inline handlers, or page-local CSS. ++-+- PASS: Preserve existing behavior. ++-+- PASS: Do not modify unrelated files. ++-+- PASS: Do not modify start_of_day folders. ++-+- PASS: Do not introduce MEM DB, fake-login, silent fallbacks, or browser-owned infrastructure state. ++-+- PASS: Rebased onto repaired PR_26177_CHARLIE_034 branch. ++-diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md ++-new file mode 100644 ++-index 000000000..b6a4fede1 ++---- /dev/null ++-+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md ++-@@ -0,0 +1,10 @@ ++-+# PR_26177_CHARLIE_035 Validation Lane ++-+ ++-+## Commands ++-+- PASS: npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line ++-+- PASS: git diff --check ++-+ ++-+## Notes ++-+- `git diff --check` reported only expected Windows LF-to-CRLF working-copy warnings. ++-+- No API/unit tests were required because this PR changes only Theme V2 CSS. ++-+- Full samples smoke was not run because this PR is limited to Admin System Health UI polish. ++-diff --git a/docs_build/dev/reports/coverage_changed_js_guardrail.txt b/docs_build/dev/reports/coverage_changed_js_guardrail.txt ++-index 74a29674c..7b1c51f19 100644 ++---- a/docs_build/dev/reports/coverage_changed_js_guardrail.txt ++-+++ b/docs_build/dev/reports/coverage_changed_js_guardrail.txt ++-@@ -6,7 +6,7 @@ Missing changed runtime JS files are WARN, not FAIL. ++- Source: Playwright/Chromium built-in V8 coverage from the active Playwright run. ++- ++- Changed runtime JS files considered: ++--(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only ++-+(100%) none changed - no changed runtime JS files ++- ++- Guardrail warnings: ++--(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only ++-+(100%) none changed - no changed runtime JS files ++-diff --git a/docs_build/dev/reports/playwright_v8_coverage_report.txt b/docs_build/dev/reports/playwright_v8_coverage_report.txt ++-index e00dbc9b0..f936d8cc1 100644 ++---- a/docs_build/dev/reports/playwright_v8_coverage_report.txt ++-+++ b/docs_build/dev/reports/playwright_v8_coverage_report.txt ++-@@ -17,7 +17,7 @@ Exercised tool entry points detected: ++- (78%) Theme V2 Shared JS - exercised 5 runtime JS files ++- ++- Changed runtime JS files covered: ++--(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only ++-+(100%) none changed - no changed runtime JS files ++- ++- Files with executed line/function counts where available: ++- (36%) src/api/server-api-client.js - executed lines 168/168; executed functions 5/14 ++-@@ -33,11 +33,7 @@ Files with executed line/function counts where available: ++- (100%) src/api/admin-system-health-api-client.js - executed lines 31/31; executed functions 5/5 ++- ++- Uncovered or low-coverage changed JS files: ++--(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only ++-+(100%) none changed - no changed runtime JS files ++- ++- Changed JS files considered: ++--(0%) scripts/start-local-api-server.mjs - changed JS file not collected as browser runtime coverage ++--(0%) src/dev-runtime/server/local-api-router.mjs - changed JS file not collected as browser runtime coverage ++--(0%) tests/dev-runtime/AdminHealthOperations.test.mjs - changed JS file not collected as browser runtime coverage ++--(0%) tests/dev-runtime/LocalApiStartupLogging.test.mjs - changed JS file not collected as browser runtime coverage ++--(0%) tests/playwright/tools/AdminHealthOperationsPage.spec.mjs - changed JS file not collected as browser runtime coverage ++-+(100%) none - no changed JS files ++diff --git a/package.json b/package.json ++index 72c3c9c32..462426324 100644 ++--- a/package.json +++++ b/package.json ++@@ -3,6 +3,7 @@ ++ "scripts": { ++ "pretest": "node docs_build/dev/toolbox/checkSharedExtractionGuard.mjs", ++ "test": "node ./scripts/run-node-tests.mjs", +++ "test:service:replay-clone": "node ./scripts/run-node-test-files.mjs tests/replay/ReplayTimeline.test.mjs tests/replay/ReplaySystem.test.mjs", ++ "test:audit:locations": "node ./scripts/audit-playwright-test-locations.mjs", ++ "test:playwright:structure": "node ./scripts/audit-playwright-test-locations.mjs", ++ "test:playwright:zero-browser": "node ./scripts/run-targeted-test-lanes.mjs --zero-browser-only", ++diff --git a/src/engine/replay/ReplayTimeline.js b/src/engine/replay/ReplayTimeline.js ++index b4d0f1cc5..105ad6153 100644 ++--- a/src/engine/replay/ReplayTimeline.js +++++ b/src/engine/replay/ReplayTimeline.js ++@@ -8,11 +8,12 @@ import { asNonNegativeInteger, asPositiveInteger } from "../../shared/math/numbe ++ import { ++ SHARED_REPLAY_TIMELINE_DEFAULT_WINDOW_FRAMES, ++ } from "../../shared/contracts/replayContracts.js"; +++import { cloneRuntimeValue } from "../../shared/runtime/snapshotClone.js"; ++ ++ function cloneEntry(entry) { ++ return { ++ frameId: entry.frameId, ++- snapshot: structuredClone(entry.snapshot), +++ snapshot: cloneRuntimeValue(entry.snapshot), ++ }; + } ++ ++@@ -30,7 +31,7 @@ class ReplayTimeline { ++ const normalizedFrameId = asNonNegativeInteger(frameId, this.entries.length); ++ const entry = { ++ frameId: normalizedFrameId, ++- snapshot: structuredClone(snapshot), +++ snapshot: cloneRuntimeValue(snapshot), ++ }; ++ this.entries.push(entry); ++ this.pruneOldSnapshots(); ++@@ -88,7 +89,7 @@ class ReplayTimeline { ++ for (let i = 0; i < snapshots.length; i += 1) { ++ nextEntries.push({ ++ frameId: normalizedFrameId + i, ++- snapshot: structuredClone(snapshots[i]), +++ snapshot: cloneRuntimeValue(snapshots[i]), ++ }); ++ } ++ } ++diff --git a/tests/replay/ReplayTimeline.test.mjs b/tests/replay/ReplayTimeline.test.mjs ++index 03fea1226..f249aeee2 100644 ++--- a/tests/replay/ReplayTimeline.test.mjs +++++ b/tests/replay/ReplayTimeline.test.mjs ++@@ -37,4 +37,29 @@ export function run() { + -+[data-admin-system-health] [data-health-status] { -+ font-weight: var(--font-weight-heavy); -+ letter-spacing: 0; -+ text-transform: uppercase -+} -+ -+[data-admin-system-health] td[data-health-status] { -+ width: 1%; -+ min-width: 7rem; -+ text-align: center; -+ white-space: nowrap -+} -+ -+[data-admin-system-health] p[data-health-status] { -+ display: inline-flex; -+ align-items: center; -+ justify-content: center; -+ width: fit-content; -+ max-width: 100%; -+ min-height: var(--space-28); -+ padding: var(--space-4) var(--space-10); -+ border: var(--border-standard); -+ border-radius: var(--radius-pill); -+ overflow-wrap: anywhere -+} -+ -+[data-admin-system-health] [data-health-status="PASS"] { -+ border-color: color-mix(in srgb, var(--green) 58%, var(--line)); -+ background: color-mix(in srgb, var(--green) 16%, transparent); -+ color: var(--green) -+} -+ -+[data-admin-system-health] [data-health-status="WARN"], -+[data-admin-system-health] [data-health-status="PENDING"] { -+ border-color: color-mix(in srgb, var(--gold) 54%, var(--line)); -+ background: color-mix(in srgb, var(--gold) 13%, transparent); -+ color: var(--gold) -+} -+ -+[data-admin-system-health] [data-health-status="FAIL"] { -+ border-color: color-mix(in srgb, var(--red) 58%, var(--line)); -+ background: color-mix(in srgb, var(--red) 15%, transparent); -+ color: var(--deep-red) -+} -+ -+[data-admin-system-health] [data-health-status="INFO"], -+[data-admin-system-health] [data-health-status="SKIP"] { -+ border-color: color-mix(in srgb, var(--cyan) 52%, var(--line)); -+ background: color-mix(in srgb, var(--cyan) 12%, transparent); -+ color: var(--cyan) -+} -diff --git a/assets/theme-v2/css/tables.css b/assets/theme-v2/css/tables.css -index 915a235e9..43bde5f3b 100644 ---- a/assets/theme-v2/css/tables.css -+++ b/assets/theme-v2/css/tables.css -@@ -178,3 +178,40 @@ td { - max-width: 100%; - width: 100% ++ timeline.clear(); ++ assert.equal(timeline.toArray().length, 0); +++ +++ const originalStructuredClone = globalThis.structuredClone; +++ try { +++ globalThis.structuredClone = undefined; +++ const fallbackTimeline = new ReplayTimeline({ maxFrames: 3 }); +++ const fallbackSnapshot = { +++ input: { jump: true }, +++ state: { status: 'recording' }, +++ }; +++ const pushed = fallbackTimeline.pushSnapshot(0, fallbackSnapshot); +++ fallbackSnapshot.input.jump = false; +++ pushed.snapshot.state.status = 'mutated-return'; +++ +++ assert.equal(fallbackTimeline.getSnapshot(0).snapshot.input.jump, true); +++ assert.equal(fallbackTimeline.getSnapshot(0).snapshot.state.status, 'recording'); +++ +++ const replacement = [{ input: { jump: false }, state: { status: 'patched' } }]; +++ const replacedFallback = fallbackTimeline.replaceFromFrame(0, replacement); +++ replacement[0].state.status = 'mutated-input'; +++ replacedFallback[0].snapshot.state.status = 'mutated-return'; + + +-+[data-admin-system-health] .table-wrapper { +-+ border: var(--border-standard); +-+ border-radius: var(--radius-lg); +-+ background: var(--panel-overlay); +-+ box-shadow: var(--shadow-sm) +-+} +-+ +-+[data-admin-system-health] .data-table { +-+ min-width: 720px; +-+ background: transparent +-+} +-+ +-+[data-admin-system-health] .data-table caption { +-+ padding: var(--space-12) var(--space-14); +-+ border-bottom: var(--border-standard); +-+ background: var(--panel-soft); +-+ color: var(--gold) +-+} +-+ +-+[data-admin-system-health] .data-table th, +-+[data-admin-system-health] .data-table td { +-+ padding: var(--space-10) var(--space-12); +-+ vertical-align: top +-+} +-+ +-+[data-admin-system-health] .data-table th { +-+ color: var(--cyan) +-+} +-+ +-+[data-admin-system-health] .data-table tbody tr:nth-child(even) { +-+ background: var(--panel-soft-subtle) +-+} +-+ +-+[data-admin-system-health] .data-table td { +-+ overflow-wrap: anywhere +-+} +-diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md +++ assert.equal(fallbackTimeline.getLatestSnapshot().snapshot.state.status, 'patched'); +++ } finally { +++ globalThis.structuredClone = originalStructuredClone; +++ } ++ } ++diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md + new file mode 100644 +-index 000000000..83221164d ++index 000000000..a713920c1 + --- /dev/null +-+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md +-@@ -0,0 +1,25 @@ +-+# PR_26177_CHARLIE_035-system-health-ui-polish +++++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md ++@@ -0,0 +1,59 @@ +++# PR_26175_DELTA_008-replay-clone-service-tests +++ +++## Summary +++ +++Team Delta moved `ReplayTimeline` clone operations onto the shared runtime clone helper and added replay service tests for the no-`structuredClone` fallback path. + + +-+Team: Charlie +-+Branch: pr/26177-CHARLIE-035-system-health-ui-polish +-+Base: pr/26177-CHARLIE-034-startup-runtime-report-cleanup +-+Lifecycle: Build / Validation +-+Repair: Rebased onto repaired PR_26177_CHARLIE_034 branch on 2026-06-25. +++The replay model and replay system already used `cloneRuntimeValue(...)`; this PR finishes the timeline surface so replay snapshots, returned entries, and replacement frames use the same shared clone behavior. + + + +## Scope +-+- Added Theme V2 styling for System Health table wrappers, captions, row rhythm, and dense table spacing. +-+- Added Theme V2 status treatment for System Health status indicators. +-+- Kept the change visual-only with no new API, runtime, UI behavior, or page-local CSS. + + +-+## Changed Files +-+- assets/theme-v2/css/status.css +-+- assets/theme-v2/css/tables.css +-+- docs_build/dev/reports/coverage_changed_js_guardrail.txt +-+- docs_build/dev/reports/playwright_v8_coverage_report.txt +++- Team: Delta +++- Branch: `PR_26175_DELTA_008-replay-clone-service-tests` +++- Runtime file changed: `src/engine/replay/ReplayTimeline.js` +++- Test file changed: `tests/replay/ReplayTimeline.test.mjs` +++- Service test command added: `npm run test:service:replay-clone` +++- Site-wide command preserved: `npm test` +++ +++## Runtime Impact +++ +++PASS - Replay timeline cloning remains backward compatible and now works when `structuredClone` is unavailable. +++ +++## Requirement Checklist +++ +++| Requirement | Status | Notes | +++|---|---|---| +++| One PR purpose only | PASS | Replay clone service testability only. | +++| Team Delta ownership only | PASS | Replay runtime and shared runtime test coverage are Delta-owned. | +++| No team-specific test runner | PASS | No Delta-named runner or command added. | +++| No `scripts/run-delta-runtime-validation.mjs` | PASS | File was not added. | +++| No `test:delta-runtime` | PASS | Script was not added. | +++| Testing organized by service/page level | PASS | Added `test:service:replay-clone`. | +++| Keep `npm test` as site-wide command | PASS | Existing `npm test` is unchanged. | +++| No UI changes | PASS | No UI files changed. | +++| No browser-owned product data | PASS | Replay tests use in-memory runtime snapshots only. | +++| No silent fallbacks or hidden defaults | PASS | Fallback clone path is explicit through `cloneRuntimeValue(...)`. | +++ +++## Validation Lane Report +++ +++| Command | Status | Notes | +++|---|---|---| +++| `node --check src/engine/replay/ReplayTimeline.js` | PASS | Replay timeline syntax valid. | +++| `node --check tests/replay/ReplayTimeline.test.mjs` | PASS | Replay test syntax valid. | +++| `npm run test:service:replay-clone` | PASS | 2 targeted replay test files passed. | +++| `git diff --check` | PASS | No whitespace errors before report generation. | +++| `npm run codex:review-artifacts` | PASS | Regenerated `codex_review.diff` and `codex_changed_files.txt`. | +++ +++## Manual Validation Notes + + +-+## Validation +-+- PASS: npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line +-+- PASS: git diff --check +++- Confirmed `ReplayTimeline` no longer calls `structuredClone` directly. +++- Confirmed returned timeline entries are cloned and cannot mutate stored snapshots. +++- Confirmed replacement snapshots are cloned before storage. +++- Playwright was not run; this is Node replay service coverage. + + + +## ZIP +-+- Generated after repair: C:\Users\DavidQ\Documents\GitHub\HTML-JavaScript-Gaming\tmp\PR_26177_CHARLIE_035-system-health-ui-polish_delta.zip +-diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md +++ +++Expected repo-structured delta ZIP: +++ +++`tmp/PR_26175_DELTA_008-replay-clone-service-tests_delta.zip` +++ ++diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md + new file mode 100644 +-index 000000000..1fb9628c1 ++index 000000000..c71a5db85 + --- /dev/null +-+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md +-@@ -0,0 +1,14 @@ +-+# PR_26177_CHARLIE_035 Branch Validation +++++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md ++@@ -0,0 +1,11 @@ +++# PR_26175_DELTA_008 Branch Validation + + +-+Branch: pr/26177-CHARLIE-035-system-health-ui-polish +-+Base: pr/26177-CHARLIE-034-startup-runtime-report-cleanup +++| Check | Status | Evidence | +++|---|---|---| +++| Returned to `main` before branch | PASS | Checked out `main` after PR_26175_DELTA_007 draft PR creation. | +++| Pulled latest `main` | PASS | `git pull --ff-only` fast-forwarded to `41eaa1dcd`. | +++| Local/origin sync before branch | PASS | `git rev-list --left-right --count main...origin/main` returned `0 0`. | +++| Worktree clean before branch | PASS | `git status --short` returned no entries. | +++| Working branch | PASS | `PR_26175_DELTA_008-replay-clone-service-tests`. | +++| Direct commit to `main` avoided | PASS | Changes were made only on the PR branch. | + + +-+## Results +-+- PASS: Continued the stacked Charlie workstream from PR_26177_CHARLIE_034. +-+- PASS: Branch is based on repaired PR_26177_CHARLIE_034 branch. +-+- PASS: Rebase conflict scope was generated report artifacts only. +-+- PASS: Worktree was clean before edits. +-+- PASS: Changes are limited to Theme V2 visual polish and reports. +-+- PASS: No start_of_day files were modified. +-+- PASS: No direct commit to main was made. +-+- PASS: PR branch will be pushed for draft PR creation. +-diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md ++diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md + new file mode 100644 +-index 000000000..2202ab001 ++index 000000000..f5d6ac905 + --- /dev/null +-+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md +-@@ -0,0 +1,8 @@ +-+# PR_26177_CHARLIE_035 Manual Validation Notes +-+ +-+- Confirmed System Health tables use scoped Theme V2 table wrapper and caption polish. +-+- Confirmed status indicators have distinct PASS, WARN/PENDING, FAIL, INFO, and SKIP treatments. +-+- Confirmed the page still uses external Theme V2 CSS and JavaScript only. +-+- Confirmed no runtime behavior, API contract, database contract, or storage contract was changed. +-+- Confirmed branch repair conflict was limited to generated report artifacts. +-+- Confirmed no start_of_day files changed. +-diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md +++++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md ++@@ -0,0 +1,9 @@ +++# PR_26175_DELTA_008 Manual Validation Notes +++ +++- Reviewed changed files for replay clone scope. +++- Confirmed no UI files changed. +++- Confirmed no persisted browser-owned product data was introduced. +++- Confirmed no `scripts/run-delta-runtime-validation.mjs` file was added. +++- Confirmed no `test:delta-runtime` script was added. +++- Confirmed `npm test` remains the site-wide/all-tests command. +++ ++diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md + new file mode 100644 +-index 000000000..5539cd503 ++index 000000000..0e3e2fa00 + --- /dev/null +-+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md +++++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md + @@ -0,0 +1,12 @@ +-+# PR_26177_CHARLIE_035 Requirement Checklist +-+ +-+- PASS: Theme V2 polish only. +-+- PASS: Improve System Health layout/readability/status indicators. +-+- PASS: No new functionality beyond visual polish. +-+- PASS: Use existing Theme V2 CSS assets. +-+- PASS: No inline styles, style blocks, script blocks, inline handlers, or page-local CSS. +-+- PASS: Preserve existing behavior. +-+- PASS: Do not modify unrelated files. +-+- PASS: Do not modify start_of_day folders. +-+- PASS: Do not introduce MEM DB, fake-login, silent fallbacks, or browser-owned infrastructure state. +-+- PASS: Rebased onto repaired PR_26177_CHARLIE_034 branch. +-diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md +++# PR_26175_DELTA_008 Requirements Checklist +++ +++| Requirement | Status | Notes | +++|---|---|---| +++| Branch from updated main | PASS | Branch created after pull and sync check. | +++| Build smallest scoped change | PASS | Updated replay timeline clone path and focused replay tests. | +++| Validate targeted tests | PASS | `npm run test:service:replay-clone` passed. | +++| Required reports created | PASS | PR report, branch validation, checklist, validation lane, manual notes, review diff, changed files. | +++| Repo-structured ZIP created | PENDING | Created after report files are packaged. | +++| Open PR | PENDING | Opened after commit and push. | +++| Stop before merge approval | PASS | This PR is draft/open only; no merge performed. | +++ ++diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md + new file mode 100644 +-index 000000000..b6a4fede1 ++index 000000000..7c5688af1 + --- /dev/null +-+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md +-@@ -0,0 +1,10 @@ +-+# PR_26177_CHARLIE_035 Validation Lane +++++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md ++@@ -0,0 +1,20 @@ +++# PR_26175_DELTA_008 Validation Lane +++ +++## Targeted Lane +++ +++`npm run test:service:replay-clone` + + +-+## Commands +-+- PASS: npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line +-+- PASS: git diff --check +++## Results +++ +++| Command | Result | +++|---|---| +++| `node --check src/engine/replay/ReplayTimeline.js` | PASS | +++| `node --check tests/replay/ReplayTimeline.test.mjs` | PASS | +++| `npm run test:service:replay-clone` | PASS | +++| `git diff --check` | PASS | + + + +## Notes +-+- `git diff --check` reported only expected Windows LF-to-CRLF working-copy warnings. +-+- No API/unit tests were required because this PR changes only Theme V2 CSS. +-+- Full samples smoke was not run because this PR is limited to Admin System Health UI polish. +-diff --git a/docs_build/dev/reports/coverage_changed_js_guardrail.txt b/docs_build/dev/reports/coverage_changed_js_guardrail.txt +-index 74a29674c..7b1c51f19 100644 +---- a/docs_build/dev/reports/coverage_changed_js_guardrail.txt +-+++ b/docs_build/dev/reports/coverage_changed_js_guardrail.txt +-@@ -6,7 +6,7 @@ Missing changed runtime JS files are WARN, not FAIL. +- Source: Playwright/Chromium built-in V8 coverage from the active Playwright run. +- +- Changed runtime JS files considered: +--(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only +-+(100%) none changed - no changed runtime JS files +- +- Guardrail warnings: +--(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only +-+(100%) none changed - no changed runtime JS files +-diff --git a/docs_build/dev/reports/playwright_v8_coverage_report.txt b/docs_build/dev/reports/playwright_v8_coverage_report.txt +-index e00dbc9b0..f936d8cc1 100644 +---- a/docs_build/dev/reports/playwright_v8_coverage_report.txt +-+++ b/docs_build/dev/reports/playwright_v8_coverage_report.txt +-@@ -17,7 +17,7 @@ Exercised tool entry points detected: +- (78%) Theme V2 Shared JS - exercised 5 runtime JS files +- +- Changed runtime JS files covered: +--(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only +-+(100%) none changed - no changed runtime JS files +- +- Files with executed line/function counts where available: +- (36%) src/api/server-api-client.js - executed lines 168/168; executed functions 5/14 +-@@ -33,11 +33,7 @@ Files with executed line/function counts where available: +- (100%) src/api/admin-system-health-api-client.js - executed lines 31/31; executed functions 5/5 +- +- Uncovered or low-coverage changed JS files: +--(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only +-+(100%) none changed - no changed runtime JS files +- +- Changed JS files considered: +--(0%) scripts/start-local-api-server.mjs - changed JS file not collected as browser runtime coverage +--(0%) src/dev-runtime/server/local-api-router.mjs - changed JS file not collected as browser runtime coverage +--(0%) tests/dev-runtime/AdminHealthOperations.test.mjs - changed JS file not collected as browser runtime coverage +--(0%) tests/dev-runtime/LocalApiStartupLogging.test.mjs - changed JS file not collected as browser runtime coverage +--(0%) tests/playwright/tools/AdminHealthOperationsPage.spec.mjs - changed JS file not collected as browser runtime coverage +-+(100%) none - no changed JS files +++ +++- The service lane is replay-focused and not named for Team Delta. +++- Full `npm test` was not run because this PR is scoped to replay clone service coverage. +++ +diff --git a/package.json b/package.json +index 72c3c9c32..462426324 100644 +--- a/package.json ++++ b/package.json +@@ -3,6 +3,7 @@ + "scripts": { + "pretest": "node docs_build/dev/toolbox/checkSharedExtractionGuard.mjs", + "test": "node ./scripts/run-node-tests.mjs", ++ "test:service:replay-clone": "node ./scripts/run-node-test-files.mjs tests/replay/ReplayTimeline.test.mjs tests/replay/ReplaySystem.test.mjs", + "test:audit:locations": "node ./scripts/audit-playwright-test-locations.mjs", + "test:playwright:structure": "node ./scripts/audit-playwright-test-locations.mjs", + "test:playwright:zero-browser": "node ./scripts/run-targeted-test-lanes.mjs --zero-browser-only", +diff --git a/src/engine/replay/ReplayTimeline.js b/src/engine/replay/ReplayTimeline.js +index b4d0f1cc5..105ad6153 100644 +--- a/src/engine/replay/ReplayTimeline.js ++++ b/src/engine/replay/ReplayTimeline.js +@@ -8,11 +8,12 @@ import { asNonNegativeInteger, asPositiveInteger } from "../../shared/math/numbe + import { + SHARED_REPLAY_TIMELINE_DEFAULT_WINDOW_FRAMES, + } from "../../shared/contracts/replayContracts.js"; ++import { cloneRuntimeValue } from "../../shared/runtime/snapshotClone.js"; + + function cloneEntry(entry) { + return { + frameId: entry.frameId, +- snapshot: structuredClone(entry.snapshot), ++ snapshot: cloneRuntimeValue(entry.snapshot), + }; } + +@@ -30,7 +31,7 @@ class ReplayTimeline { + const normalizedFrameId = asNonNegativeInteger(frameId, this.entries.length); + const entry = { + frameId: normalizedFrameId, +- snapshot: structuredClone(snapshot), ++ snapshot: cloneRuntimeValue(snapshot), + }; + this.entries.push(entry); + this.pruneOldSnapshots(); +@@ -88,7 +89,7 @@ class ReplayTimeline { + for (let i = 0; i < snapshots.length; i += 1) { + nextEntries.push({ + frameId: normalizedFrameId + i, +- snapshot: structuredClone(snapshots[i]), ++ snapshot: cloneRuntimeValue(snapshots[i]), + }); + } + } +diff --git a/tests/replay/ReplayTimeline.test.mjs b/tests/replay/ReplayTimeline.test.mjs +index 03fea1226..f249aeee2 100644 +--- a/tests/replay/ReplayTimeline.test.mjs ++++ b/tests/replay/ReplayTimeline.test.mjs +@@ -37,4 +37,29 @@ export function run() { + + timeline.clear(); + assert.equal(timeline.toArray().length, 0); ++ ++ const originalStructuredClone = globalThis.structuredClone; ++ try { ++ globalThis.structuredClone = undefined; ++ const fallbackTimeline = new ReplayTimeline({ maxFrames: 3 }); ++ const fallbackSnapshot = { ++ input: { jump: true }, ++ state: { status: 'recording' }, ++ }; ++ const pushed = fallbackTimeline.pushSnapshot(0, fallbackSnapshot); ++ fallbackSnapshot.input.jump = false; ++ pushed.snapshot.state.status = 'mutated-return'; ++ ++ assert.equal(fallbackTimeline.getSnapshot(0).snapshot.input.jump, true); ++ assert.equal(fallbackTimeline.getSnapshot(0).snapshot.state.status, 'recording'); + -+[data-admin-system-health] .table-wrapper { -+ border: var(--border-standard); -+ border-radius: var(--radius-lg); -+ background: var(--panel-overlay); -+ box-shadow: var(--shadow-sm) -+} -+ -+[data-admin-system-health] .data-table { -+ min-width: 720px; -+ background: transparent -+} -+ -+[data-admin-system-health] .data-table caption { -+ padding: var(--space-12) var(--space-14); -+ border-bottom: var(--border-standard); -+ background: var(--panel-soft); -+ color: var(--gold) -+} -+ -+[data-admin-system-health] .data-table th, -+[data-admin-system-health] .data-table td { -+ padding: var(--space-10) var(--space-12); -+ vertical-align: top -+} -+ -+[data-admin-system-health] .data-table th { -+ color: var(--cyan) -+} -+ -+[data-admin-system-health] .data-table tbody tr:nth-child(even) { -+ background: var(--panel-soft-subtle) -+} -+ -+[data-admin-system-health] .data-table td { -+ overflow-wrap: anywhere -+} -diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md ++ const replacement = [{ input: { jump: false }, state: { status: 'patched' } }]; ++ const replacedFallback = fallbackTimeline.replaceFromFrame(0, replacement); ++ replacement[0].state.status = 'mutated-input'; ++ replacedFallback[0].snapshot.state.status = 'mutated-return'; ++ ++ assert.equal(fallbackTimeline.getLatestSnapshot().snapshot.state.status, 'patched'); ++ } finally { ++ globalThis.structuredClone = originalStructuredClone; ++ } + } +diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md new file mode 100644 -index 000000000..83221164d +index 000000000..a713920c1 --- /dev/null -+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish.md -@@ -0,0 +1,25 @@ -+# PR_26177_CHARLIE_035-system-health-ui-polish ++++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests.md +@@ -0,0 +1,59 @@ ++# PR_26175_DELTA_008-replay-clone-service-tests ++ ++## Summary + -+Team: Charlie -+Branch: pr/26177-CHARLIE-035-system-health-ui-polish -+Base: pr/26177-CHARLIE-034-startup-runtime-report-cleanup -+Lifecycle: Build / Validation -+Repair: Rebased onto repaired PR_26177_CHARLIE_034 branch on 2026-06-25. ++Team Delta moved `ReplayTimeline` clone operations onto the shared runtime clone helper and added replay service tests for the no-`structuredClone` fallback path. ++ ++The replay model and replay system already used `cloneRuntimeValue(...)`; this PR finishes the timeline surface so replay snapshots, returned entries, and replacement frames use the same shared clone behavior. + +## Scope -+- Added Theme V2 styling for System Health table wrappers, captions, row rhythm, and dense table spacing. -+- Added Theme V2 status treatment for System Health status indicators. -+- Kept the change visual-only with no new API, runtime, UI behavior, or page-local CSS. + -+## Changed Files -+- assets/theme-v2/css/status.css -+- assets/theme-v2/css/tables.css -+- docs_build/dev/reports/coverage_changed_js_guardrail.txt -+- docs_build/dev/reports/playwright_v8_coverage_report.txt ++- Team: Delta ++- Branch: `PR_26175_DELTA_008-replay-clone-service-tests` ++- Runtime file changed: `src/engine/replay/ReplayTimeline.js` ++- Test file changed: `tests/replay/ReplayTimeline.test.mjs` ++- Service test command added: `npm run test:service:replay-clone` ++- Site-wide command preserved: `npm test` ++ ++## Runtime Impact ++ ++PASS - Replay timeline cloning remains backward compatible and now works when `structuredClone` is unavailable. ++ ++## Requirement Checklist ++ ++| Requirement | Status | Notes | ++|---|---|---| ++| One PR purpose only | PASS | Replay clone service testability only. | ++| Team Delta ownership only | PASS | Replay runtime and shared runtime test coverage are Delta-owned. | ++| No team-specific test runner | PASS | No Delta-named runner or command added. | ++| No `scripts/run-delta-runtime-validation.mjs` | PASS | File was not added. | ++| No `test:delta-runtime` | PASS | Script was not added. | ++| Testing organized by service/page level | PASS | Added `test:service:replay-clone`. | ++| Keep `npm test` as site-wide command | PASS | Existing `npm test` is unchanged. | ++| No UI changes | PASS | No UI files changed. | ++| No browser-owned product data | PASS | Replay tests use in-memory runtime snapshots only. | ++| No silent fallbacks or hidden defaults | PASS | Fallback clone path is explicit through `cloneRuntimeValue(...)`. | ++ ++## Validation Lane Report ++ ++| Command | Status | Notes | ++|---|---|---| ++| `node --check src/engine/replay/ReplayTimeline.js` | PASS | Replay timeline syntax valid. | ++| `node --check tests/replay/ReplayTimeline.test.mjs` | PASS | Replay test syntax valid. | ++| `npm run test:service:replay-clone` | PASS | 2 targeted replay test files passed. | ++| `git diff --check` | PASS | No whitespace errors before report generation. | ++| `npm run codex:review-artifacts` | PASS | Regenerated `codex_review.diff` and `codex_changed_files.txt`. | + -+## Validation -+- PASS: npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line -+- PASS: git diff --check ++## Manual Validation Notes ++ ++- Confirmed `ReplayTimeline` no longer calls `structuredClone` directly. ++- Confirmed returned timeline entries are cloned and cannot mutate stored snapshots. ++- Confirmed replacement snapshots are cloned before storage. ++- Playwright was not run; this is Node replay service coverage. + +## ZIP -+- Generated after repair: C:\Users\DavidQ\Documents\GitHub\HTML-JavaScript-Gaming\tmp\PR_26177_CHARLIE_035-system-health-ui-polish_delta.zip -diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md ++ ++Expected repo-structured delta ZIP: ++ ++`tmp/PR_26175_DELTA_008-replay-clone-service-tests_delta.zip` ++ +diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md new file mode 100644 -index 000000000..1fb9628c1 +index 000000000..c71a5db85 --- /dev/null -+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_branch-validation.md -@@ -0,0 +1,14 @@ -+# PR_26177_CHARLIE_035 Branch Validation ++++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_branch-validation.md +@@ -0,0 +1,11 @@ ++# PR_26175_DELTA_008 Branch Validation + -+Branch: pr/26177-CHARLIE-035-system-health-ui-polish -+Base: pr/26177-CHARLIE-034-startup-runtime-report-cleanup ++| Check | Status | Evidence | ++|---|---|---| ++| Returned to `main` before branch | PASS | Checked out `main` after PR_26175_DELTA_007 draft PR creation. | ++| Pulled latest `main` | PASS | `git pull --ff-only` fast-forwarded to `41eaa1dcd`. | ++| Local/origin sync before branch | PASS | `git rev-list --left-right --count main...origin/main` returned `0 0`. | ++| Worktree clean before branch | PASS | `git status --short` returned no entries. | ++| Working branch | PASS | `PR_26175_DELTA_008-replay-clone-service-tests`. | ++| Direct commit to `main` avoided | PASS | Changes were made only on the PR branch. | + -+## Results -+- PASS: Continued the stacked Charlie workstream from PR_26177_CHARLIE_034. -+- PASS: Branch is based on repaired PR_26177_CHARLIE_034 branch. -+- PASS: Rebase conflict scope was generated report artifacts only. -+- PASS: Worktree was clean before edits. -+- PASS: Changes are limited to Theme V2 visual polish and reports. -+- PASS: No start_of_day files were modified. -+- PASS: No direct commit to main was made. -+- PASS: PR branch will be pushed for draft PR creation. -diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md +diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md new file mode 100644 -index 000000000..2202ab001 +index 000000000..f5d6ac905 --- /dev/null -+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_manual-validation-notes.md -@@ -0,0 +1,8 @@ -+# PR_26177_CHARLIE_035 Manual Validation Notes -+ -+- Confirmed System Health tables use scoped Theme V2 table wrapper and caption polish. -+- Confirmed status indicators have distinct PASS, WARN/PENDING, FAIL, INFO, and SKIP treatments. -+- Confirmed the page still uses external Theme V2 CSS and JavaScript only. -+- Confirmed no runtime behavior, API contract, database contract, or storage contract was changed. -+- Confirmed branch repair conflict was limited to generated report artifacts. -+- Confirmed no start_of_day files changed. -diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md ++++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_manual-validation-notes.md +@@ -0,0 +1,9 @@ ++# PR_26175_DELTA_008 Manual Validation Notes ++ ++- Reviewed changed files for replay clone scope. ++- Confirmed no UI files changed. ++- Confirmed no persisted browser-owned product data was introduced. ++- Confirmed no `scripts/run-delta-runtime-validation.mjs` file was added. ++- Confirmed no `test:delta-runtime` script was added. ++- Confirmed `npm test` remains the site-wide/all-tests command. ++ +diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md new file mode 100644 -index 000000000..5539cd503 +index 000000000..32c102507 --- /dev/null -+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_requirements-checklist.md -@@ -0,0 +1,12 @@ -+# PR_26177_CHARLIE_035 Requirement Checklist -+ -+- PASS: Theme V2 polish only. -+- PASS: Improve System Health layout/readability/status indicators. -+- PASS: No new functionality beyond visual polish. -+- PASS: Use existing Theme V2 CSS assets. -+- PASS: No inline styles, style blocks, script blocks, inline handlers, or page-local CSS. -+- PASS: Preserve existing behavior. -+- PASS: Do not modify unrelated files. -+- PASS: Do not modify start_of_day folders. -+- PASS: Do not introduce MEM DB, fake-login, silent fallbacks, or browser-owned infrastructure state. -+- PASS: Rebased onto repaired PR_26177_CHARLIE_034 branch. -diff --git a/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md ++++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_requirements-checklist.md +@@ -0,0 +1,11 @@ ++# PR_26175_DELTA_008 Requirements Checklist ++ ++| Requirement | Status | Notes | ++|---|---|---| ++| Branch from updated main | PASS | Branch created after pull and sync check. | ++| Build smallest scoped change | PASS | Updated replay timeline clone path and focused replay tests. | ++| Validate targeted tests | PASS | `npm run test:service:replay-clone` passed. | ++| Required reports created | PASS | PR report, branch validation, checklist, validation lane, manual notes, review diff, changed files. | ++| Repo-structured ZIP created | PASS | `tmp/PR_26175_DELTA_008-replay-clone-service-tests_delta.zip`. | ++| Open PR | PENDING | Opened after commit and push. | ++| Stop before merge approval | PASS | This PR is draft/open only; no merge performed. | +diff --git a/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md new file mode 100644 -index 000000000..b6a4fede1 +index 000000000..7c5688af1 --- /dev/null -+++ b/docs_build/dev/reports/PR_26177_CHARLIE_035-system-health-ui-polish_validation-lane.md -@@ -0,0 +1,10 @@ -+# PR_26177_CHARLIE_035 Validation Lane ++++ b/docs_build/dev/reports/PR_26175_DELTA_008-replay-clone-service-tests_validation-lane.md +@@ -0,0 +1,20 @@ ++# PR_26175_DELTA_008 Validation Lane ++ ++## Targeted Lane ++ ++`npm run test:service:replay-clone` + -+## Commands -+- PASS: npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line -+- PASS: git diff --check ++## Results ++ ++| Command | Result | ++|---|---| ++| `node --check src/engine/replay/ReplayTimeline.js` | PASS | ++| `node --check tests/replay/ReplayTimeline.test.mjs` | PASS | ++| `npm run test:service:replay-clone` | PASS | ++| `git diff --check` | PASS | + +## Notes -+- `git diff --check` reported only expected Windows LF-to-CRLF working-copy warnings. -+- No API/unit tests were required because this PR changes only Theme V2 CSS. -+- Full samples smoke was not run because this PR is limited to Admin System Health UI polish. -diff --git a/docs_build/dev/reports/coverage_changed_js_guardrail.txt b/docs_build/dev/reports/coverage_changed_js_guardrail.txt -index 74a29674c..7b1c51f19 100644 ---- a/docs_build/dev/reports/coverage_changed_js_guardrail.txt -+++ b/docs_build/dev/reports/coverage_changed_js_guardrail.txt -@@ -6,7 +6,7 @@ Missing changed runtime JS files are WARN, not FAIL. - Source: Playwright/Chromium built-in V8 coverage from the active Playwright run. - - Changed runtime JS files considered: --(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only -+(100%) none changed - no changed runtime JS files - - Guardrail warnings: --(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only -+(100%) none changed - no changed runtime JS files -diff --git a/docs_build/dev/reports/playwright_v8_coverage_report.txt b/docs_build/dev/reports/playwright_v8_coverage_report.txt -index e00dbc9b0..f936d8cc1 100644 ---- a/docs_build/dev/reports/playwright_v8_coverage_report.txt -+++ b/docs_build/dev/reports/playwright_v8_coverage_report.txt -@@ -17,7 +17,7 @@ Exercised tool entry points detected: - (78%) Theme V2 Shared JS - exercised 5 runtime JS files - - Changed runtime JS files covered: --(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only -+(100%) none changed - no changed runtime JS files - - Files with executed line/function counts where available: - (36%) src/api/server-api-client.js - executed lines 168/168; executed functions 5/14 -@@ -33,11 +33,7 @@ Files with executed line/function counts where available: - (100%) src/api/admin-system-health-api-client.js - executed lines 31/31; executed functions 5/5 - - Uncovered or low-coverage changed JS files: --(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only -+(100%) none changed - no changed runtime JS files - - Changed JS files considered: --(0%) scripts/start-local-api-server.mjs - changed JS file not collected as browser runtime coverage --(0%) src/dev-runtime/server/local-api-router.mjs - changed JS file not collected as browser runtime coverage --(0%) tests/dev-runtime/AdminHealthOperations.test.mjs - changed JS file not collected as browser runtime coverage --(0%) tests/dev-runtime/LocalApiStartupLogging.test.mjs - changed JS file not collected as browser runtime coverage --(0%) tests/playwright/tools/AdminHealthOperationsPage.spec.mjs - changed JS file not collected as browser runtime coverage -+(100%) none - no changed JS files ++ ++- The service lane is replay-focused and not named for Team Delta. ++- Full `npm test` was not run because this PR is scoped to replay clone service coverage. ++ diff --git a/package.json b/package.json index 72c3c9c32..462426324 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "scripts": { "pretest": "node docs_build/dev/toolbox/checkSharedExtractionGuard.mjs", "test": "node ./scripts/run-node-tests.mjs", + "test:service:replay-clone": "node ./scripts/run-node-test-files.mjs tests/replay/ReplayTimeline.test.mjs tests/replay/ReplaySystem.test.mjs", "test:audit:locations": "node ./scripts/audit-playwright-test-locations.mjs", "test:playwright:structure": "node ./scripts/audit-playwright-test-locations.mjs", "test:playwright:zero-browser": "node ./scripts/run-targeted-test-lanes.mjs --zero-browser-only", diff --git a/src/engine/replay/ReplayTimeline.js b/src/engine/replay/ReplayTimeline.js index b4d0f1cc5..105ad6153 100644 --- a/src/engine/replay/ReplayTimeline.js +++ b/src/engine/replay/ReplayTimeline.js @@ -8,11 +8,12 @@ import { asNonNegativeInteger, asPositiveInteger } from "../../shared/math/numbe import { SHARED_REPLAY_TIMELINE_DEFAULT_WINDOW_FRAMES, } from "../../shared/contracts/replayContracts.js"; +import { cloneRuntimeValue } from "../../shared/runtime/snapshotClone.js"; function cloneEntry(entry) { return { frameId: entry.frameId, - snapshot: structuredClone(entry.snapshot), + snapshot: cloneRuntimeValue(entry.snapshot), }; } @@ -30,7 +31,7 @@ class ReplayTimeline { const normalizedFrameId = asNonNegativeInteger(frameId, this.entries.length); const entry = { frameId: normalizedFrameId, - snapshot: structuredClone(snapshot), + snapshot: cloneRuntimeValue(snapshot), }; this.entries.push(entry); this.pruneOldSnapshots(); @@ -88,7 +89,7 @@ class ReplayTimeline { for (let i = 0; i < snapshots.length; i += 1) { nextEntries.push({ frameId: normalizedFrameId + i, - snapshot: structuredClone(snapshots[i]), + snapshot: cloneRuntimeValue(snapshots[i]), }); } } diff --git a/tests/replay/ReplayTimeline.test.mjs b/tests/replay/ReplayTimeline.test.mjs index 03fea1226..f249aeee2 100644 --- a/tests/replay/ReplayTimeline.test.mjs +++ b/tests/replay/ReplayTimeline.test.mjs @@ -37,4 +37,29 @@ export function run() { timeline.clear(); assert.equal(timeline.toArray().length, 0); + + const originalStructuredClone = globalThis.structuredClone; + try { + globalThis.structuredClone = undefined; + const fallbackTimeline = new ReplayTimeline({ maxFrames: 3 }); + const fallbackSnapshot = { + input: { jump: true }, + state: { status: 'recording' }, + }; + const pushed = fallbackTimeline.pushSnapshot(0, fallbackSnapshot); + fallbackSnapshot.input.jump = false; + pushed.snapshot.state.status = 'mutated-return'; + + assert.equal(fallbackTimeline.getSnapshot(0).snapshot.input.jump, true); + assert.equal(fallbackTimeline.getSnapshot(0).snapshot.state.status, 'recording'); + + const replacement = [{ input: { jump: false }, state: { status: 'patched' } }]; + const replacedFallback = fallbackTimeline.replaceFromFrame(0, replacement); + replacement[0].state.status = 'mutated-input'; + replacedFallback[0].snapshot.state.status = 'mutated-return'; + + assert.equal(fallbackTimeline.getLatestSnapshot().snapshot.state.status, 'patched'); + } finally { + globalThis.structuredClone = originalStructuredClone; + } }