docs: record rehearsal screenshot runner verification

This commit is contained in:
lda
2026-07-13 00:43:37 +07:00 Verified
parent 67f22d154e
commit 0077bab225
+18 -73
View File
@@ -1,86 +1,31 @@
# Task 2 Implementation Report
## Summary
## Scope
Task 2 separates target health from replay playback. A healthy configured target
now remains `Live target ready` while the demo timeline is replaying, while the
reviewed-recording fallback remains available when no target is configured or
health probing is disabled. Health probing is enabled only for main routes whose
scene is included by Task 1's `isDemoChromeScene`, including Scene 8.
Implemented the repeatable screenshot runner for the Task 1 rehearsal manifest.
## Changed Files
- `web/apps/console/src/presentation/presentation-target-status.ts`
- Removed the `replayActive` argument and replay-specific healthy-target
branch.
- Preserved the public `PresentationTargetHealth` and `TargetProbeState`
types and existing target/probe/liveActive/failureReason inputs.
- `web/apps/console/src/presentation/presentation-target-status.test.ts`
- Updated healthy replay expectations to `ready` / `Live target ready`.
- Added explicit no-target reviewed-recording fallback coverage.
- `web/apps/console/src/presentation/usePresentationTargetStatus.ts`
- Removed replay coupling from health calculation.
- Kept disabled probing generic and ensured it does not call
`workflow.health`.
- `web/apps/console/src/presentation/usePresentationTargetStatus.test.tsx`
- Updated direct replay readiness expectations.
- Added disabled-probing coverage.
- `web/apps/console/src/presentation/PresentationRoute.tsx`
- Replaced the Scene 8 exception with `isDemoChromeScene`-based probing for
main routes.
- `web/apps/console/src/presentation/PresentationRoute.test.tsx`
- Covered healthy direct replay status, Scene 8 probing with a local
composer, title-route non-probing, and existing live controls under the
updated route behavior.
- Added `scripts/presentation-rehearsal.ps1` with configurable base URL, output root, and viewports.
- The runner loads `scripts/presentation-rehearsal-routes.json`, validates the manifest is present/non-empty, captures every route at `1280,720` and `1024,768`, waits 800 ms, and fails with startup/capture errors.
- Added the rehearsal output directory to `.gitignore`.
- Documented the runner in `docs/runbooks/presentation-visual-review.md`.
## Verification
- TDD red run: the updated tests failed against the old replay branch, disabled
Scene 8 probe, and title-route probe behavior as expected.
- Focused tests:
- `pnpm --dir web --filter @lda/console test -- src/presentation/presentation-target-status.test.ts src/presentation/usePresentationTargetStatus.test.tsx src/presentation/PresentationRoute.test.tsx`
- Result: 3 test files passed, 60 tests passed.
- Typecheck:
- `pnpm --dir web typecheck`
- Result: all workspace typecheck projects passed.
- `git diff --check` passed.
```text
pwsh -File scripts/presentation-rehearsal.ps1
PASS: 42 routes x 2 viewports = 84 screenshots captured
git diff --check
PASS: no whitespace errors; only line-ending normalization warnings
```
## Deviations
The users presentation dev server was already running. No server was stopped
or restarted.
The focused route tests that asserted live controls on the default title route
were moved to a demo scene hash, because non-demo routes must no longer probe or
show target health actions. The live action assertions now account for both the
operator-chat and demo-stage controls that are present on a healthy demo route.
## Commit
No footer rendering or file-browser changes were made.
Implementation commit: `3770e345` (`test: add repeatable presentation screenshot rehearsal`)
## Concerns
The existing `OperatorChat.tsx` still has its own `isScene8` action-visibility
condition. It was intentionally left unchanged because it is not target health
or route probing logic, and changing it would exceed this task's scope.
## Review Fix: Hide Target Status Outside Demo Arc
- `PresentationFooter` now derives demo-arc membership from `isDemoChromeScene`
and omits the target status badge for title and other non-demo routes.
- Added footer-level coverage for a non-demo `conclusion` scene and route-level
coverage for `#scene/conclusion/questions` with a configured target.
- No `PresentationStage`, `PresentationDemoRail`, file-browser, or unrelated
chat rendering changes were needed.
## Review Fix Verification
- TDD red run: both new regressions failed against the unconditional footer badge.
- Covering tests:
- `pnpm --dir web --filter @lda/console test -- src/presentation/PresentationFooter.test.tsx src/presentation/PresentationRoute.test.tsx src/presentation/presentation-target-status.test.ts src/presentation/usePresentationTargetStatus.test.tsx`
- Result: 4 test files passed, 63 tests passed.
- Typecheck:
- `pnpm --dir web typecheck`
- Result: all workspace typecheck projects passed.
- `git diff --check` passed.
## Review Fix Concerns
None beyond the pre-existing `OperatorChat.tsx` Scene 8 condition documented
above; Task 3 and unrelated presentation surfaces were not touched.
The script captures screenshots but does not perform DOM geometry assertions;
those remain in the route/browser review and later rehearsal tasks as planned.