Skip to content

Add an App routing test asserting Analytics/Notification chunks stay lazy #336

Description

@1nonlypiece

📌 Description

src/App.tsx deliberately lazy-loads Analytics and Notification behind
Suspense while eagerly importing the rest. There is risk that a future static
import re-bundles these heavy chunks (recharts, jsPDF) into the initial bundle.

This issue adds a guard test asserting the lazy boundary holds and the Suspense
fallback renders.

🎯 Requirements and Context

  • Render App (or a slimmed routing harness) at /analytics and /notifications
    within a router and assert the Skeleton fallback appears before the route
    resolves.
  • Assert the eager routes (/, /vaults, …) render synchronously without a
    fallback flash.
  • Add a lightweight static-analysis assertion (or comment-guard test) that
    Analytics/Notification are imported via lazy(() => import(...)) only.

🛠️ Suggested Execution

1. Fork the repo and create a branch

git checkout -b test/app-lazy-routes-guard

2. Implement changes

  • Add src/__tests__/App.lazyRoutes.test.tsx (mock heavy deps as needed).

3. Test and commit

  • Run: npm run test
  • Edge cases: navigating to a lazy route then back, unknown path → NotFound.

Example commit message

test: guard lazy Analytics/Notification route boundaries

✅ Guidelines

  • Minimum 95% test coverage on the touched lines.
  • No regressions in routing or code-splitting.
  • Keep the diff small and reviewer-friendly.
  • Timeframe: 96 hours.

🏷️ Labels

type-testing · area-frontend · MAYBE REWARDED · GRANTFOX OSS · OFFICIAL CAMPAIGN

💬 Community & Support

  • Join the contributor Discord to coordinate, ask questions, and get unblocked
    fast: https://discord.gg/xvNAvMJf
  • Please introduce yourself in the channel before you start so we can avoid
    duplicate work, pair you with a reviewer, and get your PR merged quickly.
  • Maintainers actively triage this channel and aim for fast, clear, respectful
    reviews — reach out any time you're blocked.

Metadata

Metadata

Labels

GRANTFOX OSSGrantFox open-source campaignMAYBE REWARDEDEligible for GrantFox rewardOFFICIAL CAMPAIGNOfficial GrantFox campaign issueStellar WaveIssues in the Stellar wave programarea-frontendFrontend / UI worktype-testingTests and test coverage

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions