Skip to content

feat(selenium-devtools-py): record a dense filmstrip into the trace - #342

Merged
vishnuv688 merged 6 commits into
mainfrom
vv/290-python-filmstrip
Aug 31, 2026
Merged

feat(selenium-devtools-py): record a dense filmstrip into the trace#342
vishnuv688 merged 6 commits into
mainfrom
vv/290-python-filmstrip

Conversation

@vishnuv688

@vishnuv688 vishnuv688 commented Aug 31, 2026

Copy link
Copy Markdown
Member

What & why

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Polish (an improvement to an existing feature)
  • Breaking change (existing behavior changes for users)
  • Documentation
  • Internal (build, CI, dependencies, tooling)

Packages touched

  • shared (types and contracts)
  • core (framework-agnostic capture/reporting)
  • elements (published element/snapshot API — @wdio/elements)
  • service (WebdriverIO adapter)
  • nightwatch-devtools (Nightwatch adapter)
  • selenium-devtools (Selenium adapter)
  • backend (server)
  • app (UI)
  • script (page-injected runtime)
  • selenium-devtools-py

Notes for reviewers

Screenshots / recordings

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds dense Selenium Python filmstrips to backend-generated trace archives and completes the previously requested lifecycle and retry fixes.

  • Streams screencast frames to the backend in bounded batches.
  • Retains frames from finalized and still-live WebDriver sessions.
  • Uses an inclusive timestamp watermark to retry only the unsent tail without losing equal-timestamp frames.
  • Adds backend accumulation/export support and focused lifecycle, batching, and retry tests.

Confidence Score: 5/5

The PR appears safe to merge because the previously reported filmstrip lifecycle and retry failures are fixed.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/selenium-devtools-py/src/selenium_devtools/init.py Enables filmstrip capture and coordinates frame streaming, retry watermarks, and run-state reset; the previously reported retry boundary issues are addressed.
packages/selenium-devtools-py/src/selenium_devtools/instrumentation.py Collects finalized and live recorder buffers and preserves live frames across uninstall before session state is cleared.
packages/selenium-devtools-py/src/selenium_devtools/trace_export.py Streams frame batches defensively without allowing optional filmstrip failures to break the Selenium run.
packages/backend/src/baselineStore.ts Accumulates the new screencast frame stream for subsequent server-side trace export.
packages/backend/src/trace-export.ts Passes non-empty dense filmstrip data into trace generation while preserving sparse fallback behavior.
packages/selenium-devtools-py/tests/test_filmstrip.py Covers batching, live and finalized frame retention, opt-out behavior, retry boundaries, equal timestamps, decimation, and uninstall ordering.

Sequence Diagram

sequenceDiagram
    participant R as Selenium recorder
    participant P as Python adapter
    participant B as Backend
    participant T as Trace exporter
    R->>P: Buffered screencast frames
    P->>B: screencastFrames batches
    B->>B: Accumulate frames in active run
    P->>B: traceExport request
    B->>T: Export active run with dense filmstrip
    T-->>B: trace.zip
    B-->>P: Export result
    Note over P,B: Failed exports retry from the inclusive timestamp watermark
Loading

Reviews (4): Last reviewed commit: "fix(selenium-devtools-py): keep the boun..." | Re-trigger Greptile

Comment thread packages/selenium-devtools-py/src/selenium_devtools/__init__.py Outdated
Comment thread packages/selenium-devtools-py/src/selenium_devtools/__init__.py Outdated
Comment thread packages/selenium-devtools-py/src/selenium_devtools/__init__.py Outdated
Comment thread packages/selenium-devtools-py/src/selenium_devtools/__init__.py Outdated
@vishnuv688 vishnuv688 linked an issue Aug 31, 2026 that may be closed by this pull request
@vishnuv688
vishnuv688 merged commit bc5386d into main Aug 31, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filmstrip: emit the screencastFrames scope

1 participant