Skip to content

fix: Trace format with snapshots and elements for wdio examples#225

Merged
vishnuv688 merged 10 commits into
webdriverio:vv/devtools-tracemodefrom
Winify:fix/native-mobile-snapshots
Jun 11, 2026
Merged

fix: Trace format with snapshots and elements for wdio examples#225
vishnuv688 merged 10 commits into
webdriverio:vv/devtools-tracemodefrom
Winify:fix/native-mobile-snapshots

Conversation

@Winify

@Winify Winify commented Jun 10, 2026

Copy link
Copy Markdown

What

  • Adds native mobile Appium session support to the trace/snapshot pipeline
  • Improves trace event timing (per-command startTime instead of using the previous command's end)
  • Generates a human/LLM-readable Markdown transcript alongside trace artifacts
  • Improves element selector tracking for trace parameters, adds pre-action snapshot capture
  • Refactors the launcher to skip backend startup entirely in trace mode.

Why

How


Architecture self-check

Required for every non-trivial PR. If a box is unchecked, explain why.

  • No new duplication. This PR does not add a type, constant, enum, or contract that already exists in another package. (If it consolidates one, note which item from CLAUDE.md §7 is being resolved.)
  • No cross-adapter imports. No code in service, nightwatch-devtools, or selenium-devtools imports from another adapter.
  • No adapter imports in backend / app. Neither package reaches into adapter internals.
  • Typed contracts at boundaries. Any new fetch(...), ws.send(...), or HTTP route has a typed request/response shape in shared (or in service types if shared doesn't exist yet, with a TODO to move).
  • No if (framework === '...') outside an adapter. Framework branching uses a typed FrameworkId.
  • No new any at package boundaries. Internal any is acceptable only at a documented framework-edge with a one-line comment.

Multi-adapter changes

  • This PR touches more than one adapter package.

If checked: why isn't this in core? Answer here:


Debt scoreboard

List the CLAUDE.md §7 debt items this PR resolves, partially resolves, or extends. Delete this section only if the PR genuinely affects no debt items.

  • Resolved: <item, or "none">
  • Partially resolved: <item, or "none">
  • New debt introduced: <item, or "none — and explain why if any>

If new debt is introduced, it must be added to CLAUDE.md §7 in this PR.


Testing

  • Unit tests for new logic in shared / core (required per CLAUDE.md §4).
  • Regression test for any bug fix (required per CLAUDE.md §4).
  • pnpm build passes.
  • pnpm test passes.
  • pnpm lint passes.
  • For UI/runtime changes: verified in example/ (or example for the framework I changed).

If any required item is skipped, say so here with the reason:

<your note, or "n/a">


Screenshots / recordings (UI changes only)

Winify added 8 commits June 10, 2026 17:27
- Network: Remove HAR format so player.vibium.dev can parse it
- Launcher: check mode/trace + disableDebugger BEFORE start() so backend never binds a port in trace mode
- Service: drain snapshot captures before next command to prevent fire-and-forget page-state skew; skip monolithic JSON write in trace mode (no double I/O)
- SessionCapturer: track #lastSelector from $/$$/findElement and inject it into element-scoped commands for trace readability
- Zip writer: include transcript.md in trace.zip output
- Capture Date.now() in beforeCommand, thread through to CommandLog, use in trace exporter
- Scenario Outline has a limitation of returning BLANK pages on last snapshot
@Winify Winify requested a review from vishnuv688 June 10, 2026 20:24
Winify added 2 commits June 11, 2026 10:08
- Removing `disableDebugger`
- Introducing `#lastActionTimestamp`
- Adding `--fix` flag in eslint scripts
- "Un-truncating" selectors in transcript
@vishnuv688 vishnuv688 merged commit 738eba4 into webdriverio:vv/devtools-tracemode Jun 11, 2026
3 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.

2 participants