Skip to content

docs: remove platform-specific assumptions from the docs build checks and Playwright config #78591

Backlog

Description

@angelica-moreira

Suggested label: bug

Problem

Four spots assume one platform, so the docs build or tests fail on Windows, or on any machine without a system Chromium at a fixed path:

File Assumption What breaks
docs/package.json (build) rm -rf dist The build fails on Windows.
docs/scripts/check-reading-measure.mjs Compares paths with / On Windows the paths use \, so the check fails.
docs/scripts/check-redirects.mjs Line-anchored regex on astro.config.mjs With a CRLF checkout (core.autocrlf) nothing matches.
docs/playwright.config.ts executablePath: '/usr/bin/chromium-browser' Playwright cannot launch where that file does not exist (macOS, Windows, many Linux setups).

Plan

  1. Remove dist with Node: fs.rmSync('dist', { recursive: true, force: true }).
  2. Normalise relative paths to / before comparing them.
  3. Normalise CRLF to LF before parsing the redirect map.
  4. Use /usr/bin/chromium-browser when it exists, and otherwise Playwright's bundled Chromium. Keep this in one shared chromiumUse object so other projects can reuse it.
  5. Update the cracktro skill's note on the browser path.

Done when

  • npm run build and the prebuild checks pass on Windows and Linux.
  • Playwright launches on both.
  • CI behaviour is unchanged: it still uses the system Chromium.

Reference fix

Commit: angelica-moreira@71748f9

Two related portability fixes in tests live in the commits for issue 1 (CRLF clipboard text) and issue 7 (avatar path separator).


A working version of this fix is on my fork, in branch angelica/docs-playwright-fixes (all changes vs main). With all 10 commits applied, the full docs Playwright suite passes (239/239). Feel free to reuse the commit linked above, or to implement the plan differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

backlog:ai-creditscommunity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions