Skip to content

Conversation

@pieterbeulque
Copy link
Contributor

Related to #6357

polar-preview-including-taxes.mp4

@vercel
Copy link

vercel bot commented Sep 17, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
polar Ignored Ignored Preview Sep 18, 2025 2:48pm
polar-sandbox Ignored Ignored Preview Sep 18, 2025 2:48pm

@github-actions
Copy link
Contributor

github-actions bot commented Sep 17, 2025

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Fifty-eight Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/_not-found/page 359 B 159.04 KB 45.44% (+/- <0.01%)
/layout 56 KB 214.69 KB 61.34% (+/- <0.01%)
/checkout/[clientSecret]/confirmation/page 270.67 KB 429.36 KB 122.67% (🟡 +0.01%)
/(main)/purchases/products/[id]/page 360 B 159.04 KB 45.44% (+/- <0.01%)
/(main)/verify-email/page 357 B 159.03 KB 45.44% (+/- <0.01%)
/(main)/(topbar)/layout 199.16 KB 357.84 KB 102.24% (🟡 +0.01%)
/(main)/[organization]/(header)/donate/page 357 B 159.03 KB 45.44% (+/- <0.01%)
/(main)/[organization]/(header)/layout 221.61 KB 380.29 KB 108.65% (🟡 +0.01%)
/(main)/[organization]/(header)/page 115.56 KB 274.25 KB 78.36% (🟡 +0.01%)
/(main)/[organization]/(header)/subscriptions/page 357 B 159.03 KB 45.44% (+/- <0.01%)
/(main)/[organization]/portal/authenticate/page 62.71 KB 221.39 KB 63.25% (🟡 +0.02%)
/(main)/[organization]/portal/layout 46.54 KB 205.23 KB 58.64% (+/- <0.01%)
/(main)/[organization]/portal/orders/[id]/page 251.72 KB 410.41 KB 117.26% (🟡 +0.01%)
/(main)/[organization]/portal/orders/page 271.81 KB 430.5 KB 123.00% (🟡 +0.01%)
/(main)/[organization]/portal/overview/page 278.01 KB 436.7 KB 124.77% (🟡 +0.10%)
/(main)/[organization]/portal/request/page 58.24 KB 216.93 KB 61.98% (🟡 +0.01%)
/(main)/[organization]/portal/page 358 B 159.04 KB 45.44% (+/- <0.01%)
/(main)/[organization]/portal/settings/page 174.42 KB 333.11 KB 95.17% (🟡 +0.01%)
/(main)/[organization]/portal/subscriptions/[id]/page 234.79 KB 393.48 KB 112.42% (🟡 +0.01%)
/(main)/[organization]/portal/usage/page 118.59 KB 277.27 KB 79.22% (🟡 +0.01%)
/(main)/vision/layout 358 B 159.04 KB 45.44% (+/- <0.01%)
/(main)/signup/nextjs-hackathon/layout 358 B 159.04 KB 45.44% (+/- <0.01%)
/(main)/dashboard/(create)/create/page 156.58 KB 315.26 KB 90.07% (🟡 +0.02%)
/(main)/dashboard/[organization]/storefront/page 333.45 KB 492.14 KB 140.61% (🟡 +0.01%)
/(main)/dashboard/account/page 359 B 159.04 KB 45.44% (+/- <0.01%)
/(main)/dashboard/account/layout 217.42 KB 376.1 KB 107.46% (🟡 +0.01%)
/(main)/dashboard/account/developer/page 177.1 KB 335.78 KB 95.94% (🟡 +0.01%)
/(main)/(landing)/(mdx)/layout 356 B 159.03 KB 45.44% (+/- <0.01%)
/(main)/dashboard/[organization]/(header)/(home)/page 337.78 KB 496.47 KB 141.85% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/layout 217.89 KB 376.57 KB 107.59% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/analytics/page 350.49 KB 509.17 KB 145.48% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/benefits/page 305.16 KB 463.85 KB 132.53% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/customers/page 369.83 KB 528.51 KB 151.00% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/products/[id]/page 420.68 KB 579.37 KB 165.53% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/finance/account/page 273.38 KB 432.06 KB 123.45% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/products/discounts/page 267.38 KB 426.06 KB 121.73% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/products/new/page 297.19 KB 455.87 KB 130.25% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/products/checkout-links/page 253.32 KB 412 KB 117.72% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/products/page 233.55 KB 392.24 KB 112.07% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/sales/[id]/page 297.62 KB 456.3 KB 130.37% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/sales/checkouts/[id]/page 273.21 KB 431.89 KB 123.40% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/sales/page 249.76 KB 408.45 KB 116.70% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/sales/subscriptions/page 243.31 KB 401.99 KB 114.86% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/sales/checkouts/page 249.52 KB 408.21 KB 116.63% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/settings/custom-fields/page 247.98 KB 406.67 KB 116.19% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/settings/members/page 241.04 KB 399.73 KB 114.21% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/settings/webhooks/endpoints/[id]/page 257.99 KB 416.67 KB 119.05% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/sales/subscriptions/[id]/page 237.78 KB 396.47 KB 113.28% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/settings/page 257.64 KB 416.33 KB 118.95% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/settings/webhooks/page 230.22 KB 388.91 KB 111.12% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/usage-billing/events/page 275.15 KB 433.83 KB 123.95% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/usage-billing/meters/create/page 229.66 KB 388.35 KB 110.96% (🟡 +0.01%)
/(main)/dashboard/[organization]/onboarding/integrate/page 215.88 KB 374.57 KB 107.02% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/usage-billing/meters/page 402.73 KB 561.42 KB 160.40% (🟡 +0.01%)
/(main)/dashboard/[organization]/onboarding/product/page 320.65 KB 479.34 KB 136.95% (🟡 +0.02%)
/(main)/dashboard/[organization]/(header)/finance/(wide)/income/page 167.13 KB 325.82 KB 93.09% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/finance/(wide)/layout 217.34 KB 376.03 KB 107.44% (🟡 +0.01%)
/(main)/dashboard/[organization]/(header)/finance/(wide)/payouts/page 210.1 KB 368.79 KB 105.37% (🟡 +0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

Copy link
Member

@frankie567 frankie567 left a comment

Choose a reason for hiding this comment

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

Looks sensible! Small logic caveats to fix :)

