feat: Introduce Vibium-tracing into the WebdriverIO ecosystem #110
Draft
Winify wants to merge 8 commits into
Draft
feat: Introduce Vibium-tracing into the WebdriverIO ecosystem #110Winify wants to merge 8 commits into
Winify wants to merge 8 commits into
Conversation
Adds opt-in trace recording that produces a zip playable at player.vibium.dev. - New `src/trace/` module: types, tool mapping, session state, recorder HOF, zip writer - `withTrace` HOF wraps action tools alongside `withRecording`; captures a JPEG screenshot after each action - `start_session` gains `trace: true` flag to enable recording per session - New `export_trace` MCP tool writes the trace zip to a specified path or temp dir - `src/trace.ts` barrel export mirrors the `snapshot.ts` pattern for future extraction to `@wdio/trace` - 26 new unit tests covering tool mapping, state lifecycle, HOF event emission, and zip structure - The zip is automatically saved to .trace/<timestamp>-<sessionId>.zip relative to the server's cwd
Expands the roadmap with details on mobile trace recording for Appium sessions, including specific goals, advantages, and dependencies. Also outlines plans for WebDriver BiDi-based asynchronous trace recording. Streamlines future development priorities and feature dependencies.
Introduces `src/show-trace.ts`, a Node.js CLI to serve trace zip files via HTTP and open them in the Vibium trace player. Automatically detects the latest trace zip or accepts a path as an argument. Updates `package.json` and `tsup.config.ts` to integrate the tool.
Introduces a detailed documentation file outlining the vision, workflow, and components for trace recording and deterministic replay. Covers `.vibium` spec, `.trace` format, self-healing mechanism, and future considerations.
- Remove hardcoded viewport from trace to match the browserSession - Remove references to non-existent export_trace tool
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.
Proposed changes
Adds Vibium-compatible trace recording for both browser and mobile (iOS/Android) sessions.
When a session is started with
trace: true, every tool call is captured as a structured trace event: before/after timestamps, action class and method, parameters, and screenshots.Its exported to a .zip file on session close. The zip is playable directly in the Vibium player (player.vibium.dev) with a full action timeline and screenshot filmstrip.
Key design decisions:
Types of changes
Checklist
Further comments
Reviewers: @webdriverio/project-committers