Skip to content

feat: add boundary for dashboard - #5815

Open
cuzz-venus wants to merge 1 commit into
mainfrom
fix/account-performance-history-empty-data-points
Open

cuzz-venus wants to merge 1 commit into
mainfrom
fix/account-performance-history-empty-data-points

Conversation

@cuzz-venus

Copy link
Copy Markdown
Contributor

Jira ticket(s)

VPD-XXX

Changes

  • add error boundary for dashboard

@changeset-bot

changeset-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d535f39

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@venusprotocol/evm Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dapp-preview Ready Ready Preview Sep 16, 2026 10:28am UTC
dapp-testnet Ready Ready Preview Sep 16, 2026 10:28am UTC
venus.io Ready Ready Preview Sep 16, 2026 10:28am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds reusable section-level error containment and applies it to route content, dashboard sections, and area charts. It also makes account-performance chart formatting tolerate omitted API points and adds localized retry text.

  • Adds SectionErrorBoundary with a retry fallback.
  • Replaces the dashboard-wide loading gate with independently loading tab sections.
  • Prevents missing performance points from producing undefined chart entries.
  • Makes X-axis tick generation tolerate sparse data.
  • Adds focused tests and synchronized translations.

Confidence Score: 4/5

The PR should not merge until route navigation clears a previously tripped layout boundary and the explicit component-organization rule is satisfied.

A page render failure can leave the persistent layout boundary latched across navigation, causing otherwise healthy destination pages to remain hidden; the AreaChart refactor also violates an explicit repository structure requirement.

Files Needing Attention: apps/evm/src/containers/Layout/index.tsx; apps/evm/src/components/AreaChart/index.tsx; apps/evm/src/components/SectionErrorBoundary/tests/index.spec.tsx

Important Files Changed
Filename Overview
apps/evm/src/components/SectionErrorBoundary/index.tsx Adds a reusable Sentry-backed section fallback with translated retry behavior.
apps/evm/src/containers/Layout/index.tsx Adds a persistent route-level boundary that does not reset when navigation replaces the outlet.
apps/evm/src/pages/Dashboard/index.tsx Isolates dashboard sections and moves loading feedback into the corresponding active tabs.
apps/evm/src/clients/api/queries/getAccountPerformanceHistory/index.ts Safely handles missing start-of-day or current net-worth points.
apps/evm/src/components/AreaChart/index.tsx Adds chart-level error containment but co-locates two components contrary to repository rules.
apps/evm/src/components/AreaChart/getXAxisTicks/index.ts Skips absent chart entries while calculating ticks.

Reviews (1): Last reviewed commit: "feat: add boundary for dashboard" | Re-trigger Greptile

Comment on lines +64 to +66
<SectionErrorBoundary className="my-20">
<Outlet />
</SectionErrorBoundary>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Error persists across navigation

Layout remains mounted when users navigate between sibling routes. If one page throws, this boundary stays in its error state and hides the destination page until the user clicks Retry or reloads. Reset the boundary when the route changes so a failure on one page does not block another page.

Suggested change
<SectionErrorBoundary className="my-20">
<Outlet />
</SectionErrorBoundary>
<SectionErrorBoundary key={pathname} className="my-20">
<Outlet />
</SectionErrorBoundary>

Knowledge Base Used: Application shell and routing

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for ./apps/evm

Status Category Percentage Covered / Total
🔵 Lines 81.25% 53498 / 65843
🔵 Statements 81.25% 53498 / 65843
🔵 Functions 75.34% 1650 / 2190
🔵 Branches 86.24% 7979 / 9252
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/evm/src/clients/api/queries/getAccountPerformanceHistory/index.ts 89.83% 92.3% 100% 89.83% 48-53
apps/evm/src/components/index.ts 100% 100% 100% 100%
apps/evm/src/components/AreaChart/index.tsx 92.15% 71.42% 40% 92.15% 73-76, 109, 123-125
apps/evm/src/components/AreaChart/getXAxisTicks/index.ts 87.5% 75% 100% 87.5% 19-20, 28, 42
apps/evm/src/components/SectionErrorBoundary/index.tsx 100% 100% 100% 100%
apps/evm/src/containers/Layout/index.tsx 72.6% 85.71% 50% 72.6% 30-59
apps/evm/src/pages/Dashboard/index.tsx 82.5% 30% 100% 82.5% 29-34, 103-112, 115-120
Generated in workflow #14250 for commit d535f39 by the Vitest Coverage Report Action

This branch was successfully deployed

3 active deployments
Preview – venus.io — d535f39d Deployed Sep 16, 2026 by vercel[bot]
Preview – dapp-testnet — d535f39d Deployed Sep 16, 2026 by vercel[bot]
Preview – dapp-preview — d535f39d Deployed Sep 16, 2026 by vercel[bot]
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.

1 participant