Skip to content

PMM-15288 Migrate UI toolchain to pnpm + oxlint/oxfmt - #5728

Open
nachodd wants to merge 7 commits into
mainfrom
PMM-15288
Open

PMM-15288 Migrate UI toolchain to pnpm + oxlint/oxfmt#5728
nachodd wants to merge 7 commits into
mainfrom
PMM-15288

Conversation

@nachodd

@nachodd nachodd commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Ticket number: PMM-15288

Feature build: SUBMODULES-0

What

Splits the toolchain half of #5653 into its own PR. This one carries only the package manager, linter/formatter and library upgrades; the SEP UI migration (new components, routes, packages/sep/*) stays in #5653, which is now stacked on top of this branch.

Toolchain

  • yarn 1 → pnpm 11 across ui/. pnpm-workspace.yaml replaces the yarn workspaces/resolutions block; yarn.lockpnpm-lock.yaml. overrides, packageExtensions and allowBuilds carry over the constraints the yarn resolutions encoded.
  • ESLint/Prettier → oxlint/oxfmt. One oxlintrc.json + .oxfmtrc.json at the workspace root replace the per-package .eslintrc/.prettierrc files.
  • tsconfig.base.json holds the compiler options shared across packages; the workspace root tsconfig.json extends it. Its main consumers — packages/sep/* and packages/plugins/atw — arrive in the stacked child PR PMM-15216 Migrate the SEP UI into PMM #5653, which is why it lands here. apps/pmm and apps/pmm-compat intentionally keep their own configs (ES2020 target and @grafana/tsconfig respectively).

Libraries

React 18 → 19, React Router 6 → 7, Vite 5 → 8, Vitest 2 → 4, TypeScript 5 → 6, @testing-library/react 15 → 16, jsdom 24 → 29, @percona/percona-ui 1.0.23 → 1.0.24.

Two dependencies that yarn's flat node_modules provided implicitly are now declared, since pnpm's isolated store doesn't hoist them: material-react-table (apps/pmm) and @jest/globals (apps/pmm-compat).

vitest.config.ts drops the hardcoded ../../node_modules React aliases — those paths don't exist under pnpm — in favour of resolve.dedupe.

Build & dev environments

corepack teaches the rpmbuild images, the devcontainer and the UI CI workflow about pnpm. It resolves the version from the packageManager field in ui/package.json, so the version is pinned in exactly one place and a bump needs no Dockerfile edit. yarn stays installed for dashboards/pmm-app, which is still a yarn 1 project.

Review comments from #5653 addressed here

  • @maxkondr"Is it possible to pass pnpm version during docker build (read from some file in repo)?" Yes: the hardcoded npm install -g pnpm@11.1.3 is gone from all three rpmbuild Dockerfiles, replaced by RUN corepack enable. corepack reads packageManager from ui/package.json at build time, so the version lives in one place.
  • @ademidoff"Do we really need both pnpm and yarn?" Yes. ui/ builds with pnpm; dashboards/pmm-app (the QAN Grafana plugin) is still a yarn 1 project and is built from the same image. The Dockerfile comment now says so explicitly.
  • @ademidoff"I don't really understand what this PR has to do with the entrypoint and postgres-migration... please remove that code" Removed. The PostgreSQL/entrypoint changes are not in this branch and have been dropped from PMM-15216 Migrate the SEP UI into PMM #5653 too; they belong to PMM-15238: Expose the built-in PostgreSQL to SEP #5700.

Verification

From ui/:

Check Result
pnpm install clean
make format-check (oxfmt) 512 files, all formatted
make lint (oxlint) 0 errors
make test (vitest) 53 files passed, 330 tests passed, 1/13 skipped
make build pmm + pmm-compat build
turbo run check-types clean

Re-run after the review fixes in aa6feae; all still clean.

Related

If this PR adds, removes or alters one or more API endpoints, please review and update the relevant API documentation as well:

  • API Docs updated

Replaces yarn 1 with pnpm 11 across the ui/ workspace and swaps
ESLint/Prettier for oxlint/oxfmt, then brings the runtime libraries up to
the versions the workspace is pinned against.

Toolchain:
- pnpm-workspace.yaml replaces the yarn "workspaces"/"resolutions" block;
  yarn.lock is dropped for pnpm-lock.yaml. Overrides, packageExtensions
  and allowBuilds carry over the constraints yarn resolutions encoded.
- oxlintrc.json / .oxfmtrc.json replace the per-package .eslintrc and
  .prettierrc files; every package's lint/format scripts point at them.
- tsconfig.base.json centralizes the compiler options each package used
  to repeat.

Libraries: React 18 -> 19, React Router 6 -> 7, Vite 5 -> 8, Vitest 2 -> 4,
TypeScript 5 -> 6, @testing-library/react 15 -> 16, jsdom 24 -> 29,
@percona/percona-ui 1.0.23 -> 1.0.24.

Two dependencies that yarn's flat node_modules provided implicitly are now
declared, since pnpm's isolated store does not hoist them:
material-react-table (apps/pmm) and @jest/globals (apps/pmm-compat).

vitest.config.ts drops the hardcoded ../../node_modules React aliases,
which do not exist under pnpm, in favour of resolve.dedupe.

Build and dev environments learn pnpm via corepack, which resolves the
version from the packageManager field in ui/package.json so it is pinned
in exactly one place: the rpmbuild images, the devcontainer setup and the
UI CI workflow. yarn stays installed for dashboards/pmm-app, which is
still a yarn 1 project.

Signed-off-by: Ignacio Durand <nachodurand@gmail.com>
@nachodd
nachodd requested a review from a team as a code owner August 3, 2026 17:03
Copilot AI review requested due to automatic review settings August 3, 2026 17:03
@nachodd
nachodd requested a review from a team as a code owner August 3, 2026 17:03
@nachodd
nachodd requested review from ademidoff, mattiasimonato and maxkondr and removed request for a team August 3, 2026 17:03
@it-percona-cla

it-percona-cla commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The UI workspace migrates from Yarn to pnpm and from ESLint/Prettier to Oxc tooling. It adds workspace and TypeScript configuration, updates application dependencies and tests, and aligns development, CI, container, and documentation workflows.

Changes

UI tooling migration

Layer / File(s) Summary
Workspace and package foundations
ui/package.json, ui/pnpm-workspace.yaml, ui/tsconfig*.json, ui/packages/shared/...
The workspace adds pnpm package discovery, dependency rules, overrides, shared TypeScript settings, package metadata, and React 18/19 peer support.
Tooling and package scripts
ui/.oxfmtrc.json, ui/oxlintrc.json, ui/.vscode/settings.json, ui/apps/*/package.json, ui/apps/pmm-compat/tsconfig.json, ui/apps/pmm/vitest.config.ts
Application scripts and configuration switch to Oxlint and Oxfmt. Dependencies and test configuration are updated for the new toolchain.
Source and test updates
ui/apps/pmm-compat/src/..., ui/apps/pmm/src/..., ui/apps/pmm-compat/.config/webpack/webpack.config.ts
Source formatting is standardized, webpack ESLint integration is removed, and React Router, TypeScript, timeout, and module declarations are updated.
Environment and documentation integration
.devcontainer/*, .github/workflows/ui.yml, build/docker/rpmbuild/*, ui/Makefile, ui/README.md, ui/apps/pmm/README.md, AGENTS.md
UI installation, development, build, linking, CI, and container workflows use pnpm through Corepack. Documentation uses the corresponding commands.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the migration from Yarn to pnpm and from ESLint/Prettier to oxlint/oxfmt.
Description check ✅ Passed The description follows the template and provides scope, related work, API documentation status, and detailed verification results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.43%. Comparing base (31318c7) to head (8721ffd).
⚠️ Report is 102 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5728      +/-   ##
==========================================
+ Coverage   43.59%   45.43%   +1.84%     
==========================================
  Files         415      418       +3     
  Lines       43134    43334     +200     
==========================================
+ Hits        18804    19690     +886     
+ Misses      22454    21703     -751     
- Partials     1876     1941      +65     
Flag Coverage Δ
admin 34.96% <ø> (+0.17%) ⬆️
agent 51.12% <ø> (+2.07%) ⬆️
managed 45.00% <ø> (+2.02%) ⬆️
vmproxy 72.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ui/Makefile`:
- Around line 1-31: Add a .PHONY declaration covering every command target
defined in the Makefile—dev, ci, format, format-check, lint, test, setup, build,
release, and clean—so matching files or directories cannot cause GNU Make to
skip their recipes.

In `@ui/packages/shared/package.json`:
- Around line 9-24: Update the package entry mappings in package.json so
published consumers resolve only generated artifacts under dist: change the
typesVersions target from src/index.tsx and the exports "." target from
src/index.ts to their corresponding dist files. Preserve the existing main,
module, and types entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 64ede41a-cc65-4f62-b444-b65244f73733

📥 Commits

Reviewing files that changed from the base of the PR and between c6029fc and 7e531d4.

⛔ Files ignored due to path filters (2)
  • ui/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • ui/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (49)
  • .devcontainer/Makefile
  • .devcontainer/setup.sh
  • .github/workflows/ui.yml
  • AGENTS.md
  • build/docker/rpmbuild/Dockerfile.el8
  • build/docker/rpmbuild/Dockerfile.el9
  • build/docker/rpmbuild/Dockerfile.hetzner-el9
  • ui/.oxfmtrc.json
  • ui/.vscode/settings.json
  • ui/Makefile
  • ui/README.md
  • ui/apps/pmm-compat/.config/webpack/webpack.config.ts
  • ui/apps/pmm-compat/.eslintrc
  • ui/apps/pmm-compat/.prettierrc.js
  • ui/apps/pmm-compat/package.json
  • ui/apps/pmm-compat/src/compat.test.ts
  • ui/apps/pmm-compat/src/compat.ts
  • ui/apps/pmm-compat/src/compat/toolbar.tsx
  • ui/apps/pmm-compat/src/contexts/theme/theme.provider.tsx
  • ui/apps/pmm-compat/src/lib/constants.ts
  • ui/apps/pmm-compat/src/lib/utils/document.test.ts
  • ui/apps/pmm-compat/src/lib/utils/document.ts
  • ui/apps/pmm-compat/src/lib/utils/navigator.ts
  • ui/apps/pmm-compat/src/lib/utils/shortcuts.ts
  • ui/apps/pmm-compat/src/lib/utils/variables.test.ts
  • ui/apps/pmm-compat/src/lib/utils/variables.ts
  • ui/apps/pmm-compat/src/plugin.json
  • ui/apps/pmm-compat/src/theme.ts
  • ui/apps/pmm-compat/tsconfig.json
  • ui/apps/pmm/.eslintrc.cjs
  • ui/apps/pmm/README.md
  • ui/apps/pmm/package.json
  • ui/apps/pmm/src/contexts/grafana/grafana.context.types.ts
  • ui/apps/pmm/src/contexts/grafana/grafana.provider.tsx
  • ui/apps/pmm/src/hooks/utils/useKioskMode.test.ts
  • ui/apps/pmm/src/utils/dom.utils.test.ts
  • ui/apps/pmm/src/vite-env.d.ts
  • ui/apps/pmm/tsconfig.json
  • ui/apps/pmm/vite.config.ts
  • ui/apps/pmm/vitest.config.ts
  • ui/oxlintrc.json
  • ui/package.json
  • ui/packages/shared/.eslintrc.cjs
  • ui/packages/shared/.prettierignore
  • ui/packages/shared/package.json
  • ui/packages/shared/tsconfig.json
  • ui/pnpm-workspace.yaml
  • ui/tsconfig.base.json
  • ui/tsconfig.json
💤 Files with no reviewable changes (6)
  • ui/packages/shared/.prettierignore
  • ui/apps/pmm-compat/.prettierrc.js
  • ui/apps/pmm/.eslintrc.cjs
  • ui/apps/pmm-compat/.eslintrc
  • ui/packages/shared/.eslintrc.cjs
  • ui/apps/pmm-compat/.config/webpack/webpack.config.ts

Comment thread ui/Makefile
Comment thread ui/packages/shared/package.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the PMM UI workspace tooling to pnpm (via corepack) and replaces ESLint/Prettier with oxlint/oxfmt, along with associated UI library upgrades and environment/CI updates to keep builds and local dev flows working.

Changes:

  • Switch ui/ workspace management from Yarn 1 to pnpm (workspace file, pinned version via packageManager, updated Make targets, CI/devcontainer/rpmbuild setup).
  • Replace ESLint/Prettier configuration and per-package lint/format scripts with centralized oxlintrc.json + .oxfmtrc.json.
  • Upgrade and adapt UI dependencies/config/tests (React 19, React Router 7, Vite 8, Vitest 4, TS ~6) including pnpm-specific module resolution adjustments.

Reviewed changes

Copilot reviewed 47 out of 51 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ui/tsconfig.json Root tsconfig wiring (currently still extends shared package config).
ui/tsconfig.base.json New shared TS compiler options baseline.
ui/README.md Update UI docs from Yarn to pnpm.
ui/pnpm-workspace.yaml New pnpm workspace + overrides/extensions/build allowances.
ui/packages/shared/tsconfig.json Formatting/structure adjustments to shared package TS config.
ui/packages/shared/package.json Switch shared package scripts to oxlint/oxfmt; dependency/peer updates.
ui/packages/shared/.prettierignore Remove Prettier ignore file (Prettier removed).
ui/packages/shared/.eslintrc.cjs Remove ESLint config (ESLint removed).
ui/package.json Workspace root updated for pnpm + oxlint/oxfmt + TS 6.
ui/oxlintrc.json Add centralized oxlint rule set + ignores.
ui/Makefile Replace yarn invocations with pnpm + corepack bootstrap.
ui/apps/pmm/vitest.config.ts Remove hardcoded node_modules aliases; use dedupe/inline for pnpm React singleton.
ui/apps/pmm/vite.config.ts Docs tweak for pnpm link.
ui/apps/pmm/tsconfig.json TS option update (ignoreDeprecations) and config tweaks for TS6.
ui/apps/pmm/src/vite-env.d.ts Add wildcard module declaration for @fontsource/* side-effect imports.
ui/apps/pmm/src/utils/dom.utils.test.ts Test timeout adjustment + globalThis usage fix.
ui/apps/pmm/src/hooks/utils/useKioskMode.test.ts Update mocking approach for React Router v7 ESM module semantics.
ui/apps/pmm/src/contexts/grafana/grafana.provider.tsx Ref typing initialization adjustment for stricter TS/react types.
ui/apps/pmm/src/contexts/grafana/grafana.context.types.ts Update iframe ref typing to allow null.
ui/apps/pmm/README.md Update local linking docs from yarn link to pnpm link workflow.
ui/apps/pmm/package.json Upgrade core UI deps (React 19, Router 7, Vite/Vitest/TS) + add missing deps under pnpm.
ui/apps/pmm/.eslintrc.cjs Remove ESLint config (ESLint removed).
ui/apps/pmm-compat/tsconfig.json Add ts-node compiler options for tooling compatibility.
ui/apps/pmm-compat/src/theme.ts Formatting changes (oxfmt).
ui/apps/pmm-compat/src/plugin.json Formatting changes (oxfmt).
ui/apps/pmm-compat/src/lib/utils/variables.ts Formatting changes (oxfmt).
ui/apps/pmm-compat/src/lib/utils/variables.test.ts Formatting changes (oxfmt).
ui/apps/pmm-compat/src/lib/utils/shortcuts.ts Formatting changes (oxfmt).
ui/apps/pmm-compat/src/lib/utils/navigator.ts Formatting changes (oxfmt).
ui/apps/pmm-compat/src/lib/utils/document.ts Formatting changes (oxfmt).
ui/apps/pmm-compat/src/lib/utils/document.test.ts Formatting changes (oxfmt).
ui/apps/pmm-compat/src/lib/constants.ts Formatting changes (oxfmt).
ui/apps/pmm-compat/src/contexts/theme/theme.provider.tsx Formatting changes (oxfmt).
ui/apps/pmm-compat/src/compat/toolbar.tsx Formatting changes (oxfmt).
ui/apps/pmm-compat/src/compat.ts Formatting + minor readability changes while adapting toolchain.
ui/apps/pmm-compat/src/compat.test.ts Formatting changes (oxfmt).
ui/apps/pmm-compat/package.json Switch lint/format to oxlint/oxfmt; add explicit deps needed under pnpm.
ui/apps/pmm-compat/.prettierrc.js Remove Prettier config (Prettier removed).
ui/apps/pmm-compat/.eslintrc Remove ESLint config (ESLint removed).
ui/apps/pmm-compat/.config/webpack/webpack.config.ts Remove ESLint webpack plugin integration.
ui/.vscode/settings.json Switch editor integration hints from ESLint to oxc/oxlint.
ui/.oxfmtrc.json Add centralized oxfmt config + ignore patterns.
build/docker/rpmbuild/Dockerfile.hetzner-el9 Enable corepack in rpmbuild image for pnpm resolution.
build/docker/rpmbuild/Dockerfile.el9 Enable corepack in rpmbuild image for pnpm resolution.
build/docker/rpmbuild/Dockerfile.el8 Enable corepack in rpmbuild image for pnpm resolution.
AGENTS.md Update UI dependency add guidance from yarn to pnpm.
.github/workflows/ui.yml Switch CI caching to pnpm + enable corepack.
.devcontainer/setup.sh Install pnpm via corepack (keep yarn for dashboards/pmm-app).
.devcontainer/Makefile Update devcontainer UI targets from yarn to pnpm.

Comment thread ui/packages/shared/package.json Outdated
Comment thread .github/workflows/ui.yml
Comment thread ui/tsconfig.json
- ui/tsconfig.json extends tsconfig.base.json instead of reaching into
  packages/shared/tsconfig.json. The old target also dragged in that
  package's `include: ["src"]`, which is meaningless at the workspace root.
- @pmm/shared: `private` was the string "true" rather than a boolean, so
  npm's schema validation ignores it; and `typesVersions` pointed at
  ./src/index.tsx, which does not exist (the entry is index.ts). Consumers
  resolve through `exports`, so the stale block is dropped rather than
  repointed.
- ui/Makefile declares its command targets .PHONY so a stray file or
  directory named after one cannot make GNU Make skip the recipe.

Signed-off-by: Ignacio Durand <nachodurand@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🧹 Nitpick comments (2)
ui/oxlintrc.json (2)

1-2: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Pin the editor schema to the installed Oxlint version.

The schema URI follows the Oxc main branch, while the workspace locks Oxlint to 1.76.0. Editor validation can drift from the CLI schema. Use the package-local schema or a versioned URI. Oxlint documents the package-local path. (oxc.rs)

Proposed change
-  "$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
+  "$schema": "./node_modules/oxlint/configuration_schema.json",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ui/oxlintrc.json` around lines 1 - 2, Update the $schema value in
oxlintrc.json to reference the installed Oxlint 1.76.0 schema, using the
package-local schema path or a versioned URI instead of the Oxc main-branch URL.

38-44: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Include application configuration in lint or typecheck scope.

Current scripts exclude the Vite, Vitest, and both Webpack configuration files from linting and typechecking. Narrow the ignore patterns or add a dedicated configuration check. Make it so.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ui/oxlintrc.json` around lines 38 - 44, Update the ignorePatterns
configuration in oxlintrc.json so Vite, Vitest, and both Webpack configuration
files are included in linting or typechecking; narrow the broad *.config.ts and
*.config.js exclusions or add a dedicated check covering those files.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ui/Makefile`:
- Around line 20-25: Update the UI workflow documentation in ui/AGENTS.md and
the UI linting guidance in the root AGENTS.md to replace Yarn workspaces and
ESLint instructions with the Makefile’s Corepack-pnpm setup, pnpm commands,
oxlint, and oxfmt usage. Keep both guides aligned with the current UI
development environment and workflow.

In `@ui/oxlintrc.json`:
- Around line 21-22: Add the React plugin declaration to the Oxlint
configuration, then update the hook rule keys from the react-hooks namespace to
the native react namespace while preserving their existing severity values.
Modify the configuration entries containing rules-of-hooks and exhaustive-deps.
- Around line 13-19: Update the Oxlint configuration’s plugins list to
explicitly include the React and import plugins so the configured react/* and
import/* rules are applied. Preserve the existing typescript, unicorn, and oxc
plugins because specifying plugins replaces the defaults.

---

Nitpick comments:
In `@ui/oxlintrc.json`:
- Around line 1-2: Update the $schema value in oxlintrc.json to reference the
installed Oxlint 1.76.0 schema, using the package-local schema path or a
versioned URI instead of the Oxc main-branch URL.
- Around line 38-44: Update the ignorePatterns configuration in oxlintrc.json so
Vite, Vitest, and both Webpack configuration files are included in linting or
typechecking; narrow the broad *.config.ts and *.config.js exclusions or add a
dedicated check covering those files.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b6c9e239-78b3-4550-933b-bd3b35fbe0ea

📥 Commits

Reviewing files that changed from the base of the PR and between 13c3072 and dfbb14a.

⛔ Files ignored due to path filters (2)
  • ui/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • ui/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (49)
  • .devcontainer/Makefile
  • .devcontainer/setup.sh
  • .github/workflows/ui.yml
  • AGENTS.md
  • build/docker/rpmbuild/Dockerfile.el8
  • build/docker/rpmbuild/Dockerfile.el9
  • build/docker/rpmbuild/Dockerfile.hetzner-el9
  • ui/.oxfmtrc.json
  • ui/.vscode/settings.json
  • ui/Makefile
  • ui/README.md
  • ui/apps/pmm-compat/.config/webpack/webpack.config.ts
  • ui/apps/pmm-compat/.eslintrc
  • ui/apps/pmm-compat/.prettierrc.js
  • ui/apps/pmm-compat/package.json
  • ui/apps/pmm-compat/src/compat.test.ts
  • ui/apps/pmm-compat/src/compat.ts
  • ui/apps/pmm-compat/src/compat/toolbar.tsx
  • ui/apps/pmm-compat/src/contexts/theme/theme.provider.tsx
  • ui/apps/pmm-compat/src/lib/constants.ts
  • ui/apps/pmm-compat/src/lib/utils/document.test.ts
  • ui/apps/pmm-compat/src/lib/utils/document.ts
  • ui/apps/pmm-compat/src/lib/utils/navigator.ts
  • ui/apps/pmm-compat/src/lib/utils/shortcuts.ts
  • ui/apps/pmm-compat/src/lib/utils/variables.test.ts
  • ui/apps/pmm-compat/src/lib/utils/variables.ts
  • ui/apps/pmm-compat/src/plugin.json
  • ui/apps/pmm-compat/src/theme.ts
  • ui/apps/pmm-compat/tsconfig.json
  • ui/apps/pmm/.eslintrc.cjs
  • ui/apps/pmm/README.md
  • ui/apps/pmm/package.json
  • ui/apps/pmm/src/contexts/grafana/grafana.context.types.ts
  • ui/apps/pmm/src/contexts/grafana/grafana.provider.tsx
  • ui/apps/pmm/src/hooks/utils/useKioskMode.test.ts
  • ui/apps/pmm/src/utils/dom.utils.test.ts
  • ui/apps/pmm/src/vite-env.d.ts
  • ui/apps/pmm/tsconfig.json
  • ui/apps/pmm/vite.config.ts
  • ui/apps/pmm/vitest.config.ts
  • ui/oxlintrc.json
  • ui/package.json
  • ui/packages/shared/.eslintrc.cjs
  • ui/packages/shared/.prettierignore
  • ui/packages/shared/package.json
  • ui/packages/shared/tsconfig.json
  • ui/pnpm-workspace.yaml
  • ui/tsconfig.base.json
  • ui/tsconfig.json
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • percona/pmm-qa (manual)
  • percona/pmm (manual)
💤 Files with no reviewable changes (6)
  • ui/apps/pmm-compat/.eslintrc
  • ui/apps/pmm-compat/.config/webpack/webpack.config.ts
  • ui/apps/pmm/.eslintrc.cjs
  • ui/packages/shared/.eslintrc.cjs
  • ui/apps/pmm-compat/.prettierrc.js
  • ui/packages/shared/.prettierignore
🚧 Files skipped from review as they are similar to previous changes (40)
  • ui/apps/pmm-compat/src/compat.test.ts
  • AGENTS.md
  • build/docker/rpmbuild/Dockerfile.hetzner-el9
  • ui/apps/pmm-compat/src/theme.ts
  • ui/apps/pmm/tsconfig.json
  • ui/apps/pmm/src/contexts/grafana/grafana.context.types.ts
  • ui/apps/pmm/src/contexts/grafana/grafana.provider.tsx
  • ui/apps/pmm-compat/src/compat/toolbar.tsx
  • ui/.oxfmtrc.json
  • ui/apps/pmm/src/vite-env.d.ts
  • .github/workflows/ui.yml
  • ui/packages/shared/tsconfig.json
  • ui/apps/pmm/vite.config.ts
  • ui/apps/pmm/src/utils/dom.utils.test.ts
  • ui/tsconfig.json
  • .devcontainer/setup.sh
  • ui/apps/pmm-compat/src/lib/utils/document.test.ts
  • build/docker/rpmbuild/Dockerfile.el8
  • ui/pnpm-workspace.yaml
  • ui/apps/pmm-compat/src/lib/utils/navigator.ts
  • ui/README.md
  • ui/apps/pmm-compat/src/lib/constants.ts
  • ui/apps/pmm-compat/src/lib/utils/document.ts
  • ui/apps/pmm/src/hooks/utils/useKioskMode.test.ts
  • ui/apps/pmm-compat/src/lib/utils/variables.ts
  • ui/tsconfig.base.json
  • ui/apps/pmm/README.md
  • ui/.vscode/settings.json
  • ui/apps/pmm-compat/src/plugin.json
  • ui/apps/pmm-compat/src/lib/utils/shortcuts.ts
  • ui/apps/pmm-compat/src/compat.ts
  • ui/package.json
  • ui/apps/pmm/package.json
  • ui/apps/pmm-compat/src/contexts/theme/theme.provider.tsx
  • ui/apps/pmm-compat/src/lib/utils/variables.test.ts
  • ui/apps/pmm/vitest.config.ts
  • ui/apps/pmm-compat/tsconfig.json
  • ui/packages/shared/package.json
  • build/docker/rpmbuild/Dockerfile.el9
  • ui/apps/pmm-compat/package.json

Comment thread ui/Makefile
Comment thread ui/oxlintrc.json
Comment thread ui/oxlintrc.json
@nachodd
nachodd requested a review from fabio-silva August 5, 2026 18:03
Oxlint enables only `eslint`, `typescript`, `unicorn` and `oxc` by default —
`--react-plugin` and `--import-plugin` are opt-in, and the config-file
equivalent is the `plugins` array. The migration carried the rule list over
from the ESLint config without it, so every `react/*`, `react-hooks/*` and
`import/*` rule in `oxlintrc.json` was silently inert: oxlint parses them,
matches no plugin, and reports nothing. Verified against oxlint 1.76 with a
fixture that violates `jsx-key`, `rules-of-hooks` and `exhaustive-deps` —
zero diagnostics before, all three after.

`plugins` replaces the default set rather than extending it, so the list
names typescript, unicorn and oxc as well.

Turning the rules on surfaced one real error, now fixed:
`import(no-duplicates)` in `pages/updates/Updates.tsx`, which imported
`@mui/material` twice.

Also from the review:

- `$schema` pointed at the Oxc `main` branch while the workspace pins oxlint
  1.76.0, so editor validation could drift from the CLI. Now the
  package-local schema, which always matches the installed version.
- `*.config.ts` / `*.config.js` were excluded from linting, which hid real
  code — `vite.config.ts` carries dev-server and proxy logic. The patterns
  are gone and `pmm-compat` lints its package root, not just `src`, so its
  `webpack.config.ts` is covered too. `apps/pmm-compat/.config/` stays
  ignored: it is Grafana's auto-generated plugin scaffold, which upstream
  regenerates and marks "not intended to be changed".
- That new coverage caught a latent bug in `packages/shared/jest.config.js`:
  the transform key `'^.+\.tsx?$'` is a string, so `\.` collapsed to `.` and
  the pattern matched any character where a literal dot was meant. Escaped
  properly.

The guides were still describing the pre-migration toolchain, so they are
brought in line: `ui/AGENTS.md` (Yarn workspaces -> pnpm, Yarn prerequisite ->
Corepack, plus a Linting and Formatting section covering oxlint/oxfmt, the
`plugins` pitfall above, and what is in scope), the root `AGENTS.md` linting
rows (ESLint -> oxlint + oxfmt, and `make format-check` alongside `make
lint`), and one stale "Node 22 + Yarn" line in `ui/README.md`.

Gates: oxlint 0 errors, oxfmt clean, check-types clean, tests pass
(@pmm/shared 11, pmm-compat 4 suites, ui 330).

Signed-off-by: Ignacio Durand <nachodurand@gmail.com>

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Around line 141-142: Update the UI linting row in AGENTS.md to cover the
complete UI workspace, including ui/apps/pmm-compat alongside the existing
packages; use ui/ as the scope or explicitly list all three packages while
preserving the documented lint commands.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a890eaab-f947-49b5-93f6-5cd13d1ed480

📥 Commits

Reviewing files that changed from the base of the PR and between dfbb14a and d307350.

📒 Files selected for processing (7)
  • AGENTS.md
  • ui/AGENTS.md
  • ui/README.md
  • ui/apps/pmm-compat/package.json
  • ui/apps/pmm/src/pages/updates/Updates.tsx
  • ui/oxlintrc.json
  • ui/packages/shared/jest.config.js
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • percona/pmm-qa (manual)
  • percona/pmm (manual)
🚧 Files skipped from review as they are similar to previous changes (3)
  • ui/README.md
  • ui/oxlintrc.json
  • ui/apps/pmm-compat/package.json

Comment thread AGENTS.md Outdated
nachodd added a commit to percona/SEP that referenced this pull request Aug 5, 2026
Ported from the PMM side (percona/pmm#5728), where CodeRabbit caught it in
the mirrored config. Oxlint enables only `eslint`, `typescript`, `unicorn`
and `oxc` by default — `--react-plugin` and `--import-plugin` are opt-in,
and the config-file equivalent is the `plugins` array, which we never set.
Every `react/*`, `react-hooks/*` and `import/*` rule in `oxlintrc.json` was
therefore inert: oxlint parses the key, matches no plugin, reports nothing.

Measured on the pinned oxlint 1.64: 108 rules over 474 files before, 135
rules over 491 files after. `plugins` replaces the default set rather than
extending it, so typescript, unicorn and oxc are named explicitly.

Turning the rules on surfaced one error and eight warnings:

- `react/no-children-prop` in `appRouteGuard.ts`. The rule wants JSX, but
that module is plain `.ts`, and moving `element` to `createElement`'s third
argument does not type-check either — `AppDisabledGuardProps.children` is
required and the overload does not satisfy it. Suppressed on the line with
that reasoning rather than weakening the component's contract.
- Four `react-hooks/exhaustive-deps` (AppListPage, ScriptPreviewField,
ExecutionEventsPanel, useExecutionEvents) and four `import/no-cycle` (the
`App` ↔ `routes` pairs in alters and backup_mongo). All pre-existing, all
warnings, so CI stays green; they are left for their own triage rather than
mixed into this backport.

Two smaller items from the same review:

- `$schema` pointed at the Oxc `main` branch while the workspace pins oxlint
1.64.0, so editor validation could drift from the CLI. Now the package-local
schema, matching `.oxfmtrc.json`, which already does this.
- `*.config.ts` / `*.config.js` were excluded from linting, which hid real
code — the Vite and Vitest configs are as much a part of the build as
anything under `src`. Patterns dropped; that is where the 17 extra linted
files come from.

No changelog fragment: tooling-only, no user-visible behaviour change.

Gates: oxlint 0 errors, type-check clean across every package, 1178 tests
pass, oxfmt clean.
nachodd added 2 commits August 5, 2026 17:00
The linting and testing decision trees named only `ui/apps/pmm` and
`ui/packages/shared`, so a contributor touching `ui/apps/pmm-compat` could
read the rows as not applying to them — while `make lint` and `make test`
have always run Turborepo across every workspace package, and pmm-compat's
lint scope just widened to its package root.

Signed-off-by: Ignacio Durand <nachodurand@gmail.com>
Comment thread ui/.vscode/settings.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shall this dir .vscode be in repo at all?

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.

7 participants