Conversation
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>
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe 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. ChangesUI tooling migration
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (2)
ui/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlui/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (49)
.devcontainer/Makefile.devcontainer/setup.sh.github/workflows/ui.ymlAGENTS.mdbuild/docker/rpmbuild/Dockerfile.el8build/docker/rpmbuild/Dockerfile.el9build/docker/rpmbuild/Dockerfile.hetzner-el9ui/.oxfmtrc.jsonui/.vscode/settings.jsonui/Makefileui/README.mdui/apps/pmm-compat/.config/webpack/webpack.config.tsui/apps/pmm-compat/.eslintrcui/apps/pmm-compat/.prettierrc.jsui/apps/pmm-compat/package.jsonui/apps/pmm-compat/src/compat.test.tsui/apps/pmm-compat/src/compat.tsui/apps/pmm-compat/src/compat/toolbar.tsxui/apps/pmm-compat/src/contexts/theme/theme.provider.tsxui/apps/pmm-compat/src/lib/constants.tsui/apps/pmm-compat/src/lib/utils/document.test.tsui/apps/pmm-compat/src/lib/utils/document.tsui/apps/pmm-compat/src/lib/utils/navigator.tsui/apps/pmm-compat/src/lib/utils/shortcuts.tsui/apps/pmm-compat/src/lib/utils/variables.test.tsui/apps/pmm-compat/src/lib/utils/variables.tsui/apps/pmm-compat/src/plugin.jsonui/apps/pmm-compat/src/theme.tsui/apps/pmm-compat/tsconfig.jsonui/apps/pmm/.eslintrc.cjsui/apps/pmm/README.mdui/apps/pmm/package.jsonui/apps/pmm/src/contexts/grafana/grafana.context.types.tsui/apps/pmm/src/contexts/grafana/grafana.provider.tsxui/apps/pmm/src/hooks/utils/useKioskMode.test.tsui/apps/pmm/src/utils/dom.utils.test.tsui/apps/pmm/src/vite-env.d.tsui/apps/pmm/tsconfig.jsonui/apps/pmm/vite.config.tsui/apps/pmm/vitest.config.tsui/oxlintrc.jsonui/package.jsonui/packages/shared/.eslintrc.cjsui/packages/shared/.prettierignoreui/packages/shared/package.jsonui/packages/shared/tsconfig.jsonui/pnpm-workspace.yamlui/tsconfig.base.jsonui/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
There was a problem hiding this comment.
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 viapackageManager, 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. |
- 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>
|
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. |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
ui/oxlintrc.json (2)
1-2: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPin the editor schema to the installed Oxlint version.
The schema URI follows the Oxc
mainbranch, while the workspace locks Oxlint to1.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 winInclude 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
⛔ Files ignored due to path filters (2)
ui/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlui/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (49)
.devcontainer/Makefile.devcontainer/setup.sh.github/workflows/ui.ymlAGENTS.mdbuild/docker/rpmbuild/Dockerfile.el8build/docker/rpmbuild/Dockerfile.el9build/docker/rpmbuild/Dockerfile.hetzner-el9ui/.oxfmtrc.jsonui/.vscode/settings.jsonui/Makefileui/README.mdui/apps/pmm-compat/.config/webpack/webpack.config.tsui/apps/pmm-compat/.eslintrcui/apps/pmm-compat/.prettierrc.jsui/apps/pmm-compat/package.jsonui/apps/pmm-compat/src/compat.test.tsui/apps/pmm-compat/src/compat.tsui/apps/pmm-compat/src/compat/toolbar.tsxui/apps/pmm-compat/src/contexts/theme/theme.provider.tsxui/apps/pmm-compat/src/lib/constants.tsui/apps/pmm-compat/src/lib/utils/document.test.tsui/apps/pmm-compat/src/lib/utils/document.tsui/apps/pmm-compat/src/lib/utils/navigator.tsui/apps/pmm-compat/src/lib/utils/shortcuts.tsui/apps/pmm-compat/src/lib/utils/variables.test.tsui/apps/pmm-compat/src/lib/utils/variables.tsui/apps/pmm-compat/src/plugin.jsonui/apps/pmm-compat/src/theme.tsui/apps/pmm-compat/tsconfig.jsonui/apps/pmm/.eslintrc.cjsui/apps/pmm/README.mdui/apps/pmm/package.jsonui/apps/pmm/src/contexts/grafana/grafana.context.types.tsui/apps/pmm/src/contexts/grafana/grafana.provider.tsxui/apps/pmm/src/hooks/utils/useKioskMode.test.tsui/apps/pmm/src/utils/dom.utils.test.tsui/apps/pmm/src/vite-env.d.tsui/apps/pmm/tsconfig.jsonui/apps/pmm/vite.config.tsui/apps/pmm/vitest.config.tsui/oxlintrc.jsonui/package.jsonui/packages/shared/.eslintrc.cjsui/packages/shared/.prettierignoreui/packages/shared/package.jsonui/packages/shared/tsconfig.jsonui/pnpm-workspace.yamlui/tsconfig.base.jsonui/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
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>
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
AGENTS.mdui/AGENTS.mdui/README.mdui/apps/pmm-compat/package.jsonui/apps/pmm/src/pages/updates/Updates.tsxui/oxlintrc.jsonui/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
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.
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>
There was a problem hiding this comment.
shall this dir .vscode be in repo at all?
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
ui/.pnpm-workspace.yamlreplaces the yarnworkspaces/resolutionsblock;yarn.lock→pnpm-lock.yaml.overrides,packageExtensionsandallowBuildscarry over the constraints the yarnresolutionsencoded.oxlintrc.json+.oxfmtrc.jsonat the workspace root replace the per-package.eslintrc/.prettierrcfiles.tsconfig.base.jsonholds the compiler options shared across packages; the workspace roottsconfig.jsonextends it. Its main consumers —packages/sep/*andpackages/plugins/atw— arrive in the stacked child PR PMM-15216 Migrate the SEP UI into PMM #5653, which is why it lands here.apps/pmmandapps/pmm-compatintentionally keep their own configs (ES2020 target and@grafana/tsconfigrespectively).Libraries
React 18 → 19, React Router 6 → 7, Vite 5 → 8, Vitest 2 → 4, TypeScript 5 → 6,
@testing-library/react15 → 16, jsdom 24 → 29,@percona/percona-ui1.0.23 → 1.0.24.Two dependencies that yarn's flat
node_modulesprovided 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.tsdrops the hardcoded../../node_modulesReact aliases — those paths don't exist under pnpm — in favour ofresolve.dedupe.Build & dev environments
corepackteaches the rpmbuild images, the devcontainer and the UI CI workflow about pnpm. It resolves the version from thepackageManagerfield inui/package.json, so the version is pinned in exactly one place and a bump needs no Dockerfile edit. yarn stays installed fordashboards/pmm-app, which is still a yarn 1 project.Review comments from #5653 addressed here
npm install -g pnpm@11.1.3is gone from all three rpmbuild Dockerfiles, replaced byRUN corepack enable. corepack readspackageManagerfromui/package.jsonat build time, so the version lives in one place.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.Verification
From
ui/:pnpm installmake format-check(oxfmt)make lint(oxlint)make test(vitest)make buildturbo run check-typesRe-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: