Skip to content

Port react-icon-browser's CI, e2e suite and guards - #150

Merged
imanimanyara merged 7 commits into
mainfrom
ci/port-react-icon-browser-ci
Nov 13, 2026
Merged

imanimanyara merged 7 commits into
mainfrom
ci/port-react-icon-browser-ci

Conversation

@imanimanyara

@imanimanyara imanimanyara commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

React consolidation rows 2.6, 3.1 and 3.3 for the browser: react-icon-browser's CI jobs, its Playwright suite and its guards now run in this repository, against resources/js.

  • 2.6 CI. .github/workflows/browser.yml (guards and e2e on pull requests; visual weekly and by dispatch, inside mcr.microsoft.com/playwright:v1.65.0-noble) and visual-baselines.yml (react-icon-browser's seeding workflow, paths moved). Its typecheck, build, lint, Vitest and config-drift jobs were already in tests.yml; actionlint and changelog order in code-quality.yml and changelog.yml. Not ported: build:lib, check:public-api and the consumer self-test (library retired, Q2; removed in Remove the deprecated vendored build and kernel re-exports #146), and the Node 26 leg of its build matrix.

  • 3.1 tests. The 20 specs moved verbatim to e2e/browser/ (commit ec7828e), then rewired: e2e/browser/vite.config.ts builds the standalone harness pages from resources/js and serves them at the root, as the old vite preview did. Playwright: 98 e2e tests (react-icon-browser: 98), 12 visual tests (react-icon-browser: 14; the two dropped render the private bundled and Metronic packs, which cannot be in this public repository). Vitest: 994 passed, 3 skipped (BEFORE: rib 875 + ib 119 = 994 passed).

  • 3.3 guards. Ported and wired as npm scripts: typecheck:domain, typecheck:e2e, boundaries + check:boundary-rules (dependency-cruiser, rules repointed to resources/js), check:schema-types, check:dead-classes (reads the committed public/assets/css), check:dead-links, check:playwright-image. lint already covers what rib's eslint . did: the shared base ignores e2e/** and has no rules for .mjs.

  • Findings the guards made on arrival: no-unreachable flagged core/minifiedBundle.ts (only its test used it), moved to resources/js/test/ in its own commit; check:dead-links found a dead relative link in resources/assets/fonts/README.md, fixed. core-is-a-leaf carries two named exemptions: the Inertia adapter's InertiaCatalog.ts and browserMount.ts, which predate the merge.

  • The svg-baseline sample (.dev/browser/public/baseline/, react-icon-browser's own tabler and flag files) is tracked; noPrivateContent.test.ts checks it by name and manifest.

  • The committed bundle is unchanged, and that took a fix. ichava.scss is a second Tailwind root whose utilities are global (not scoped to the browser). It excluded .dev, where the specs sat; in e2e/browser/ their words became eight global utilities (.hidden, .ring, .grow ...), and committed-build failed on the first push. ichava.scss now excludes e2e/browser and .github (a word in a ported workflow comment added a global .invisible on its own; a word planted in a workflow no longer reaches the bundle). A fresh build equals the committed public/assets byte for byte.

No deprecations in this PR. No file under public/ is touched.

The visual job (Browser visual regression) is skipped on pull requests by design; it and visual-baselines.yml can be dispatched only once they are on main, so the baseline re-seed (row 3.2) follows in its own pull request.

Verification

Local, Node 26, fresh npm install:

  • vitest run: 135 files, 994 passed, 3 skipped. typecheck:inertia, typecheck:domain (18 files), typecheck:e2e, lint: exit 0. actionlint 1.7.12 over all workflows: clean.
  • playwright test --list: e2e 98 tests in 20 files, visual 12 in 2 files. The harness builds (vite build --config e2e/browser/vite.config.ts). The suite itself runs in CI: the sandbox refuses port binding.
  • Each guard proven red with a planted defect, then restored:
Guard Planted Result
check:schema-types a line appended to schema.gen.ts "does not match resources/schema/icon-browser.schema.json"
check:dead-links [x](docs/does-not-exist.md) in README.md "relative link ... does not exist"
check:dead-classes className="ich-planted-dead-class" lists the class
typecheck:domain document.title in CatalogIndex.ts TS2584 Cannot find name 'document'
typecheck:e2e a string assigned to a number in a spec TS2322
boundaries a React import in core/SvgFidelity.ts core-no-react, 2 violations
check:boundary-rules state-not-into-ui set to ignore "did not fire on resources/js/state/probe.ts"
check:playwright-image v1.64.0 in linux.sh "2 different Playwright images are pinned"
noPrivateContent sample check a Metronic file in the sample "the rendering sample holds the public packs only" fails
  • Counts asserted: dead-links reads 587 tracked files (floor 20), dead-classes 536 class names, boundaries 430 modules, the sample check at least 19 files.

Verbatim moves out of .dev/imported/react-icon-browser: the Playwright suite, its baselines and harness pages to e2e/browser/, the dependency-cruiser config and the domain tsconfig to the root. The next commit rewires their paths.
e2e/browser/vite.config.ts builds the standalone harness pages from resources/js and serves them at the root, as react-icon-browser's preview did. The specs, Playwright configs, dependency-cruiser rules, domain tsconfig and the guard scripts in .dev/browser/ now name resources/js, public/assets/css and e2e/browser.

The SVG rendering sample keeps the public packs only (tabler, flag): bundled and metronic are private and this repository is public. Its 18 files are react-icon-browser's own, so the committed tabler and flag baselines still apply.

check-dead-links found a stale relative link in resources/assets/fonts/README.md; it is fixed. @playwright/test is ~1.65.0 to match the pinned image.
dependency-cruiser's no-unreachable rule, ported from react-icon-browser, reports core/minifiedBundle.ts: nothing but its test imports it. It is test support, so it moves to resources/js/test/, which the rule and the Composer archive already exclude. No logic changes.
The svg-baseline spec needs its sample served; it holds tabler and flag only now, so it is tracked, and noPrivateContent.test.ts checks it by name and manifest (proven red with a planted Metronic sample) while every other file still goes through privateContent(). styleRules, prepaint, gaps and visualLinux tests read the harness pages and linux scripts at their new paths. schema-types names this repository's paths and gains npm run schema:types.
browser.yml runs the browser guards and the Playwright suite on pull requests, and the visual suite weekly and by dispatch inside the pinned Playwright image. visual-baselines.yml is react-icon-browser's seeding workflow with its paths moved. actionlint.yaml carries the create-github-app-token v3 ignore for it, as for the two workflows that already use that action.
Copilot AI balanced review requested due to automatic review settings November 13, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

ichava.scss is a second Tailwind root whose utilities are not scoped to the browser. It excluded .dev, where react-icon-browser's specs sat; moved to e2e/browser, their words became eight global utilities (.hidden, .ring, .grow ...) and committed-build failed. It now excludes e2e/browser and .github: a comment in the ported workflows added a global .invisible on its own. A fresh build equals the committed bundle again, and a word planted in a workflow no longer reaches it.
@imanimanyara
imanimanyara merged commit 4583aa3 into main Nov 13, 2026
18 checks passed
@imanimanyara
imanimanyara deleted the ci/port-react-icon-browser-ci branch November 13, 2026 21:27
imanimanyara added a commit that referenced this pull request Nov 13, 2026
* Keep the e2e suite and guard configs out of the Composer archive

#150 added e2e/browser (specs, harness pages, 11 baseline PNGs), .dependency-cruiser.cjs and tsconfig.domain.json to the archive. They are development-only, as is the host e2e check already under e2e/.

* Serve the browser in dev as it ships, and build it in one command

vite.inertia.config.ts scoped the browser's stylesheet and rewrote its font URLs in the build only, so npm run dev put the browser's tokens on :root, its rules on the whole host page and its fonts on a path nothing serves. The scoping now runs in dev too, and dev points the fonts at resources/assets/fonts; devStylesheet.test.ts asks the dev server for the stylesheet in middleware mode and was proven red on the old config. The production bundle is byte-identical.

build and build:prod write resources/views/prepaint.html before the bundle, so a UI change is one build; build:prepaint still works alone. committed-build compares the prepaint view with public/assets.

* Document frontend work on the browser: dev, checks, e2e and the build

A docs/recipes page covers the dev server with hot reload, every check, the Playwright suite and its baselines, and the one build. architecture.md, release.md, getting-started.md and the README index point at it and describe the e2e harness and layering guards.

* Record dev parity, the single build and the archive fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants