Add video behavior diffing and DOM timeline comparison#1
Merged
Conversation
…d marketing plan - Video diffing: extract frames from base/PR interaction videos using Playwright, compare frame-by-frame with pixelmatch, produce per-frame diff images and a divergence timeline showing when behavior diverges - DOM timeline: capture DOM snapshots before and after interactions, diff them across branches to detect structural changes during user flows - Capture stabilization: disable CSS animations/transitions by default, support content masking via CSS selectors, wait for font loading, add --force-device-scale-factor=1 and --disable-gpu for consistent rendering - Intelligence layer: extract video and DOM timeline signals, link DOM timeline changes to video differences via causality detection, factor video behavior changes into risk scoring - Report: add Video Behavior Diff and DOM Timeline Changes sections to PR comments, update pages table with Video column - Tests: add DOM timeline diffing tests and video/DOM-timeline signal extraction tests (51 tests passing, TypeScript clean) - Marketing plan: target market analysis, channel strategy, content calendar, competitive positioning, and messaging guidelines for openClaw https://claude.ai/code/session_01Fr1W1ZRMMiSAvkHTpZoHP9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two major new capabilities to BehaviorDiff: video behavior diffing and DOM timeline comparison. These features enable detection of behavioral differences that visual screenshots alone cannot capture, particularly useful for reviewing AI-generated code where interactions and state changes matter as much as static appearance.
Key Changes
Video Behavior Diffing
src/diff/video.ts: Extracts frames from recorded videos at configurable intervals, compares frames pixel-by-pixel using pixelmatch, and generates a divergence timeline showing when and how much the behavior differsVideoDiff,VideoFrameDifftypes to track frame-level and overall video comparison resultsDOM Timeline Comparison
src/diff/dom-timeline.ts: Compares DOM snapshots captured at interaction checkpoints (e.g., "before-interaction", "after-interaction")DomSnapshot,DomTimelineDiff,DomTimelineChangetypesSignal Extraction & Intelligence
extractVideoSignals()andextractDomTimelineSignals()insrc/intelligence/signals.tsto identify behavioral anomaliesdetectDomTimelineVideoCausality()to link DOM structure changes to visible video differencesCapture & Reporting
src/runner/capture.tsnow records DOM snapshots during interactions and video files; added animation stabilization CSS to prevent flaky diffsdisableAnimationsflag (default true) andmaskarray inPageConfigfor masking dynamic contentsrc/report/opinionated-markdown.tsgenerates new sections for video behavior diffs and DOM timeline changes with visual divergence timelinesaction.ymlnow exportshas-video-changesandrisk-levelfor downstream workflow decisionsTesting
tests/diff-video-signals.test.tsandtests/diff-dom-timeline.test.tsvalidate signal extraction and DOM timeline diffing logicNotable Implementation Details
diffCaptures()is now async to support video processing, which requires frame extraction and comparisonThis enables reviewers to answer "what does this PR actually do?" — not just "what code changed?" — which is especially critical for AI-generated PRs where behavioral correctness is paramount.
https://claude.ai/code/session_01Fr1W1ZRMMiSAvkHTpZoHP9