Skip to content

Host the trace player at trace.webdriver.io #494

Open
8 of 14 issues completed
Open

Description

@vishnuv688

Problem

Opening a trace zip today needs the DevTools package installed locally and show-trace <trace.zip> run against it. Anyone the zip is handed to (a reviewer, a QA engineer, someone triaging a CI failure) has to set up a Node project first just to look at it.

Proposal

Host the trace player at https://trace.webdriver.io, next to https://benchmark.webdriver.io. The user opens the page, drops a trace zip on it (or picks one), and the player opens it. show-trace stays for offline and air-gapped use.

The zip never leaves the browser

A trace records everything the run showed or typed, credentials included (there is no redaction in capture). The hosted player therefore parses the zip entirely client-side: no upload, no server-side processing, no analytics. The landing page states this.

How it works today

  1. show-trace reads the zip from disk (packages/backend/src/show-trace.ts).
  2. parseTraceZip() in packages/backend/src/trace-reader.ts turns it into a TracePlayerData payload.
  3. The backend serves that payload at TRACE_API.get; the app's DataManager fetches it and calls loadPlayerData().

parseTraceZip already takes a Uint8Array and uses fflate, which runs in browsers. The only Node dependency on its path is packages/trace/src/sha1.ts (node:crypto), reached through sourceResourceName. The disk read lives only in the readTraceZip wrapper.

Work

  • Move the reader into packages/trace. It is the read side of the trace format, which both the backend and the app need. The backend keeps a thin readTraceZip that reads the file and delegates.
  • Make sha1Hex browser-safe, either a small pure-JS SHA-1 or Web Crypto (async, so its callers change).
  • Hosted mode in the app. When nothing answers at TRACE_API.get, show a landing screen with drag-and-drop and a file picker, parse with File.arrayBuffer(), and call the existing loadPlayerData(). Optional: ?trace=<url> to load a zip served with CORS.
  • Hide live-only controls (Run all, Rerun, Preserve & Rerun, Stop) in hosted mode, as player mode already does.
  • Static build + Vercel config. A root vercel.json (build command, output directory, headers) following https://github.com/webdriverio/benchmark: Vercel's Git integration deploys main and gives every PR a preview URL. Headers: X-Robots-Tag: noindex and a strict Content-Security-Policy (connect-src limited so the page cannot send trace data anywhere).
  • Tests for the moved reader running without Node built-ins, and for the hosted-mode load path.
  • Docs: README and the docs site (website/docs/devtools/**, e.g. wdio/TraceMode.md) point to the hosted player alongside show-trace.

Needs a maintainer with access to the webdriverio Vercel team

  • Import webdriverio/devtools as a Vercel project (same setup as benchmark).
  • Add trace.webdriver.io as its domain, plus the DNS record.

The code can land and be tested on a PR preview deploy before the domain goes live.

Activity

  1. self-assigned this
    on Oct 29, 2026
  2. vishnuv688 commented on Oct 29, 2026

    @vishnuv688
    MemberAuthor

    PRs for this issue, in merge order. Each is stacked on the one before it; when a base merges and its branch is deleted, GitHub retargets the next PR to main, and its Closes #N link takes effect then.

    Order PR Issue
    1 #506 Move the trace zip reader from backend into trace prepares this issue and #493
    2 #507 Host the trace player as a static page with no backend this issue (the hosted player itself)
    3 #508 Store each action screenshot once in the trace zip closes #495
    4 #509 Fail the examples smoke job when an example's traces outgrow a budget closes #496
    5 #513 Name trace screenshots by their actual image format closes #505
    6 #514 Parse the hosted player's trace in a Web Worker closes #497
    7 #515 Test the trace reader against real zips from an older writer first part of #510
    8 #517 Generate the app's dead theme color utilities closes #504
    9 #518 Check the hosted trace player end to end on every PR closes #511
    10 #519 Report where trace capture time goes, behind DEVTOOLS_CAPTURE_TIMING step 1 of #516
    11 #520 Remove duplicated styling and style tooling from the app duplicate cleanup
    12 #521 Remove duplicated code from shared, core, backend and conformance duplicate cleanup
    13 #522 Move duplicated adapter code into core duplicate cleanup
    14 #523 Open several trace zips or a whole run in the player closes #501
    15 #527 Run no script from a replayed trace, in any player mode security hardening

    This issue stays open after #507 until its remaining sub-issues and the hosting setup (Vercel project and the trace.webdriver.io domain) are done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions