Skip to content

PMM-15028 Flatten dashboards/, move pmm-app into the ui/ monorepo - #5719

Closed
fabio-silva wants to merge 2 commits into
mainfrom
claude/pmm-15028-draft-l6b9se
Closed

PMM-15028 Flatten dashboards/, move pmm-app into the ui/ monorepo#5719
fabio-silva wants to merge 2 commits into
mainfrom
claude/pmm-15028-draft-l6b9se

Conversation

@fabio-silva

@fabio-silva fabio-silva commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Ticket number: PMM-15028

Feature build: SUBMODULES-0

Summary

Developer-experience restructuring requested in PMM-15028:

  • Flatten dashboards/: dashboards/dashboards/* is moved up to dashboards/*, so the top-level dashboards/ folder holds only JSON dashboard definitions (plus misc/ tooling and LICENSE/README.md, kept for the RPM spec's %license/%doc lines — see caveats below).
  • Move pmm-app into the ui/ monorepo: dashboards/pmm-appui/apps/pmm-app, now a Yarn workspace + Turborepo member alongside pmm and pmm-compat. The plugin id (pmm-app) and its dist layout are unchanged, so no downstream Grafana paths change.
  • Symlink preserved: src/dashboards is recreated at its new location, retargeted to the flattened top-level dashboards/ folder. plugin.json's 68 dashboard includes paths resolve unchanged — verified against the new symlink target.
  • No manual reload needed: added a chokidar-based watcher (ui/apps/pmm-app/scripts/watch-dashboards.mjs) that mirrors dashboard JSON edits into the provisioned dashboards directory during local dev; wired into pmm-app's dev script (concurrently alongside the existing webpack watcher) and into .devcontainer/Makefile's run-ui/build-ui targets. QAN JS/TS changes already auto-reload via the existing webpack + livereload setup, just relocated.
  • Fixed pmm-app's lint/test scripts to be non-mutating/one-shot (previously lint ran eslint --fix and test ran jest --watch), matching pmm-compat's conventions — required for these to behave correctly once folded into the shared workspace pipeline.
  • Updated AGENTS.md guides (root, dashboards/, ui/, ui/apps/pmm-app/) and CONTRIBUTING.md docs to match the new layout.

Explicitly out of scope / required follow-up

This PR intentionally does not touch CI workflows or packaging, since those need a real CI run / RPM build to validate safely (not feasible in the sandbox this draft was authored in):

  • .github/workflows/dashboards.yml and .github/workflows/ui.yml still reference the old paths (dashboards/dashboards/*.json, dashboards/pmm-app/...) and need updating — the dashboards.yml build/test jobs become redundant once pmm-app is a ui/ workspace member, and the "verify plugin.json paths" check should move to ui.yml.
  • build/packages/rpm/server/SPECS/percona-dashboards.spec (make -C dashboards release, cp -a ./dashboards/pmm-app/dist ...) hard-depends on the pre-move paths and needs updating to build ui/apps/pmm-app via turbo — this is the highest-risk gap, since no GitHub Actions check builds RPMs, so a missed update wouldn't be caught by CI.
  • .github/CODEOWNERS should get an explicit /ui/apps/pmm-app/ entry so review routing for QAN isn't silently absorbed by the generic /ui/ rule.

This PR should not be merged to a release-affecting branch until that follow-up lands. Opening as a draft for that reason, and to get early feedback on the restructuring approach itself.

Verification done

  • readlink -f ui/apps/pmm-app/src/dashboards resolves to the repo-root dashboards/ folder.

  • Verified all 68 plugin.json include paths resolve through the new symlink (no missing files).

  • Attempted yarn install at ui/ to reconcile pmm-app's dependencies into the shared workspace lockfile — blocked in this sandbox by an organization egress policy denying codeload.github.com (a pre-existing transitive git dependency of @grafana/ui, already present in pmm-app's own lockfile before this change, unrelated to the restructuring). Needs to be run in CI or a real dev environment before merge to confirm dependency hoisting resolves cleanly (pmm-app currently pins older react/typescript/@grafana/eslint-config versions than the rest of ui/).

  • Grepped the repo for stale dashboards/dashboards/ or dashboards/pmm-app/ references outside the explicitly deferred CI/RPM files — none found.

  • API Docs updated — N/A, no API changes.

Links to related work items: PMM-15028


Generated by Claude Code

claude added 2 commits July 30, 2026 17:41
Restructures developer experience around Grafana dashboards and the QAN
Grafana plugin (pmm-app):

- Flatten dashboards/dashboards/* up to dashboards/, so the top-level
  dashboards/ folder holds only JSON dashboard definitions (plus misc/
  tooling and packaging metadata required by the RPM spec).
- Move pmm-app from dashboards/pmm-app into ui/apps/pmm-app as a member
  of the existing ui/ Yarn workspaces + Turborepo monorepo, alongside
  pmm and pmm-compat. The plugin id/dist layout are unchanged.
- Recreate the src/dashboards symlink at its new location, now pointing
  at the flattened top-level dashboards/ folder — plugin.json's include
  paths keep working unchanged.
- Fix pmm-app's lint/test scripts so they're non-mutating/one-shot
  (required once folded into a shared workspace pipeline), matching the
  pmm-compat app's conventions.
- Add a chokidar-based watcher (scripts/watch-dashboards.mjs) that
  mirrors dashboard JSON edits into the provisioned dashboards directory
  during local dev, so both dashboard JSON and QAN JS/TS changes show up
  without any manual reload command. Wired into pmm-app's `dev` script
  and into .devcontainer/Makefile's run-ui/build-ui targets.
- Update AGENTS.md guides and CONTRIBUTING docs to match the new layout.

Out of scope for this change (flagged as required follow-up, see PR
description): .github/workflows/dashboards.yml and ui.yml, and
build/packages/rpm/server/SPECS/percona-dashboards.spec still reference
the old paths and need a dedicated PR validated with a real CI run and
RPM build.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NDDsxiiPmrUTUshGQQ3rpT
Follow-up to the previous commit: these two docs still pointed at the
retired make run-qan-ui/build-qan-ui targets and the old
dashboards/pmm-app path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NDDsxiiPmrUTUshGQQ3rpT

Copy link
Copy Markdown
Contributor Author

Closing in favor of #5720, opened from a renamed branch (pmm-15028-draft-l6b9se) with the commit history rewritten to drop Claude authorship/co-authorship.


Generated by Claude Code

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5719      +/-   ##
==========================================
+ Coverage   43.59%   44.64%   +1.04%     
==========================================
  Files         415      418       +3     
  Lines       43134    43329     +195     
==========================================
+ Hits        18804    19343     +539     
+ Misses      22454    22076     -378     
- Partials     1876     1910      +34     
Flag Coverage Δ
admin 34.96% <ø> (+0.17%) ⬆️
agent 47.92% <ø> (-1.12%) ⬇️
managed 44.98% <ø> (+1.99%) ⬆️
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.

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