Skip to content

Conversation

@astandrik
Copy link
Collaborator

@astandrik astandrik commented Nov 13, 2025

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
378 373 0 3 2
Test Changes Summary ⏭️2

⏭️ Skipped Tests (2)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)
  2. Copy result button copies to clipboard (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: 🔺

Current: 66.09 MB | Main: 66.08 MB
Diff: +4.42 KB (0.01%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 13, 2025

Skipped: This PR does not contain any of your configured keywords: (greptile-review)

@astandrik astandrik requested a review from Copilot November 13, 2025 16:03
Copilot finished reviewing on behalf of astandrik November 13, 2025 16:07
Copy link
Contributor

Copilot AI left a comment

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 introduces a centralized utility function to determine when monitoring features should be displayed for databases, consolidating previously scattered logic across multiple components.

Key changes:

  • Created canShowTenantMonitoring utility to standardize monitoring visibility checks
  • Applied the new utility across 5 components to ensure consistent behavior
  • Monitoring is now shown only when: (1) ControlPlane exists with a non-empty ID, or (2) ControlPlane is absent but cluster-level monitoring metadata exists

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/utils/monitoringVisibility.ts New utility function to centralize monitoring visibility logic
src/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.tsx Applies monitoring visibility check to schema tree actions
src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.tsx Uses new utility to determine monitoring tab availability
src/containers/Tenant/Diagnostics/Diagnostics.tsx Integrates monitoring visibility check in diagnostics page configuration
src/containers/Header/Header.tsx Updates header monitoring link logic with new utility
src/components/TenantNameWrapper/TenantNameWrapper.tsx Filters monitoring links based on visibility check

Copy link
Contributor

@Raubzeug Raubzeug left a comment

Choose a reason for hiding this comment

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

Lets do a helper like monitoringTabAvailable, it can be used in 3 places. Why to copy-paste?

@astandrik
Copy link
Collaborator Author

astandrik commented Nov 13, 2025

Lets do a helper like monitoringTabAvailable, it can be used in 3 places. Why to copy-paste?

We already have helper canShowTenantMonitoring

the condition for tab is uiFactory additional renderMonitoring function

canShowTenantMonitoring is used in 5 places now

implementing your suggestion will give usage of one helper in two places (link) and another helper (tab) in three places

Whats the profit? The only copy-past now is uiFactory.renderMonitoring === 'function'

Raubzeug
Raubzeug previously approved these changes Nov 14, 2025
@astandrik astandrik added this pull request to the merge queue Nov 14, 2025
Merged via the queue into main with commit 88d731f Nov 14, 2025
5 checks passed
@astandrik astandrik deleted the astandrik.dont-show-monitoring branch November 14, 2025 08:37
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.

3 participants