Skip to content

perf(portal): lazy-load heavyweight charts behind Suspense boundaries - #2309

Merged
github-actions[bot] merged 1 commit into
Smartdevs17:mainfrom
IVANLI2412:fix/issue-2271
Nov 24, 2026
Merged

github-actions[bot] merged 1 commit into
Smartdevs17:mainfrom
IVANLI2412:fix/issue-2271

Conversation

@IVANLI2412

Copy link
Copy Markdown
Contributor

Fixes #2271

What changed

  • Moved the heavyweight portal charts under developer-portal/app/charts/: UsageChart.tsx (moved from src/components/) and RequestTrendChart.tsx (extracted from the inline implementation in UsageAnalyticsScreen.tsx).
  • Added developer-portal/components/LazyChart.tsx: both charts are loaded with React.lazy() and rendered inside Suspense with an accessible loading fallback, plus an error boundary that logs chunk-load failures and renders a small "unavailable" fallback instead of crashing the screen.
  • DeveloperPortalScreen and UsageAnalyticsScreen now render LazyUsageChart / LazyRequestTrendChart. No new dependencies, no Rust/contract files touched, no .md/.json files added.

Validation (real)

  • Command: node C:\Users\User\AppData\Local\Temp\opencode\subtrackr_2271_validate.js
  • Tooling: TypeScript 5.8.3 already present in the local pnpm store (nothing installed). transpileModule with reportDiagnostics on the 5 touched .tsx files, then node --check on each transformed JS.
  • Result: 5/5 files PASS, RESULT=ALL_PASS, exit code 0, zero TS diagnostics.
  • npm run typecheck was not usable here: no node_modules in the checkout and the root tsconfig.json excludes developer-portal. No dependencies were installed to work around it.
  • Tests: none added in this patch; Jest/RN toolchain is not available locally, so no claims about test execution are made.

Payment methods for this bounty

  • Base Mainnet: 0xC5dD2Ea54FF138bb3f71D3466092eA31eF115868
  • Solana: DN3pfYEvdkoTBP4oaEVvemsr98fZPhDSAbfVfmewRGQ5
  • PayPal: ivanzenteno3@gmail.com

@github-actions
github-actions Bot merged commit c9e77e4 into Smartdevs17:main Nov 24, 2026
7 of 27 checks passed
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.

Move heavyweight charts to lazy Suspense boundaries on the portal

1 participant