Skip to content

Serve the browser in dev as it ships; one build; frontend docs - #151

Merged
imanimanyara merged 4 commits into
mainfrom
feat/browser-dev-parity
Nov 13, 2026
Merged

imanimanyara merged 4 commits into
mainfrom
feat/browser-dev-parity

Conversation

@imanimanyara

@imanimanyara imanimanyara commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

React consolidation rows 4.1, 4.2 and 3.2 for the browser.

  • 4.1 One dev command with HMR. npm run dev plus ICHAVA_VITE_DEV already loaded resources/js/app.tsx from Vite with React Fast Refresh, but vite.inertia.config.ts scoped the browser's stylesheet and rewrote its font URLs in the build only. In dev the browser's tokens sat on :root, its rules reached the whole host page, and its fonts asked for /fonts/..., which 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 (no port) and checks all three; proven red on the old config (3 of 4 fail). The production bundle is byte-identical.
  • 4.1 One build per change. build and build:prod write resources/views/prepaint.html before the bundle; build:prepaint still works alone. committed-build.yml compares the prepaint view as well as public/assets (a drifted view is rewritten by build:prod, checked locally).
  • Archive fix for Port react-icon-browser's CI, e2e suite and guards #150. /e2e, /.dependency-cruiser.cjs and /tsconfig.domain.json are export-ignored: Port react-icon-browser's CI, e2e suite and guards #150 had grown the Composer archive from 487 to 529 files; it is 484 now (the host e2e spec and its config, also dev-only, left with it).
  • 4.2 Docs. New docs/recipes/frontend-development.md (dev server, checks, e2e, baselines, the one build, and the ichava.scss global-scan trap). architecture.md, release.md, getting-started.md and the README index updated.
  • 3.2 Baselines. The visual gate already passed against the moved baselines on main (run 43510961891, dispatched: guards, e2e and visual all success). The one re-seed allowed for this PR ran on this branch in mcr.microsoft.com/playwright:v1.65.0-noble (visual-baselines.yml, commit: true, run 43512327848): the drift measurement passed 12 of 12, it regenerated them, and it reported changed baselines: 0, "Baselines already match; nothing to commit." So no PNG changed and there is no drift table to post: every one of the 12 baselines react-icon-browser committed is pixel-identical to the browser built from resources/js.
Baseline set Compared Changed
e2e/browser/visual.spec.ts-snapshots 9 0
e2e/browser/svg-baseline.spec.ts-snapshots 2 (+1 coverage test) 0

No deprecations: build:prepaint keeps working.

Verification

  • Local, Node 26: vitest run 136 files, 998 passed, 3 skipped. typecheck:inertia, lint, check:dead-links (incl. the new recipe): exit 0. build:prod: public/assets unchanged. actionlint: clean.
  • git archive HEAD: 484 files, none under e2e/ or the two configs.

#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/.
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.
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.
Copilot AI balanced review requested due to automatic review settings November 13, 2026 21:37

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.

@imanimanyara
imanimanyara merged commit 4d57341 into main Nov 13, 2026
19 checks passed
@imanimanyara
imanimanyara deleted the feat/browser-dev-parity branch November 13, 2026 21:52
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