Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to this project.
Please be respectful and constructive in all interactions. We aim to create a welcoming environment for all contributors.
- Node.js 24 LTS
- pnpm 12
- Git
For Tauri and Dioxus contributions, you also need:
- Rust
-
Fork the repository
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/desktop-mobile.git cd desktop-mobile -
Install dependencies:
pnpm install
-
Build all packages:
pnpm build
-
Run tests to verify setup:
pnpm turbo run test --filter=./packages/*
See docs/setup.md for detailed setup instructions.
Create a new branch for your changes:
git checkout -b feature/my-feature
# or
git checkout -b fix/my-bugfixBranch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test improvementschore/- Build/tooling changes
- Write code following our coding standards
- Add tests for new functionality
- Update documentation as needed
- Ensure tests pass:
pnpm turbo run test --filter=./packages/*(the rootpnpm testalso runs the E2E and package tests) - Ensure linting passes:
pnpm lint
We use conventional commits for clear commit history:
git add .
git commit -m "feat: add new feature"Commit message format:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Build process or tooling changesperf: Performance improvements
Scope:
Scope by framework, not package name. Most changes that touch a service, its plugin, fixtures, and E2E tests are all part of the same logical unit of work. For cross-cutting changes, omit the scope.
# Framework-scoped (changes within one framework's ecosystem)
git commit -m "feat(tauri): complete mocking"
git commit -m "fix(electron): windows multiremote"
git commit -m "fix(dioxus): embedded port conflict on linux"
# No scope (cross-cutting or shared changes)
git commit -m "refactor: extract shared diagnostics to native-utils"
git commit -m "docs: update installation instructions"
git commit -m "chore: update deps"git push origin feature/my-featureThen create a pull request on GitHub with:
- Clear title describing the change
- Description of what changed and why
- Reference to any related issues
- Screenshots (if applicable)
- Use TypeScript strict mode
- Prefer
undefinedovernull - Use ESM (ES Modules) everywhere
- Avoid
any- use proper types - JSDoc for public APIs only when necessary (prefer self-documenting code)
- Use 2 spaces for indentation
- Use single quotes for strings
- Use trailing commas in objects and arrays
- Max line length: 120 characters
- Use arrow functions for callbacks
Our linters (Biome and ESLint) will auto-fix most style issues:
pnpm lint:fix
pnpm format- No barrel files (
index.tswith only re-exports) except in package roots - Avoid nested ternaries - extract logic for readability
- Use meaningful names for files and directories
- Keep files focused - one main export per file
- All code must have 80%+ test coverage
- Write tests for:
- New features
- Bug fixes
- Edge cases
- Error handling
We use Vitest for testing:
import { describe, expect, it, beforeEach, afterEach } from 'vitest';
describe('MyFeature', () => {
it('should do something', () => {
expect(doSomething()).toBe(expected);
});
it('should handle errors', () => {
expect(() => doSomethingBad()).toThrow('Error message');
});
});# Run every package's tests
pnpm turbo run test --filter=./packages/*
# Run tests for specific package
pnpm --filter @wdio/electron-service test
# Run tests with coverage
pnpm test:coverage
# Run tests in watch mode
pnpm --filter @wdio/electron-service vitest- JSDoc for public APIs only when necessary
- Prefer self-documenting code over comments
- No comments unless the logic isn't self-evident
- Each package must have a comprehensive README
- Include installation, usage, API docs, and examples
- Keep READMEs up to date with code changes
- Update
docs/when adding new features - Don't edit CHANGELOG.md: ReleaseKit generates it from conventional commits
Ensure your PR passes all checks:
# Build all packages
pnpm build
# Run linting
pnpm lint
# Run type checking
pnpm typecheck
# Run every package's tests
pnpm turbo run test --filter=./packages/*
# Run tests with coverage
pnpm test:coverage- Code follows project conventions
- Tests added/updated and passing
- Test coverage ≥ 80%
- Documentation updated
- Commit messages follow convention
- No TypeScript errors
- Linting passes
- All CI checks passing
- Maintainers will review your PR
- Address any requested changes
- Once approved, a maintainer will merge
The macOS CrabNebula E2E leg needs CN_API_KEY, which GitHub withholds from forks — so on a fork PR
it is skipped, and a required CrabNebula / macOS check blocks merge until a maintainer verifies it.
Contributors: if your fork PR changes Tauri, that check stays pending until a maintainer reviews
the diff and runs it — nothing for you to do. Keep pnpm-lock.yaml, build.rs, and .github changes
minimal and clearly explained to make review quick; pushing a new commit re-opens the check.
Maintainers: verifying runs the fork's untrusted code with the key, so review the diff first
(the Fork Risk Scan status arms this, with detail in the Security tab) — look for non-registry
dependencies, unexpected preinstall/postinstall scripts or a .pnpmfile.cjs, build.rs /
[build-dependencies] additions, .github edits, and env-read → network shapes. Then apply one label:
crabnebula:run(preferred) — mirrors the reviewed head onto an internal branch and runs macOS CrabNebula with onlyCN_API_KEY(no other secrets), posting the result back asCrabNebula / macOS.crabnebula:verified— manual attestation, e.g. after running the E2E locally with the key.⚠️ Do not verify by opening an internal PR from the fork's code: that runs with the full secret set (TURBO_TOKEN,DEPLOY_KEY), not justCN_API_KEY.
A new push clears both labels, so re-verify after any change. If CN_API_KEY ever leaks, rotate it.
When contributing to the Electron service:
- Maintain backward compatibility
- Test on Windows, macOS, and Linux
- Test with both Electron Forge and Builder
- Test with ESM and CJS configurations
When contributing to the Tauri service:
- Maintain backward compatibility with tauri-driver
- Test on Windows, macOS, and Linux
- Test with multiremote configurations
- Ensure plugin communication works correctly
- Test with various Tauri configuration patterns
When contributing to the Dioxus service or its Rust crates (wdio-dioxus, wdio-dioxus-bridge, wdio-dioxus-embedded-driver, wdio-dioxus-driver):
-
Maintain backward compatibility with
wdio_dioxus::install(config), the API apps call -
Test on Windows, macOS, and Linux (for the
'embedded'provider) -
Always build the Dioxus fixture app in debug mode — the bridge is compiled behind
#[cfg(debug_assertions)]and will not be present in release builds -
Build the fixture app before running E2E tests:
cd fixtures/e2e-apps/dioxus cargo build -
Run the Dioxus unit and integration tests:
pnpm --filter @wdio/dioxus-service test:unit pnpm --filter @wdio/dioxus-service test:integration
-
Run the Dioxus E2E tests (requires a built fixture app):
cd e2e pnpm wdio run wdio.dioxus-embedded.conf.ts -
On Linux, install Xvfb. WebdriverIO starts it for the run.
-
The
'external'provider is Windows-only in v1. Linux support is deferred to v1.1. Do not attempt to test the'external'provider on Linux or macOS. -
See App Setup for how the embedded driver and bridge integrate with a Dioxus application
When contributing to shared utilities:
- Keep utilities framework-agnostic
- Document extension points clearly
- Consider impact on all services
This repository does not maintain LTS or backport branches. Only the latest version on main receives updates. For details, see MAINTENANCE.md.
Releases are automated via GitHub Actions using a standing release PR (ReleaseKit's standing-pr strategy): changes merged to main accumulate in an always-open PR from release/next, and merging that PR publishes everything queued in it.
- Merge your PR to
mainnormally — no release labels needed - The
standing-pr.ymlworkflow rebuilds the standing release PR with the queued version bumps (derived from conventional commits) and changelogs - When ready to release, merge the standing PR — the publish runs automatically with the versions from its manifest
Adjusting the queued release: labels on the standing PR itself override its contents — bump:patch/bump:minor/bump:major force a bump magnitude, scope:* limits which packages release, release:stable/release:prerelease set the channel. Labels on feeder PRs are advisory only.
Preview: The release-preview.yml workflow comments on PRs showing what their merge would queue.
For changes that must publish on merge without waiting for the standing PR:
- Add
release:immediateto your PR, plus a scope label (scope:tauri,scope:electron, …) and a bump label (bump:patch,bump:minor,bump:major) - After CI passes on the merge, the gate dispatches a direct scoped release
- The standing PR is reconciled afterwards so it no longer contains the just-released changes
Examples:
release:immediate+scope:electron+bump:major→ Electron packages at major bump- Add
release:prereleaseto publish the immediate release as a prerelease (e.g., 11.0.0-next.0)
For scoped releases without labels or for dry runs:
- Go to Actions → Release in GitHub
- Click "Run workflow"
- Select scope, version type, and dry run option (leave
standing_pr_numberblank; enablereconcile_afterto rebuild the standing PR afterwards) - Monitor the workflow execution
A brand-new package has no tag yet, so ReleaseKit treats its package.json version as the floor and bumps up from it. Stage the manifest deliberately so the first publish lands where you intend:
- User-facing service on a
1.0.0-nextprerelease line (a new@wdio/*-service): setversionto0.0.1, then run a Manual Release with version type prerelease and bumpmajor→ publishes1.0.0-next.0. (Bumpprereleasewould give1.0.0-next.1— it only increments an existing counter.) - Shared/internal package going straight to stable
1.0.0(a new@wdio/native-*): setversionto1.0.0-next.0, then release with version type stable → ReleaseKit graduates it to1.0.0, ignoring the bump. (A bare1.0.0overshoots — amajorbump publishes2.0.0.)
After the first publish the new tag drives every later version and the manifest floor stops mattering: further prereleases increment (next.1, next.2, …) and release:stable graduates the line to 1.0.0.
See ReleaseKit's versioning docs for the underlying rules.
| Label | Effect |
|---|---|
Scope labels — scope:<framework> (electron, tauri, dioxus, electrobun, react-native, flutter) for a framework's whole package family; scope:native-<pkg> (native-utils, native-types, native-spy, native-core, native-cdp-bridge, native-mobile-core) for a single shared package |
Package set (immediate release, or scope override on the standing PR) |
bump:patch / bump:minor / bump:major |
Version bump (immediate release, or bump override on the standing PR) |
release:immediate |
Bypass the standing PR — direct release on merge (requires scope + bump labels) |
release:prerelease |
Prerelease modifier (use with bump labels) |
release:stable |
Graduates a prerelease to its stable version; bump labels are ignored |
GitHub release notes are published per user-installed package — not per internal dependency. Packages that users only consume transitively are versioned and tagged but skipped from release notes (configured via publish.githubRelease.skipPackages in releasekit.config.json).
| Framework | Packages with release notes | Skipped |
|---|---|---|
| Electron | @wdio/electron-service |
@wdio/native-utils, @wdio/native-spy, @wdio/native-types, @wdio/native-core |
| Tauri | @wdio/tauri-service, tauri-plugin, tauri-plugin-webdriver |
— |
| Dioxus | @wdio/dioxus-service, wdio-dioxus |
wdio-dioxus-bridge, wdio-dioxus-embedded-driver, wdio-dioxus-driver |
| Electrobun | @wdio/electrobun-service |
@wdio/native-cdp-bridge, @wdio/native-utils, @wdio/native-spy, @wdio/native-types |
Tauri's plugins and Dioxus's wdio-dioxus get their own release notes because apps install them directly: the plugins as Cargo dependencies with capability and permission setup, wdio-dioxus as a Cargo dependency. Their breaking changes need their own changelog entries. The packages these pull in, such as the Dioxus bridge and embedded driver, are skipped, as Electron's internal packages are.
- Questions: Ask on GitHub Discussions
- Bugs: Report on GitHub Issues
- Discord: Join the WebdriverIO Discord for real-time support
Contributors will be:
- Credited in CHANGELOG.md
- Listed in package.json contributors
- Recognized in release notes
Thank you for contributing! 🎉