I'm wondering though if we could somehow find a way to factorize this logic with what we do in cycle, since it's basically the same thing. But that can be done later :)


if subscription.status != "active":
## FIXME Is a 404 the correct behavior?
raise ResourceNotFound()
Copy link
Member

Choose a reason for hiding this comment

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

We could indeed define a specific 400 error, but not a big deal

@pieterbeulque pieterbeulque force-pushed the pieterbeulque/6357-show-tax-on-estimates branch from 20d71fb to 50e94c1 Compare September 17, 2025 14:09
@pieterbeulque
Copy link
Contributor Author

image

if subscription.discount.is_repetition_expired(
subscription.started_at, subscription.current_period_start
):
subscription.discount = None
Copy link
Member

Choose a reason for hiding this comment

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

Could we assign discount as a local variable? It's a bit scary like this 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha, yeah, good call, I copied this over without thinking too much, sorry.

@pieterbeulque pieterbeulque force-pushed the pieterbeulque/6357-show-tax-on-estimates branch from cb69dde to d8379aa Compare September 18, 2025 14:36
@pieterbeulque pieterbeulque merged commit 7076dc7 into main Sep 19, 2025
13 checks passed
@pieterbeulque pieterbeulque deleted the pieterbeulque/6357-show-tax-on-estimates branch September 19, 2025 05:43
@sentry-io
Copy link

sentry-io bot commented Sep 22, 2025

Issues attributed to commits in this pull request

This pull request was merged and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎

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.

2 participants