Aditya-feat: Add Smart Insights and Predictive Utilization Analysis to the Utilization Chart#5073
Open
Aditya-gam wants to merge 2 commits intodevelopmentfrom
Conversation
Integrate new utilization, insights, and export endpoints into the BM Utilization Chart and refactor the page into focused hooks and UI components. Add forecast mode switching, traffic-light chart indicators, summary metrics, recommendation and maintenance panels, resource balancing suggestions, and PDF/CSV export controls with dark-mode styling. Made-with: Cursor
Improve accessibility and async behavior in the utilization chart. Add keyboard arrow navigation for forecast mode selection and announce chart state changes for assistive technologies. Cancel in-flight utilization and insights requests before starting new ones to avoid race conditions and stale loading states. Refine export button feedback so each format shows its own exporting state while requests are running. Made-with: Cursor
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Anusha-Gali
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

















Description
This PR upgrades the BM Utilization Chart from a historical-only view into a planning and decision-support UI. It adds forecast modes, backend-driven smart insights, maintenance/resource recommendations, and report export, while also hardening accessibility and async request behavior.
Related PRS (if any):
Main changes explained:
Created/Updated Files:
src/components/BMDashboard/UtilizationChart/UtilizationChart.jsxtool,project,startDate,endDate)historical,forecast30,forecastFull)GET /api/tools/utilizationwithmodeGET /api/tools/utilization/insightsclassification.trafficLightradiogrouptoggle integrationaria-livechart status announcementsrole="img"src/components/BMDashboard/UtilizationChart/UtilizationChart.module.csssrc/components/BMDashboard/UtilizationChart/hooks/useUtilizationData.jstool,project,startDate,endDate,mode.AbortControllerto prevent race conditions when users rapidly change filters/mode.400) vs generic failures.src/components/BMDashboard/UtilizationChart/hooks/useUtilizationInsights.jstool,project,startDate,endDate.recommendations,maintenanceAlerts,resourceBalancing,summary.src/components/BMDashboard/UtilizationChart/constants.jspdf,csv)src/components/BMDashboard/UtilizationChart/ForecastModeToggle.jsxArrowLeft/Right/Up/Down) with roving focus for accessible radio group behavior.src/components/BMDashboard/UtilizationChart/InsightsSummaryBar.jsxtotalToolTypes,averageUtilization,normal,underUtilized, andoverUtilizedfrom insights summary.src/components/BMDashboard/UtilizationChart/RecommendationPanel.jsxsrc/components/BMDashboard/UtilizationChart/MaintenanceAlertPanel.jsxmaintenanceAlerts.highurgency beforemedium.src/components/BMDashboard/UtilizationChart/ResourceBalancingPanel.jsx(+35 / -0)fromToolto optionaltoTool) and rationale text.src/components/BMDashboard/UtilizationChart/ExportReportButton.jsxGET /api/tools/utilization/export.format=pdfandformat=csvwithresponseType: 'blob'.Content-Dispositionfilename fallback and triggers browser download.Exporting...on active format).src/utils/URL.jsBM_TOOL_UTILIZATIONBM_TOOL_UTILIZATION_INSIGHTSBM_TOOL_UTILIZATION_EXPORTKey Implementation Details:
historicalforecast30forecastFulltool,project,startDate,endDate,modetool,project,startDate,endDateformat,tool,project,startDate,endDateHow to test:
Aditya-feat/Add-Smart-Insights-and-Predictive-Utilization-Analysis-to-the-Utilization-Chartrm -rf node_modules && yarn cache cleanyarn installand start the app:yarn start:local/UtilizationChartApplywarningPDFand verify download + button loading textCSVand verify download + button loading textclassification.trafficLightScreenshots or videos of changes:
TestVideo.mov
Note: