Skip to content

Align the tooling, workflows and development environment with React UI - #69

Draft
bedrich-schindler wants to merge 28 commits into
masterfrom
maintenance/align-tooling-config
Draft

bedrich-schindler wants to merge 28 commits into
masterfrom
maintenance/align-tooling-config

Conversation

@bedrich-schindler

@bedrich-schindler bedrich-schindler commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Align the build, lint and test configs, the GitHub workflows and the
development environment with React UI and the RACOM projects. The library
source code does not change, and the production bundle.js is byte-identical.

Dependencies

  • Declare babel-jest and add markdownlint-cli2 with the ranges of React
    UI. Remove style-loader and css-loader.
  • Point bugs.url and the author URL to the Docoff repository.

Build

  • Rename the Babel config to babel.config.mjs with the structure of the
    React UI file. The only difference is the prismjs plugin.
  • Split the webpack config into webpack/ with the React UI layout, and
    remove the overridden first headers key and the .css rule, which
    matched no module.
  • Give performanceConfig one limit for production and one for development,
    about 10 % above the current bundle sizes, with hints: 'error'.

Lint

  • Rename test:eslint to lint:eslint and add lint, which runs ESLint and
    markdownlint.
  • Add an allowlist globalIgnores to eslint.config.mjs, so that eslint
    without a path lints src, webpack and the root config files. Use the
    tooling block of the other projects for the tooling files.
  • Add .markdownlint.jsonc and .markdownlint-cli2.jsonc of React UI and the
    script lint:markdownlint. Reformat README.md and one line of
    .claude/agents/code-reviewer.md to pass, with the words unchanged.

Tests

  • Move the Jest config from package.json to jest.config.mjs. The same
    three packages are exempt from transformIgnorePatterns.
  • Remove the test script.

CI

  • Call npm run lint in lint.yml and release-management.yml.
  • Pin Node.js and npm through NODE_VERSION and NPM_VERSION, and use
    actions/checkout@v6 and actions/setup-node@v7. lint.yml is the same
    file as in react-ui, eslint-config and stylelint-config.
  • Pass repo-token to pr-labeler-action under with, and set the
    release_url output, which the release workflow prints.
  • Add the tooling and development environment paths to CODEOWNERS.

Development environment

  • Use the development environment layout, setup.sh and
    docker/build-docker-images.sh of the other projects, without the sudo
    restriction. Add tools/run-in-devcontainer.sh and the script
    start:chrome.
  • Move scripts/mcps/chrome-host/ to tools/agents/mcps/chrome-host/,
    scripts/auto-start-node.sh to scripts/docker/autoStartNode.sh and
    scripts/write-lockfile-hash.sh to scripts/writeLockfileHash.sh.
  • Run fixuid before chown in the devcontainer entrypoint, which failed on
    hosts with a UID other than 1000.
  • Align .env.dist and .gitignore with the other projects, and remove the
    unused PW_WORKERS and PW_CT_PORT.
  • Use the shared .editorconfig and reindent public/main.css and
    public/shadow.css with 4 spaces.
  • Indent Python files with 4 spaces in .editorconfig.

Behaviour changes

  • test:eslint is renamed to lint:eslint, and npm test no longer exists.
    Run npm run lint and npm run test:jest.
  • The build fails when the bundle exceeds the size limit. Before, every build
    printed three size warnings and passed.
  • COMPOSE_START_PORT is renamed to COMPOSE_WEB_SERVER_PORT. The default
    host ports are 21040 for the web server, 21042 for the Playwright report and
    21043 for the host Chrome debug port, instead of 8080, 9323 and 9333.
  • The Docker directories and images are named docoff-devcontainer and
    docoff-devcontainer-local. An existing .env and docker-compose.yml
    use the old names, so developers recreate them once with
    bash setup.sh --recreate-files.

Testing

Before the last push, npm ci, lint, Jest and the build passed from a clean
install in this repository.

`sudo chown` ran before `fixuid` remapped the user, so it failed on Linux
hosts with a UID other than 1000.
The common sections (dependencies, local environment, AI assistant files, IDE, Python, logs, `.gitkeep`) now have the same lines in the same order in every project with a development environment. Project paths are in the `# Project` section at the top.

* Ignore `/.env*` except the `.dist` files instead of `.env` in any directory.
* Ignore `/docker-compose.yml.backup`, `npm-debug.log*`, Python caches and the IDE directories `.idea` and `.vscode`.
The RACOM projects use the name `writeLockfileHash.sh` for the same script. The file mode changes to 644 as in those projects, because `postinstall` runs the script with `sh`.
The development environment was an older copy of the one that the other projects use. The paths, the directory names and `setup.sh` differed, so the files could not be compared or updated together.

* Split the devcontainer into `docker/frontend-devcontainer/`, which is a copy of the shared `frontend-devcontainer` image source, and `docker/docoff-devcontainer/`, which adds the `node`, `npm` and `npx` wrappers and the `sudo` restriction. The copy adds the check that warns when the environment definition changed after the container was created.
* Name the Docker directories and images with `-` instead of `_`: `docoff-devcontainer` and `docoff-devcontainer-local`.
* Replace `setup.sh` and `docker/build-docker-images.sh` with the shared versions. `setup.sh` gains `--rebuild-docker-images` and `--recreate-files`, normalizes the project name and maps `SHELL`, `EDITOR` and `VISUAL` to values that exist in the container.
* Move `scripts/mcps/chrome-host/` to `tools/agents/mcps/chrome-host/` and `scripts/auto-start-node.sh` to `scripts/docker/autoStartNode.sh`.
* Add `tools/run-in-devcontainer.sh`.
* Remove `RUN mkdir /workspace` from the `node` and `playwright` images, because `WORKDIR` creates the directory.
* Update the paths in `.gitignore`, `.mcp.json`, `opencode.json`, `CLAUDE.md` and `docs/ai-integration.md`.
The default host ports in `.env.dist` were 8080 and 9323, and the host Chrome debug port was 9333. The other projects used the same defaults, so two projects with the default configuration could not run side by side.

* Rename `COMPOSE_START_PORT` to `COMPOSE_WEB_SERVER_PORT`, which is the name that the other projects and the shared `start-host-chrome.sh` use, and set it to 21040. `docker-compose.base.yml` no longer has a fallback for the variable, as for the other port.
* Set `COMPOSE_PLAYWRIGHT_REPORT_PORT` to 21042 and `CHROME_DEBUG_PORT` to 21043.
* Set `CHROME_START_URL` to the dev server over HTTP, because `start-host-chrome.sh` opens the application over HTTPS by default.
* Leave `COMPOSE_UID` and `COMPOSE_GID` empty. `setup.sh` fills them in, and the preset 1000 hid a missing configuration on hosts with another UID.
* Fix the width of the section frames and use the comments of the other projects.
* Update the variable name and the default ports in `README.md` and `docs/`.

The ports inside the containers stay the same.
The config is now an ES module with the same structure and option order as
`babel.config.mjs` of React UI. The differences to React UI are the `prismjs`
plugin and nothing else.

* Read the `core-js` version with a JSON import instead of `require`.
* Apply `@babel/preset-react` through `overrides` that exclude `.ts` files,
  like React UI does. Docoff has no `.ts` sources, so the build output is
  the same.
The layout is the one React UI uses: `webpack.config.mjs` calls
`webpack/webpackConfig.mjs`, which builds the configuration from one file per
section in `webpack/_config/`. The files are ES modules.

* Remove the first `headers` key of the dev server config. The second
  `headers` key in the same object overrode it.
* Rename `MAX_OUTPUT_SIZE_KB` to `MAX_OUTPUT_SIZE_BYTES`, because webpack
  reads the limit in bytes.
* Resolve the `resolve.fallback` packages with `createRequire`.
* Add `/webpack/` to `CODEOWNERS`.

The production `bundle.js` is byte-identical to the one built with the previous
`webpack.config.js`.
No module in `src/` imports a CSS file, so the rule matched nothing and the
bundle contains no `style-loader` runtime. The production `bundle.js` stays
byte-identical.

webpack 5.111 sets `experiments.css` to `auto`, which enables its own CSS
support when no rule matches `.css` files. A CSS import added later is
handled by webpack itself.

* Remove the `style-loader` and `css-loader` development dependencies.
The scripts have the names and the commands used in React UI and in the RACOM projects, where `npm run lint` runs the linters and `npm test` does not exist.

* Rename `test:eslint` to `lint:eslint` and add `lint`, which runs it.
* Remove `test`. Run `npm run lint` and `npm run test:jest` instead.
* Add the allowlist `globalIgnores` to `eslint.config.mjs` and run `eslint` without a path. ESLint lints `src`, `webpack` and the `*.config.js` and `*.config.mjs` files in the root, which is 148 files instead of the 134 files in `src`.
* Let the tooling files import development dependencies.
* Order the scripts by name and put `scripts` before `dependencies`.

The workflows in `.github/workflows` still call `npm run test:eslint`.
The `docoff/tooling` block has the same three rules as the `tooling` block in React UI and in the RACOM projects. It turns off `import-x/extensions` and `no-console` for the tooling files in addition to allowing development dependencies.
React UI and the RACOM projects keep the Jest config in a config file and build `transformIgnorePatterns` from a list of package names. docoff now does the same. The pattern exempts the same three packages as before.
The `test:eslint` script was renamed to `lint:eslint`, so `lint.yml` and `release-management.yml` called a script that does not exist. Both now call `npm run lint`, which runs `lint:eslint`.
`pull-request-meta.yml` set `repo-token` under `env`, where the action does not read it. The action took its default token. `repo-token` is now under `with`, as in `eslint-config` and `stylelint-config`.
- Define `NODE_VERSION` and `NPM_VERSION` in `env` of `lint.yml`, `test.yml` and `release-management.yml` and install the pinned npm after Node.js. Node.js 26.13.1 bundles npm 11.20.0, so the versions in use do not change.
- Use `actions/checkout@v6` and `actions/setup-node@v7` in all workflows.
- Name the step that runs `npm run lint` in `lint.yml` `Lint`.

`lint.yml` is now the same file as in `react-ui`, `eslint-config` and `stylelint-config`.
The step "Write out the release URL" prints `steps.github_release.outputs.release_url`, but the step `github_release` never wrote that output, so the printed URL was empty. The added line is the one that `eslint-config` and `stylelint-config` use.
Jest transforms the tests with `babel-jest` and `babel.config.mjs`, but only `jest` was declared. React UI declares `babel-jest` with the same range. The installed version stays 30.5.2.
React UI, `eslint-config` and `stylelint-config` lint their Markdown files, Docoff did not.

* Add `.markdownlint.jsonc` and `.markdownlint-cli2.jsonc`, byte-identical to the React UI files.
* Add `markdownlint-cli2` with the range that React UI uses, and the script `lint:markdownlint`, which `npm run lint` now runs too.
* Reformat `README.md` and one line of `.claude/agents/code-reviewer.md` to pass: wrap lines at 80 characters, surround fenced code blocks with blank lines, indent nested lists by 4 spaces. The words are unchanged.

The packages that `markdownlint-cli2` adds to the lockfile have the versions that the React UI lockfile has.
Docoff ships `tools/agents/mcps/chrome-host/` and sets `CHROME_START_URL` in `.env.dist`, but had no script that starts the host Chrome. The script is the one that React UI has.
`bugs.url` in `package.json` pointed to the issues of `react-ui-org/react-ui`, while `homepage` and `repository` point to `react-ui-org/docoff`.
The limit was 1600000 bytes while the production bundle has 1782259 bytes, and `hints` was not set. Every build therefore printed three warnings and passed.

`performanceConfig` now has the shape of the React UI file: one limit for production and one for development, with `hints: 'error'`. The limits are about 10 % above the current bundle sizes, which are 1782259 bytes in production and 10743086 bytes in development.
`.editorconfig` is now byte-identical to the file of React UI, `eslint-config` and `stylelint-config`. The shared file indents CSS and Markdown files by 4 spaces, so `public/main.css` and `public/shadow.css` are reindented.
Docoff has no Playwright config and no `test:playwright*` script, so nothing reads `PW_WORKERS` and `PW_CT_PORT`. The `playwright` service and its report port stay.
Add `/jest.config.mjs`, which React UI lists, and `/scripts/`, `/setup.sh` and `/tools/`, which belong to the development environment like `/docker/`.
The port is the one that `COMPOSE_WEB_SERVER_PORT` publishes, and RA2W and WECL label the forwarded port of their web server "Web server".
@mbohal
mbohal requested a balanced review from Copilot November 19, 2026 10:42

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 wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

`/.devcontainer/`, `/.env.dist` and `/.github/workflows/` get the owners of the other infrastructure and build tooling entries.
The URL pointed to the contributors of `react-ui`. `eslint-config` and `stylelint-config` link their own contributors page.
The devcontainer limited passwordless `sudo` to `docker` and `chown`. The
other projects use the `frontend-devcontainer` image without that limit, and
the project layer is now the same as theirs.
@bedrich-schindler bedrich-schindler changed the title Run fixuid before chown in the devcontainer entrypoint Align the tooling, workflows and development environment with React UI Nov 19, 2026
`tools/agents/mcps/chrome-host/cdp_proxy.py` is indented with 4 spaces, and
`.editorconfig` set 2 spaces for every file without its own section.

* Add a `[*.py]` section with `indent_size = 4` after `[*.{cpp,hpp}]`.

The file stays byte-identical in frontend_tooling, React UI, docoff,
eslint-config and stylelint-config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants