Conversation
…widgets when no data
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds an ChangesPieChartWidget UI Updates
Package Script Allowlist
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR improves the Customer Portal Home dashboard pie-chart widgets by replacing the “dashed circle with 0” appearance with a clearer empty state when there is no outstanding data, and by suppressing chart-adjacent UI elements that don’t make sense in the empty case.
Changes:
- Render an explicit empty state (icon + “No {title} found”) when the pie chart’s total is 0, instead of rendering an empty chart.
- Hide the center total overlay and the legend list when the widget is empty (and suppress the center overlay while loading).
- Add an
allowScriptsblock to the microapppackage.json.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/customer-portal/microapp/src/components/features/dashboard/PieChartWidget.tsx | Adds an empty-state UI for zero-total pie widgets and suppresses overlay/legend in empty/loading states. |
| apps/customer-portal/microapp/package.json | Adds an allowScripts allowlist for install scripts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/customer-portal/microapp/package.json (1)
67-67: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winDeny
core-js@3.49.0inallowScriptsunless itspostinstallis required.
core-js@3.49.0has apostinstallhook, so keeping it allowlisted adds install-time code execution without the same build/runtime justification as the other entries.🤖 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 `@apps/customer-portal/microapp/package.json` at line 67, The allowScripts entry for core-js@3.49.0 should be removed or narrowed because it permits install-time script execution without a clear justification. Update the allowlist in package.json so core-js@3.49.0 is denied by default, and only keep it if the postinstall hook is explicitly required and documented alongside the existing allowScripts entries.
🤖 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.
Nitpick comments:
In `@apps/customer-portal/microapp/package.json`:
- Line 67: The allowScripts entry for core-js@3.49.0 should be removed or
narrowed because it permits install-time script execution without a clear
justification. Update the allowlist in package.json so core-js@3.49.0 is denied
by default, and only keep it if the postinstall hook is explicitly required and
documented alongside the existing allowScripts entries.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5ea4fb95-7012-481f-af0a-5bef9479e601
📒 Files selected for processing (2)
apps/customer-portal/microapp/package.jsonapps/customer-portal/microapp/src/components/features/dashboard/PieChartWidget.tsx
Removed allowScripts configuration for specific packages.
Fix missing newline at end of package.json
Purpose
▎ The "Outstanding Support Cases", "Outstanding Operations", and "Outstanding Engagements" pie chart widgets on the Customer Portal Home page showed a dashed-circle outline with a literal "0" in the center when there was no data, instead of a proper empty state. This looked like a broken/loading UI element rather than an intentional "nothing here" state.
Goals
▎ Replace the dashed-circle-with-zero placeholder with a clear, recognizable empty state (icon + message) so users can immediately tell there's genuinely no outstanding data, rather than mistaking it for a loading or broken state.
Approach
▎ Updated PieChartWidget.tsx so that when a widget's data total is 0, it renders an empty state instead of the pie chart: a small circle with a muted background containing an inbox icon, with a "No {title} found" caption below it (e.g. "No Outstanding Support Cases found"). The center total overlay ("0") is also suppressed in this case, and the legend list below the chart is hidden instead of rendering empty. This mirrors the empty-state treatment already used for equivalent dashboard charts elsewhere in Customer Portal, so the same "no data" pattern is used consistently.
▎
User stories
▎ As a customer portal user with no outstanding support cases, operations, or engagements, I want the dashboard to clearly indicate there's nothing outstanding, instead of showing an ambiguous dashed circle with "0".
Release note
▎ Fixed the Home page dashboard so outstanding-item pie charts show a proper empty state instead of a dashed circle with "0" when there is no data.
Summary by CodeRabbit
New Features
Bug Fixes