docs(electron): shorten the guide and drop the engine lessons section

Merged
OK
2d ago
+24-63

What

The Engines page no longer has the "Learn from the Electron engine" section: the paragraph calling @e2e-dev/electron the model for an outside engine, and the table of contract assumptions it broke.

The Electron guide says less before the first test: a one-sentence description and lede, a shorter experimental warning, two sentences of setup where there were seven, and a plain line for what the electron fixture does.

Why

The section records how the contract changed while the Electron engine was built. A reader choosing how to write an engine does not act on that history, and the page's two tables already send them to the guide and the reference.

On the Electron guide, the opening repeated itself (description, lede, warning) and the setup section explained binary downloads a first-time reader does not need.

How it works

  1. docs/engines.mdx and its Portuguese copy docs/pt/engines.mdx drop the section. The Japanese and Chinese pages never had it, and no link pointed at its anchor.
  2. Three places promised the removed table and now do not: the "Engines" card at the end of docs/electron.mdx (and its pt and id copies) reads "Write an engine of your own.", packages/electron/README.md drops the sentence linking to it, and AGENTS.md drops "docs/engines.mdx lists the assumptions it broke".
  3. docs/electron.mdx: the description is "Test an Electron app end to end with @e2e-dev/electron.", the lede no longer names the accessibility tree, DevTools protocol, or trusted input, and the warning drops the list of what can change. "Set up" keeps "launches the electron package installed in your project" and npx e2e doctor. "Point at your app" and "The electron fixture" each open with one or two short sentences.
  4. docs/reference/electron.mdx takes the one fact the guide held alone: runs sharing an electron package wait for its download, and how ELECTRON_OVERRIDE_DIST_PATH changes that. It also states what packages/electron/src/executable.ts:201 does: an override directory with no binary fails with INVALID_CONFIG instead of downloading, unless it is the package's dist with an unfinished install (usesIncompleteDistribution, line 50).

Facts cut on purpose, with where they still live:

FactStill documented
Core exports expressionSelectorsdocs/reference/engine.mdx
The engine ignores --headeddocs/electron.mdx
Windows are EngineSnapshot.tabsdocs/electron.mdx
app.open() calls session.restart when there is no session.opendocs/reference/engine.mdx
Download on Electron 45 and newer, packaged apps back to Electron 22docs/reference/electron.mdx, executablePath
Shared-download wait and ELECTRON_OVERRIDE_DIST_PATHdocs/reference/electron.mdx, moved there
What app.launchArguments may hold, appPath relative to the project rootdocs/reference/electron.mdx
Accessibility tree and trusted inputdocs/reference/electron.mdx lede
file: pages an Electron app loads on its own are outside the file-app boundPartly: docs/reference/electron.mdx, Security, covers file: pages outside the app's directory. The link to the file-app bound is gone

docs/engines.mdx goes from 67 lines and 517 words to 51 lines and 339 words. docs/electron.mdx goes from 445 lines and 2235 words to 434 lines and 2088 words.

Verified

Ran it locally: yes

  • pnpm docs:check: passes.
docs anchors: 7926 anchor links across 458 pages resolve
docs mdx: 458 pages compile as standard MDX
  • grep for engines#learn and the Portuguese slug across the repo: no hits.
  • Rendered pages: the docs preview comment on this PR links /docs/engines and /docs/electron.

Checklist

  • Changeset added (pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.
  • Breaking change: title carries !, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md).
  • Docs updated in the same PR: the docs/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.