docs: fix packaged docs against source, ship snippets, check anchors
Merged
OK
10d ago+448+448+012345678901234567890123456789-246-246-012345678901234567890123456789
Every docs/**/*.mdx page ships in the e2e package so coding agents can read the docs offline. An audit of those 57 pages against packages/*/src turned up about 45 wrong or stale claims. This PR fixes them, ships the snippets the pages import, and adds a check for #anchor links, which mint broken-links does not cover.
Packaging
packages/e2e/scripts/prepare-build.tsnow copiesdocs/snippets/*.jsx.quickstartandmodelskeep the provider list (packages, env vars, model setup) only inmodel-provider.jsx, so offline those sections were empty. Every page-levelimportnow resolves inside the package.- New
scripts/check-docs-anchors.ts, run bydocs:check. It slugs headings, tabs, and accordions the way Mintlify does (@sindresorhus/slugify2.2.0, the version@mintlify/commonpins). It found/reference/config#testsinreference/cli.mdx, which matches no heading.
Wrong claims fixed
security.mdxsaid there is no update check, bute2e feedbackfetchesregistry.npmjs.org/e2e/latest.reference/security.mdx:- A tool without
executefails withCONFIG_LOAD_FAILED, notINVALID_CONFIG. - The saved-session envelope keeps the secret-filled flag unencrypted (authenticated only).
- Redaction covers only
.txt/.csv/.json/.html/.htmdownloads. - Limrun is now listed under outbound connections.
- A tool without
reference/engine.mdx: a failingstartVideofails the launch only when the video mode was set explicitly. Also adds the missingEnginePrepareInfo.headed, and mapsselect_at/type_at/press_atto their action kinds.reference/mobile.mdx:mobile({ app })gets the generic unknown-key error. Also covers thepreparefailures that end the run,press('Space'), and theFoldPoseexport.migrate/playwright.mdx:web({ connect })is CDP-only, souse.connectOptionsis now a "missing" row. There is no-g.migrate/maestro.mdx,migrate/detox.mdx,skills/migrate-to-e2e: useinit --engine mobileinstead of initializing for web and swapping the engine by hand.ci/bitrise,ci/codemagic,ci/eas-workflows: Node 24. A preinstalled 22.x can be older than 22.22.3, which fails withNODE_UNSUPPORTED.reference/errors.mdx:AgentErrornow showscategory/retryable/details.- The two conflicting
POLICY_DENIEDrows are merged into one that links the security rules. - Adds how
e2e login/logout/modelsprint failures.
- Smaller fixes:
environment.mdx: 4 CI markers,LIMRUN_*,E2E_WEB_BROWSERS_*, andinheritEnv.agent.mdx:visionwith a custom executor,StepCacheInfo.entry/detail, and mobile's missingselectOption.config.mdx:undefinedhandling.mcp.mdx: exit codes.debugging.mdx: a jq recipe for serial groups, andunbox-ai runs/--run 0.telemetry.mdx:--watchandrun().expect.mdx: two sample messages the code shown could not produce.screen.mdx: null guard onboundingBox()and the swipe duration range.web.mdx:WebBasicAuthandWebInitScript.authentication.mdx: missing imports.
- Source, with an
e2epatch changeset:engine/manifest.ts: theversionerror no longer says the version keys the replay cache (it keys sessions and reports).types.ts: theE2EConfig.outputJSDoc namesresults/instead ofartifacts/.
Pages are not shortened here, to keep the diff reviewable. Per-page shortening PRs stack on this one.
Verified
Ran it locally: yes
pnpm run check, including the new anchor check:docs anchors: 320 anchor links across 57 pages resolve. Onorigin/mainit reportsdocs/reference/cli.mdx:565: no #tests in docs/reference/config.mdx.- The anchor check was run on a scratch page with a 4-backtick fence around a 3-backtick one, duplicate accordion titles,
<span id>,<Card id>, an explicit tabid, and a{#custom}heading. Each case resolves or fails the way Mintlify renders it. node scripts/prepare-build.ts && npm pack --dry-run: 57 pages plus 5docs/snippets/*.jsxship, and every pageimportresolves inside the package.- Every changed claim was checked against
packages/*/srcby a separate fresh-context verification pass. mint devrenders the changed pages:
errors.mdx POLICY_DENIED | debugging.mdx serial groups | web.mdx WebBasicAuth |
|---|---|---|