Repository navigation
Conversation
changeset status failed on a changeset naming the private @wdio/devtools-core package, which would also fail changeset version in release.yml. Core is bundled into the adapters that already carry the entry. Adds changesets for the driver-window fixes in service (85b5d9c) and nightwatch (ada9fd5, 8a001dd), and corrects the python-release.yml header, which still told maintainers to bump __version__ by hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes commands that do not exist (nightwatch example, root-level selenium example scripts) and stale paths, adds the otel package to ARCHITECTURE.md and the PR template, documents manifest v2, the typing-read frame hold, the adapter telemetry/manifest contract and DEVTOOLS_CAPTURE_TIMING, and refreshes file-size debt counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[Medium impact] The reviewed changes appear safe to merge. SummaryUpdates release metadata and brings documentation closer to the current code.
Reviews (3) · Last reviewed commit: "Address review feedback on the release-p..." · Reviewed by Greptile |
The example config traces by default, so the plain demo command produced a trace file instead of the UI the section promises. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vishnuv688
left a comment
There was a problem hiding this comment.
The release unblock is right: removing the private @wdio/devtools-core from the mixed changeset is what changeset version needs. My comments are about doc and changelog accuracy.
Two points that don't attach to a diff line:
- Pre-existing, but this release would ship it:
.changeset/otel-attempt-trace-ids.mdsays the manifest "now carries ... thecwd" and per-attempt trace ids, whilemanifest-relative-artifact-paths.mdsays the absolutecwdis gone and every attempt of a test shares one trace id. Both will land in the same CHANGELOG entry. Since this is the release-prep PR, couldotel-attempt-trace-ids.mdbe reworded to describe the final state? - Website mirror: the user-facing README changes (manifest v2, the typing-read frame hold,
DEVTOOLS_CAPTURE_TIMING) need the matchingwebdriverio/webdriveriowebsite/docs/devtools/**update..claude/rules/capability-tables.mdasks for that in the same change, and deferring it means the docs site will be missing these when the release goes out.
|
|
||
| `mode` is `'live' | 'trace' | 'telemetry'` (`DevToolsMode`, `packages/shared/src/types.ts`). `startsBackend(mode)` (`packages/shared/src/mode-traits.ts`) says whether a backend and window start. Telemetry starts neither and writes no zips, so the manifest is its only output. | ||
|
|
||
| An adapter does not write the manifest itself. It builds a `TraceExportContext` and awaits core's `finalizeTraceExport(ctx)` at the end of the run; the service's `#traceContext` and Selenium's `buildTraceExportContext` are the two examples. The call writes `devtools-artifacts-<sessionId>.json` (`artifactsManifestFilename`, `buildArtifactsManifest` and `writeArtifactsManifest` in `packages/core/src/artifacts-manifest.ts`) in every mode where the manifest is enabled, always in telemetry, and does not throw. |
There was a problem hiding this comment.
Important: This guide is written for adapters in languages that can't import the TypeScript packages, so a Java or Ruby author can't build a TraceExportContext or call finalizeTraceExport. As written, §2e doesn't say what such an adapter has to do for telemetry or the manifest. Python, the guide's worked example, writes no manifest at all.
Suggestion: describe the manifest contract a non-JS adapter must produce (filename, manifestVersion, required fields), or say that telemetry and the manifest are JS-only today and the Python adapter doesn't write one.
Also, the "Field-level reference" pointer two lines down (examples/o11y/README.md) has no field reference; see my comment on README.md.
There was a problem hiding this comment.
Addressed in 6cf52a9: §2e now says telemetry and the manifest are JS-only today (the Python adapter writes none), and points at packages/shared/src/artifacts-manifest.ts as the schema.
| '@wdio/nightwatch-devtools': patch | ||
| --- | ||
|
|
||
| The filmstrip no longer holds its poll for a Nightwatch command that never calls back from the driver, such as `browser.element()`, `actions()` or a custom command that never calls its `done` callback. A driver window now opens only for input commands, commands the trace maps to an action, and known driver reads. |
There was a problem hiding this comment.
Nit: The filmstrip driver-window gate this fixes was added in 573a886, after the last npm release (c3b6242), and filmstrip-poll-queue.md, which introduces it, is still pending. The CHANGELOG would announce that a hold users never had "no longer" happens, right next to the entry that adds the gate. Same for service-no-driver-window-injection.md ("used to hold the filmstrip's poll"). Could both be folded into filmstrip-poll-queue.md?
There was a problem hiding this comment.
Addressed in 6cf52a9: both folded into filmstrip-poll-queue.md.
|
|
||
| To export telemetry, install [`@wdio/opentelemetry`](packages/otel/README.md) and push the manifests after the run, with `OTEL_EXPORTER_OTLP_ENDPOINT` set: `npx wdio-otel push test-results/devtools-artifacts-*.json`. Each test attempt becomes a span. Its attributes let you slice the spans by commit and branch, CI pipeline (detected on GitHub Actions and GitLab CI, or set in `OTEL_RESOURCE_ATTRIBUTES`), browser, spec and session. | ||
|
|
||
| The manifest is format version 2 (`manifestVersion: 2`). Artifact paths are relative to the manifest's directory, so the directory can move. The attempt that decided a test carries `final: true`. The absolute `cwd` field is gone. Without a `TRACEPARENT`, every attempt of one test shares a trace id derived from `DEVTOOLS_RUN_ID` and the test's uid. Field-level reference: [examples/o11y/README.md](examples/o11y/README.md). |
There was a problem hiding this comment.
Nit: Two things in this paragraph:
- "Field-level reference: examples/o11y/README.md": that README covers the
wdio-otelCLI, Tempo queries and bucket setup. It never mentionsmanifestVersion,final,attempts[]or relative paths.packages/shared/src/artifacts-manifest.tsis the actual schema (same pointer in docs/ADAPTERS.md). - "The absolute
cwdfield is gone" describes a change rather than current state. A first-time reader never saw acwd. The changeset already records the removal, so this could read "The manifest carries no absolute paths" or be dropped.
There was a problem hiding this comment.
Addressed in 6cf52a9: the reference now points at packages/shared/src/artifacts-manifest.ts. On the cwd wording: a specFile outside the working directory still stays absolute, so the README says that rather than "no absolute paths".
| **Passwords and credentials are redacted by default.** Before a test types into an `<input type="password">` (WebdriverIO `setValue` / `addValue`, Selenium `sendKeys`, Nightwatch `setValue` / `setPassword` / `sendKeys` / `updateValue`, Python `send_keys`), the adapter reads the field's type and, for a password field, adds the typed value to the run's redaction set, so the row that types it already carries `••••`, a fixed placeholder that hides its length. From then on the value is replaced in everything the adapter sends or writes: every row, result and error (the Actions list, step titles once re-sent, the Log and Errors sections), `transcript.md` and the trace's action events, console lines and captured stdout, network URLs, headers and bodies, the DOM anchor and every mutation, the element and accessibility captures, the test source, the suite tree and the run's metadata. Independently of any typing, the values of `Authorization`, `Proxy-Authorization`, `Cookie` and `Set-Cookie` are replaced in every network row's `headers`, `requestHeaders` and `responseHeaders` and so in the trace's HAR, keeping the header names; each cookie's value in a navigation row's `cookies` (`document.cookie`) is replaced, keeping its name, and so is the `value` of every cookie object a command returns (`getCookies`). All of this follows `maskInputs`: `maskInputs: false` turns it off with the page masking. | ||
|
|
||
| The field-type read is one driver round trip per typing command whose value is 4 characters or more and not already known, taken before the keys are sent. WebdriverIO starts it in `beforeCommand` of the `elementSendKeys` that `setValue` / `addValue` issue (reading the element's `type` property) without holding that hook, and waits for it only before the row is recorded; Selenium awaits `getProperty('type')` on the element before `sendKeys` reaches the driver; Nightwatch queues a `perform` ahead of the typing command that runs one script over the raw WebDriver transport, resolving the selector as a WebDriver find does: its first match, by the call's `using` argument or the definition's `locateStrategy`, else the client's strategy (`useXpath()` / `useCss()` as the test last called them, then the `use_xpath` setting), CSS or XPath only; Python reads `getElementProperty` before `sendKeysToElement` runs. Each read is capped at 2 s and never holds the command back. A read that fails or times out, or a field the adapter cannot locate to read (on Nightwatch, one located by a strategy other than CSS or XPath, or with no selector), counts as a password field: the typed value is redacted, since redacting a value that was not a password is the safer error, and the run logs one warning that names no value. Nightwatch's `setPassword` is taken as a password without a read. In Python a session whose read timed out reads no more, since the abandoned read is still on the session, and what it types afterwards is redacted the same way. A field that answers with no type at all (an element that is not a form control) is not a password field, except on a WebdriverIO Appium mobile-web session, whose direct read cannot tell that answer from a failed one and redacts. Native app sessions skip it on every adapter; on an Appium mobile-web session WebdriverIO reads straight from the driver rather than through `browser`, as its other in-hook probes do. | ||
| The field-type read is one driver round trip per typing command whose value is 4 characters or more and not already known, taken before the keys are sent. WebdriverIO starts it in `beforeCommand` of the `elementSendKeys` that `setValue` / `addValue` issue (reading the element's `type` property) without holding that hook, and waits for it only before the row is recorded; Selenium awaits `getProperty('type')` on the element before `sendKeys` reaches the driver; Nightwatch queues a `perform` ahead of the typing command that runs one script over the raw WebDriver transport, resolving the selector as a WebDriver find does: its first match, by the call's `using` argument or the definition's `locateStrategy`, else the client's strategy (`useXpath()` / `useCss()` as the test last called them, then the `use_xpath` setting), CSS or XPath only; Python reads `getElementProperty` before `sendKeysToElement` runs. Each read is capped at 2 s and never holds the command back. Frames the adapter sends while a read is in flight are held until it settles, at most 2 s, so none can carry a password before it is learned. A read that fails or times out, or a field the adapter cannot locate to read (on Nightwatch, one located by a strategy other than CSS or XPath, or with no selector), counts as a password field: the typed value is redacted, since redacting a value that was not a password is the safer error, and the run logs one warning that names no value. Nightwatch's `setPassword` is taken as a password without a read. In Python a session whose read timed out reads no more, since the abandoned read is still on the session, and what it types afterwards is redacted the same way. A field that answers with no type at all (an element that is not a form control) is not a password field, except on a WebdriverIO Appium mobile-web session, whose direct read cannot tell that answer from a failed one and redacts. Native app sessions skip it on every adapter; on an Appium mobile-web session WebdriverIO reads straight from the driver rather than through `browser`, as its other in-hook probes do. |
There was a problem hiding this comment.
Nit: This paragraph covers all four adapters, but only the JS core holds frames during the read (session-capturer.ts / secret-redaction.ts). Nothing in the Python adapter does. Since it's a redaction guarantee, could it say the hold applies to the JS adapters (where WebdriverIO's read runs alongside the typing), and that the Python and Selenium adapters finish the read before sending the keys?
There was a problem hiding this comment.
Addressed in 6cf52a9: the hold is scoped to the JS adapters (core SessionCapturerBase), Selenium awaits its read before sendKeys, and Python has no hold.
Point the manifest field reference at the shared schema and state that only the JS adapters write it. Scope the secret-read frame hold to the JS adapters, fold the two changesets for an unreleased fix into the filmstrip one, record eslint line counts, and install before building in the Nightwatch example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Clears the way to cut a release from
main. The npm release was blocked, and some docs had drifted from the code. This PR changes only changesets, Markdown and one workflow comment; no source code.Release readiness (audit of main @ 257e7fb)
.changeset/attempt-end-time-and-queued-scenario-feature.mdnamed the private@wdio/devtools-core, sopnpm changeset statusexited 1 ("Mixed changesets … not allowed").release.ymlrunschangeset version, which fails the same way. Core is bundled into the service and selenium packages, which the changeset already names.minor. This is a deliberate choice; the changeset body already says the manifest format changed incompatibly.native-element-treefragment needs a backend that is not on npm yet (BACKEND_NPM_VERSIONis still2.2.0).pre.json, npmlatestmatches every publishedpackage.json, capability tables in sync.Changes
Commit 1: changesets and workflow
@wdio/devtools-coreline from the mixed changeset.service-no-driver-window-injection.mdandnightwatch-no-driver-window.md(patch).python-release.yml: correct the header comment. The job bumps__version__itself withchanges.py apply.Commit 2: docs synced with the code
examples/nightwatch/README.md(pnpm exampledoes not exist; nowpnpm demo:nightwatch).packages/selenium-devtools/README.md(example:*scripts are package-scoped; nowpnpm --filter). The truncatedexample:mentions inARCHITECTURE.mdandexamples/README.mdnow list the real scripts.examples/MOBILE.md(removed config file),packages/elements/ROADMAP.md(element-filter.tsnow lives intrace).otelentry inARCHITECTURE.mdand the PR template (withconformance). A manifest v2 note and the typing-read frame hold (at most 2 s) inREADME.md. A telemetry and artifacts-manifest section for adapter authors indocs/ADAPTERS.md.DEVTOOLS_CAPTURE_TIMINGin the service, selenium and nightwatch READMEs.CLAUDE.mdfiles, updated to currentwc -lcounts.Release steps after merge
release.yml). Expected bumps: minor for@wdio/devtools-backend,@wdio/devtools-service,@wdio/nightwatch-devtools,@wdio/selenium-devtoolsand@wdio/opentelemetry(first release, 0.1.0); patch for@wdio/devtools-appand@wdio/elements.release.ymlopens. BumpBACKEND_NPM_VERSIONand addACTION_SNAPSHOT_PAGE_SOURCE_KEYtoREQUIRED_BACKEND_NAMESincheck_backend_pin.py(.claude/rules/releasing.md). If the PR was opened withGITHUB_TOKEN, close and reopen it to get checks.python-release.yml:selenium-devtools-py0.5.0 (changes.py next-version), 7 fragments. Tagpy-v0.5.0only after the publish succeeds.webdriverio/webdriveriowebsite/docs/devtools/**(.claude/rules/capability-tables.md). This is not done in this PR.Follow-ups, not in this PR
native-page-source-capture(patch, but adds a capture) and the cucumber manifest-entry changesets (patch, but they change the manifest contract).@wdio/devtools-appand@wdio/devtools-scriptare published to npm with no README.Verification
pnpm changeset status: exit 0 (was 1 on main)pnpm docs:capabilities --check: exit 0pnpm typecheck: exit 0pnpm lint: 0 errors (existing max-lines warnings only)package.jsonin a close-out review.🤖 Generated with Claude Code