- 
                Notifications
    You must be signed in to change notification settings 
- Fork 17
feat: renderMonitoring to diagnostics #3032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, no comments
| lets use renderMonitoring pattern | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, no comments
There was a problem hiding this 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 adds a new "Monitoring" tab to the tenant diagnostics interface, integrating an external monitoring system through the UIFactory extension mechanism. The monitoring tab is conditionally rendered based on whether the renderMonitoring function is provided in the UIFactory configuration.
Key changes:
- Extended UIFactory with a renderMonitoringfunction type that accepts tenant/schema context
- Added "monitoring" tab to the diagnostics tabs configuration
- Implemented conditional insertion of monitoring tab as the second tab when the render function is available
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description | 
|---|---|
| src/uiFactory/types.ts | Defines RenderMonitoringtype with props for rendering monitoring content and adds it to UIFactory interface | 
| src/store/reducers/tenant/constants.ts | Adds 'monitoring' constant to diagnostics tab IDs | 
| src/containers/Tenant/Diagnostics/DiagnosticsPages.ts | Imports uiFactory and conditionally inserts monitoring tab as second tab when render function is available | 
| src/containers/Tenant/Diagnostics/Diagnostics.tsx | Adds case handler for monitoring tab that invokes uiFactory.renderMonitoringwith tenant context | 
| .rooignore | Adds gitignore-style file for Roo tool configuration (unrelated to monitoring feature) | 
| if (uiFactory.renderMonitoring) { | ||
| result.splice(1, 0, monitoring); | ||
| } | 
    
      
    
      Copilot
AI
    
    
    
      Oct 30, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The monitoring tab is unconditionally inserted at position 1 (second tab) for all entity types, which could disrupt the expected tab order. Unlike the backups tab which is added to predefined page arrays and filtered through applyFilters, this approach bypasses the existing filtering logic and may insert the monitoring tab even when it doesn't make sense for certain entity types. Consider either: (1) adding monitoring to the relevant page arrays (e.g., DATABASE_PAGES, SERVERLESS_DATABASE_PAGES) and using an option-based filter similar to hasBackups, or (2) adding conditional logic to check entity type/context before insertion.
| const result = applyFilters(seeded, type, options); | ||
|  | ||
| // Add monitoring tab as second tab if renderMonitoring is available | ||
| if (uiFactory.renderMonitoring) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this check should be in getDatabasePages.
Closes #3033
greptile-review
Greptile Overview
Updated On: 2025-10-30 14:51:48 UTC
Greptile Summary
Added
renderMonitoringextensibility mechanism to allow library consumers to inject custom monitoring tabs into the diagnostics section. The implementation follows the existingrenderBackups/renderEventspattern.Key Changes:
UIFactorywith newrenderMonitoringprop that receives comprehensive context (type, subType, database, path, additionalTenantProps, scrollContainerRef)monitoringconstant toTENANT_DIAGNOSTICS_TABS_IDSuiFactory.renderMonitoringis availableDiagnostics.tsxswitch statementTechnical Details:
.rooignorefile added (duplicate of.gitignore) for Roo AI assistantConfidence Score: 5/5
Important Files Changed
File Analysis
Sequence Diagram
sequenceDiagram participant Consumer as Library Consumer participant UIFactory as configureUIFactory participant DiagPages as DiagnosticsPages.ts participant Diag as Diagnostics.tsx participant MonTab as Custom Monitoring Component Consumer->>UIFactory: configureUIFactory({<br/>renderMonitoring: (props) => ...}) UIFactory->>UIFactory: Store renderMonitoring in uiFactory Note over Diag: User navigates to Diagnostics page Diag->>DiagPages: getPagesByType(type, subType, options) DiagPages->>DiagPages: computeInitialPages() & applyFilters() DiagPages->>UIFactory: Check uiFactory.renderMonitoring UIFactory-->>DiagPages: Return renderMonitoring function or undefined alt renderMonitoring exists DiagPages->>DiagPages: result.splice(1, 0, monitoring)<br/>Insert monitoring tab at index 1 end DiagPages-->>Diag: Return pages array with monitoring tab Diag->>Diag: Render TabList with all tabs Note over Diag: User clicks monitoring tab Diag->>Diag: renderTabContent() - switch on activeTab.id Diag->>Diag: case TENANT_DIAGNOSTICS_TABS_IDS.monitoring Diag->>UIFactory: Call uiFactory.renderMonitoring?.({...props}) UIFactory->>MonTab: Invoke custom monitoring render function MonTab-->>Diag: Return rendered monitoring content Diag->>Diag: Display monitoring contentCI Results
Test Status:⚠️  FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 47.08 MB | Main: 47.08 MB
Diff: +1.48 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information