fix: add bundle budgets for critical dashboard routes - #1502
Open
Fading-Dev wants to merge 7 commits into
Open
Conversation
|
@Fading-Dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Overview
This PR adds deterministic bundle budgets for the critical dashboard routes in the StreamPay frontend. It introduces a shared route-to-budget manifest, enforces those budgets as build errors during production client builds, and adds focused tests for success, rejection, boundary, and regression scenarios. This prevents silent performance regressions on the most important dashboard surfaces without changing runtime behavior, authorization, or state-transition logic.
Related Issue
Changes
📦 Bundle Budget Configuration
next.config.jscriticalRouteBudgets, a single source of truth mapping critical dashboard routes to explicit minified/gzipped size budgets:app/layout→120 kBapp/dashboard/IndexerStatus→160 kBapp/dashboard/QuickDeposit→180 kBapp/components/StreamViz→220 kBapp/contacts→140 kBapp/activity→180 kBBundleBudgetWebpackPluginscoped to production client builds. The plugin matches compiled route chunks against the manifest and emits a build error when a critical route exceeds its budget.🛣️ Critical Route Entrypoints
[MODIFY]
app/dashboard/IndexerStatus.tsx[MODIFY]
app/dashboard/QuickDeposit.tsx[MODIFY]
app/components/StreamViz.tsx[MODIFY]
app/contacts/page.tsx[MODIFY]
app/activity/page.tsx[MODIFY]
app/layout.tsx🧪 Tests
src/lib/__tests__/bundleBudgets.test.tsVerification Results
criticalRouteBudgetsand enforced in production buildsCloses #1444