Xlab Add Automation Analytics settings #3674
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 649 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3674"
general
weight: 0.35
lgalis
Summary
AAP-94298 Add Automation Analytics settings
AAP-94153 Updating front end for SHOW_GAMIFICATION → SHOW_LEADERBOARD
This pull request updates the Automation Analytics settings and dashboard code to replace the legacy
show_gamificationandmin_collection_timestampfields with the newshow_leaderboardandlast_syncfields, and adds comprehensive test coverage for the new Automation Analytics settings details and edit pages. It also ensures that only users with appropriate permissions can edit settings and that background polling errors do not disrupt the user interface.Field Renaming and Data Model Updates:
Replaces all usage of the
show_gamificationfield withshow_leaderboardin both code and documentation, ensuring consistent terminology for the leaderboard feature. [[1]](diffhunk://#diff-6f4f55dd8574088afadae79d9faed42ebaebb4949ede2d43a07e8a453f566eb9L115-R115) [[2]](diffhunk://#diff-6f4f55dd8574088afadae79d9faed42ebaebb4949ede2d43a07e8a453f566eb9L290-R290) [[3]](diffhunk://#diff-c65a1d5f6f2fefcdb13db356b4040d44b5dedf58c30fec156435d274fe5d885aL56-R64) [[4]](diffhunk://#diff-e9942e0794401f2ef01e352fda86b38cce3153b6bb0d55bcb81f2c27d56a296dL28-R30) [[5]](diffhunk://#diff-e9942e0794401f2ef01e352fda86b38cce3153b6bb0d55bcb81f2c27d56a296dL132-R134) [[6]](diffhunk://#diff-e9942e0794401f2ef01e352fda86b38cce3153b6bb0d55bcb81f2c27d56a296dL157-R159) [[7]](diffhunk://#diff-e9942e0794401f2ef01e352fda86b38cce3153b6bb0d55bcb81f2c27d56a296dL175-R177)Replaces
min_collection_timestampwithlast_syncfor tracking the last sync time, updating interfaces, tests, and documentation accordingly. [[1]](diffhunk://#diff-c65a1d5f6f2fefcdb13db356b4040d44b5dedf58c30fec156435d274fe5d885aL56-R64) [[2]](diffhunk://#diff-6f4f55dd8574088afadae79d9faed42ebaebb4949ede2d43a07e8a453f566eb9L290-R290) [[3]](diffhunk://#diff-e9942e0794401f2ef01e352fda86b38cce3153b6bb0d55bcb81f2c27d56a296dL28-R30) [[4]](diffhunk://#diff-e9942e0794401f2ef01e352fda86b38cce3153b6bb0d55bcb81f2c27d56a296dL132-R134) [[5]](diffhunk://#diff-e9942e0794401f2ef01e352fda86b38cce3153b6bb0d55bcb81f2c27d56a296dL157-R159) [[6]](diffhunk://#diff-e9942e0794401f2ef01e352fda86b38cce3153b6bb0d55bcb81f2c27d56a296dL175-R177)New Settings Page Implementation:
Implements a new
AutomationAnalyticsSettingsDetailspage that displays the current leaderboard setting, only shows the Edit button to superusers or platform auditors, and handles loading and error states gracefully.Implements a new
AutomationAnalyticsSettingsEditpage with a form to enable/disable the leaderboard, validates permissions, and ensures that changes are reflected across all consumers immediately after saving.Comprehensive Test Coverage:
Adds tests for the settings details page, covering display logic, edit permissions, navigation, popover help text, and error handling.
Adds tests for the settings edit page, covering form initialization, save/cancel behavior, background polling, error handling, and cache refresh for mounted consumers.
<!-- What changed and why? -->
Type of Change
Risk Analysis - REQUIRED
<!-- SELECT ONE. This is required — the PR check will fail if none is selected. -->
Dependencies
<!-- List any dependent PRs, required backend changes, or manual setup steps. Remove this section if none. -->
Testing
Ephemeral E2E Tests
Once PR is ready and preliminary checks pass, trigger tests by posting a comment
/run-playwrighton this PR.External Server E2E Runs
<!-- If applicable, attach run(s) from an external server using the GitHub Actions below. Mention the deployment type of the environment used.
-->
Manual Testing
<!-- Steps to verify this change, if not obvious from the Jira issue. -->
Screenshots
<!-- If applicable. Any visual/UI changes MUST include before and after screenshots. -->
<img width="1147" height="1787" alt="image" src="https://github.com/user-attachments/assets/5f65de87-e0cb-4783-9721-fefe44bea1c0" />
<img width="1147" height="1787" alt="image" src="https://github.com/user-attachments/assets/e39165fe-682f-435f-81e4-92f7479602da" />
<img width="1357" height="431" alt="image" src="https://github.com/user-attachments/assets/9b076517-1bfe-41da-8462-802bac77d47f" />