Skip to content

PMM-14109 Improve Advisor UX - #1083

Open
ademidoff wants to merge 4 commits into
mainfrom
PMM-14109-improve-advisor-ux
Open

PMM-14109 Improve Advisor UX#1083
ademidoff wants to merge 4 commits into
mainfrom
PMM-14109-improve-advisor-ux

Conversation

@ademidoff

@ademidoff ademidoff commented Jul 19, 2026

Copy link
Copy Markdown
Member

Companion to percona/pmm#5656, which moves the Advisor settings out of the Advanced settings tab into a dedicated Advisors tab (/pmm-ui/settings/advisors).

Changes

  • codeceptjs-e2e/tests/configuration/pages/pmmSettingsPage.js: add advisorsSettingsUrl and openAdvisorsSettings(), add the advisors entry to sectionTabsList/expandSection, add the advisorsButton ($advisors-button) field, and rename the section test ids ($advanced-advisors$advisors-settings, $advanced-advisors-label-description$advisors-label-description).
  • verifyPMMSettingsPageElements_test.js: split the advisor assertions into a new "Verify Advisors Section Elements" scenario that opens the Advisors tab.
  • verifyPMMSettingsPageFunctionality_test.js, advisors/stt/sttSettings_test.js, upgrade/advisorsAlerting_test.js: navigate to the Advisors tab and apply changes via advisorsButton.
  • e2e_tests/pages/ha/settings.page.ts: route the advisors toggle to the Advisors tab and apply via advisors-button.

Field-level test ids (interval inputs, retention, severity threshold, switch-input-stt) are unchanged — they just live under the new tab now.

Note: databaseChecks_test.js (skipped) still asserts the legacy "checks disabled" link points at /settings/advanced-settings; that link is rendered by the legacy Grafana checks UI and is out of scope for this change.

Summary by CodeRabbit

  • Tests
    • Updated end-to-end coverage to validate Advisors settings on the dedicated Advisors page.
    • Added checks for Advisors navigation, controls, tooltips, sections, and applying changes.
    • Updated speech-to-text and advisor alerting scenarios to use the new settings location.
    • Kept telemetry and update-check validation on the Advanced settings page.

Advisor settings moved out of the Advanced settings tab into a dedicated
Advisors tab (/pmm-ui/settings/advisors) in pmm-ui. Point the codeceptjs
settings page object and specs, plus the Playwright HA settings page, at
the new tab and the renamed advisors-* test ids.
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Tests and page objects now use the dedicated Advisors settings page for Advisors and STT settings. Advanced settings checks remain for telemetry and update checks. Advisor alerting setup and verification use the new page and apply button.

Changes

Advisors settings routing

Layer / File(s) Summary
Settings page contracts and routing
codeceptjs-e2e/tests/configuration/pages/pmmSettingsPage.js, e2e_tests/pages/ha/settings.page.ts
Both page objects define Advisors URLs, tabs, selectors, apply buttons, and navigation handling. Other toggles retain Advanced settings behavior.
Configuration settings validation
codeceptjs-e2e/tests/configuration/verifyPMMSettingsPageElements_test.js, codeceptjs-e2e/tests/configuration/verifyPMMSettingsPageFunctionality_test.js
Configuration tests validate Advisors elements and STT behavior on the Advisors page. Telemetry and update-check assertions remain on the Advanced page.
STT and alerting workflows
codeceptjs-e2e/tests/advisors/stt/sttSettings_test.js, codeceptjs-e2e/tests/upgrade/advisorsAlerting_test.js
STT and advisor alerting tests configure, apply, and verify settings through the Advisors page and button.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: petersirotnak, yurkovychv

Poem

A rabbit hops to Advisors’ door,
Where STT settings wait once more.
The right tab opens, changes apply,
Alerting checks now pass nearby.
“Advanced stays for its proper chore!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the Advisor UX change reflected by the dedicated Advisors settings tab and related test updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch PMM-14109-improve-advisor-ux

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

@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 `@codeceptjs-e2e/tests/configuration/pages/pmmSettingsPage.js`:
- Around line 127-128: Update getSubpageTooltips() so the stt tooltip is removed
from the advancedSettingsUrl entry and mapped under a separate
advisorsSettingsUrl entry, matching the Advisors tooltip locators defined by
nativeTextLocator and nativeLinkLocator.
🪄 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: 43b79a74-a8af-4711-b296-8770ddec6111

📥 Commits

Reviewing files that changed from the base of the PR and between 15bc85a and da43132.

📒 Files selected for processing (6)
  • codeceptjs-e2e/tests/advisors/stt/sttSettings_test.js
  • codeceptjs-e2e/tests/configuration/pages/pmmSettingsPage.js
  • codeceptjs-e2e/tests/configuration/verifyPMMSettingsPageElements_test.js
  • codeceptjs-e2e/tests/configuration/verifyPMMSettingsPageFunctionality_test.js
  • codeceptjs-e2e/tests/upgrade/advisorsAlerting_test.js
  • e2e_tests/pages/ha/settings.page.ts

Comment on lines +127 to +128
nativeTextLocator: locate('$advisors-label-description').as('Advisors tooltip'),
nativeLinkLocator: locate('$advisors-label-description').find('a').as('Advisors tooltip Read more link'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Map the STT tooltip to the Advisors subpage.

Line 127-128 uses an Advisors-only locator, but getSubpageTooltips() still attaches this tooltip to advancedSettingsUrl at Line 680-685. A subpage tooltip test will open Advanced Settings and fail to find $advisors-label-description.

Remove stt from the Advanced Settings entry and add a separate advisorsSettingsUrl entry.

Proposed mapping
       {
         subPage: this.advancedSettingsUrl,
         tooltips: {
           dataRetention: this.tooltips.advancedSettings.dataRetention,
           telemetry: this.tooltips.advancedSettings.telemetry,
-          stt: this.tooltips.advancedSettings.stt,
         },
       },
+      {
+        subPage: this.advisorsSettingsUrl,
+        tooltips: {
+          stt: this.tooltips.advancedSettings.stt,
+        },
+      },
🤖 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 `@codeceptjs-e2e/tests/configuration/pages/pmmSettingsPage.js` around lines 127
- 128, Update getSubpageTooltips() so the stt tooltip is removed from the
advancedSettingsUrl entry and mapped under a separate advisorsSettingsUrl entry,
matching the Advisors tooltip locators defined by nativeTextLocator and
nativeLinkLocator.

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.

1 participant