:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(billing): update PostHog Desktop product copy (#77482)
Pawel Cebulaedfdc7e2da86
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex b0a8d893053a..cfa8f7ab5a5b 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -7483,17 +7483,17 @@ snapshots:scenes-other-billing-product--billing-product-platform-addons-trial-used--light:hash: v1.k794b7964.a3610366ad2be64f9b6ff77176950ce1ff726937f39b0270c50bff9f0c3b9c55.83KQE3ww4YX5WW-n9BfxNXj4nF3BAEnJJtBETXTJjFIscenes-other-billing-product--billing-product-post-hog-code-limit--dark:- hash: v1.k794b7964.4b78251fa8d74756faed932bcc0db1d6120f10f10c2f6f53e84139e3df90dfc2.5GyBIHNQlAaglevfZegED1lzraMYJiewb9GR1qoO4lA+ hash: v1.k794b7964.71b6991b563cc6e523d11505904f2dc8c47ecd440ac90a44ef8723d542c2536d.xpHMqbA3QTxdp-s4gMuFNUITYO4gPYfCkSxwePrtmC4scenes-other-billing-product--billing-product-post-hog-code-limit--light:- hash: v1.k794b7964.e39ff099e48a04384066a8c5fce5dc850834117f4cb2981df6a245ac7816c566.Gw2BU8FIvRbJ1VZwWBIALqqXUhtpLUKok-YvLam1XvU+ hash: v1.k794b7964.7f06398ca3af8c04da343f86f2881b6e21e5cdc1adc420ee3d22a1ef80fa305f.si6dTzyx3NP27K1R01iACHqzbJHvAZuLIXvI7e4_ojwscenes-other-billing-product--billing-product-post-hog-code-limit-editing--dark:- hash: v1.k794b7964.075d4f1b6f311cc86ba4723b97f287d339bf14506e409d8f426bb64a9aed4ab3.zx3TCE0tQiG-3ONoWMzSY7WjUzH5OLwMBY1ZiKFLITU+ hash: v1.k794b7964.b1fba1deb35b5ccac0cb927f89f41fa071436cbb9339b3861695c9b851706cc6.9-QG129uzgxxO5irq-jeMxufbidewPdXdMAyIpEhGEsscenes-other-billing-product--billing-product-post-hog-code-limit-editing--light:- hash: v1.k794b7964.1ba1f1cd2fe6561b9e2fc3edce2e90fc59c7c9bfdf0fb46a341943b9338064c5.vqVPO7rln80u1FU8FYpCn20fie7C9BKUsdQYPnx_jds+ hash: v1.k794b7964.a3bbef49716d1ea6fa9b92b79005af056f34f2040c224961d804f85596acc784.JGw5-GTbeq_p8KyjdiTeoX1jkN190GqFI9xV9JzgdmEscenes-other-billing-product--billing-product-post-hog-code-limit-next-period-capped--dark:- hash: v1.k794b7964.d2fc2f0a856541d1b4bd33d35831934cad422820d867b8f57094c2296b3e9bdd.o1Y2O6vAeDxHR8h7hqYgHMNO8KtHjDNBTgHedAGSK2Q+ hash: v1.k794b7964.9fde77b3e5aa2b9c585fd6b0ffcfd7310ee410804924ea2fdc7fa12e25dfa77d.CDr-pD-AT0ystYMo2yHqfqGU7fJKGdViAcVlhKE6JtIscenes-other-billing-product--billing-product-post-hog-code-limit-next-period-capped--light:- hash: v1.k794b7964.c4d25478cf2ad6a462de88fea90bd8d550b8c54af8ff512b55eb634845c2dce6.8NNi9mZi_IMQDxFruR31Pl6PD4jhmHJysUQDeQg3GfQ+ hash: v1.k794b7964.bdca13fc394cc1a4dafa1046b520bca6d8ee0fd4592c7461d34269d349065a25.opatfCwjLk4ajx1oBTypxiFqZTLgLzC6Huv1Pe3feEAscenes-other-billing-product--billing-product-temporarily-free--dark:hash: v1.k794b7964.17457ea2e809235689317d9e0feb224c18f8d5a81c8adf04b314e4d0c7b6f7d4.l_BpJhV7_FHvsDrKy34afdUPZvjK2sjH2OizL4u6SnIscenes-other-billing-product--billing-product-temporarily-free--light:diff --git a/frontend/src/scenes/billing/Billing.tsx b/frontend/src/scenes/billing/Billing.tsxindex 45db21fd2e85..601d5c2d18da 100644--- a/frontend/src/scenes/billing/Billing.tsx+++ b/frontend/src/scenes/billing/Billing.tsx@@ -273,7 +273,7 @@ export function Billing(): JSX.Element {<LemonButtonicon={<IconDocument />}size="small"- to="https://posthog.com/docs/posthog-code"+ to="https://posthog.com/docs/posthog-desktop"tooltip="Read the docs"/></div>diff --git a/frontend/src/scenes/billing/BillingLimit.test.tsx b/frontend/src/scenes/billing/BillingLimit.test.tsxindex d50f69a9833f..5f22a8f08f8c 100644--- a/frontend/src/scenes/billing/BillingLimit.test.tsx+++ b/frontend/src/scenes/billing/BillingLimit.test.tsx@@ -18,6 +18,7 @@ import { billingLogic } from './billingLogic'// dialog — this test is about the Save/Remove button wiring, not that branch.const makeProduct = (): BillingProductV2Type => ({...(billingJson.products.find((p) => p.type === 'product_analytics') as BillingProductV2Type),+ name: 'PostHog Desktop (usage-based)',subscribed: true,inclusion_only: false,current_amount_usd: null,@@ -83,7 +84,7 @@ describe('BillingLimit', () => {await userEvent.click(screen.getByTestId('save-billing-limit-product_analytics'))expect(await screen.findByTestId('billing-limit-set-product_analytics')).toHaveTextContent(- `You have a ${renderedAmount} billing limit set`+ `You have a ${renderedAmount} billing limit set for PostHog Desktop (usage-based).`)expect(patchedBody).toEqual({ custom_limits_usd: { product_analytics: savedLimit } })}@@ -101,7 +102,7 @@ describe('BillingLimit', () => {await userEvent.click(screen.getByTestId('remove-billing-limit-product_analytics'))expect(await screen.findByTestId('billing-limit-not-set-product_analytics')).toHaveTextContent(- 'You do not have a billing limit set'+ 'You do not have a billing limit set for PostHog Desktop (usage-based).')expect(patchedBody).toEqual({ custom_limits_usd: { product_analytics: null } })})diff --git a/frontend/src/scenes/billing/BillingLimit.tsx b/frontend/src/scenes/billing/BillingLimit.tsxindex e1ef44465e54..f9e2e2df8510 100644--- a/frontend/src/scenes/billing/BillingLimit.tsx+++ b/frontend/src/scenes/billing/BillingLimit.tsx@@ -65,7 +65,7 @@ export const BillingLimit = ({ product }: { product: BillingProductV2Type }): JSdata-attr={`billing-limit-set-${product.type}`}>You have a <b>${customLimitUsd?.toLocaleString()}</b> billing limit- set for {product?.name?.toLowerCase()}.+ set for {product.name}.</span></Tooltip>)}@@ -81,7 +81,7 @@ export const BillingLimit = ({ product }: { product: BillingProductV2Type }): JS) : (<><span className="text-sm" data-attr={`billing-limit-not-set-${product.type}`}>- You do not have a billing limit set for {product?.name?.toLowerCase()}.+ You do not have a billing limit set for {product.name}.</span><LemonButtononClick={() => setIsEditingBillingLimit(true)}diff --git a/frontend/src/scenes/billing/BillingProduct.stories.tsx b/frontend/src/scenes/billing/BillingProduct.stories.tsxindex a4f2adda7500..d21e63d39d92 100644--- a/frontend/src/scenes/billing/BillingProduct.stories.tsx+++ b/frontend/src/scenes/billing/BillingProduct.stories.tsx@@ -50,12 +50,12 @@ const makePostHogCodeUsageBilling = ({) as BillingProductV2Typeconst product: BillingProductV2Type = {...sourceProduct,- name: 'PostHog Desktop',+ name: 'PostHog Desktop (usage-based)',headline: 'AI coding agents for your PostHog workspace.',description: 'AI coding agents for automating PostHog work.',usage_key: POSTHOG_CODE_USAGE_PRODUCT_KEY,icon_key: 'IconTerminal',- docs_url: 'https://posthog.com/docs/posthog-code',+ docs_url: 'https://posthog.com/docs/posthog-desktop',subscribed: true,type: POSTHOG_CODE_USAGE_PRODUCT_KEY,current_amount_usd: currentLimitUsd > STARTUP_PROGRAM_BILLING_LIMIT_MAX ? '3750.00' : '25.00',diff --git a/frontend/src/scenes/billing/billingLimitConfig.test.ts b/frontend/src/scenes/billing/billingLimitConfig.test.tsindex 8516ed7bfd3a..7dafff5c11d4 100644--- a/frontend/src/scenes/billing/billingLimitConfig.test.ts+++ b/frontend/src/scenes/billing/billingLimitConfig.test.ts@@ -4,6 +4,8 @@ import {BillingLimitConfig,getBillingLimitConfig,MAX_BILLING_LIMIT,+ POSTHOG_CODE_USAGE_PRODUCT_KEY,+ REPLAY_VISION_PRODUCT_KEY,STARTUP_PROGRAM_BILLING_LIMIT_MAX,} from './billingLimitConfig'@@ -20,16 +22,16 @@ describe('getBillingLimitConfig', () => {billingLimitNextPeriod: limits.billingLimitNextPeriod ?? null,})- it.each(['posthog_code_usage', 'replay_vision'])(- 'caps %s for startup program customers and explains why',- (productType) => {- const config = getConfig(productType, StartupProgramLabel.YC)- expect(config.max).toBe(STARTUP_PROGRAM_BILLING_LIMIT_MAX)- expect(config.removalDisabledReason).toBeTruthy()- expect(config.help).toContain('startup program')- expect(config.maxExceededError).toContain('startup program')- }- )+ it.each([+ [POSTHOG_CODE_USAGE_PRODUCT_KEY, 'Desktop'],+ [REPLAY_VISION_PRODUCT_KEY, 'Replay vision'],+ ])('caps %s for startup program customers and explains why', (productType, productName) => {+ const config = getConfig(productType, StartupProgramLabel.YC)+ expect(config.max).toBe(STARTUP_PROGRAM_BILLING_LIMIT_MAX)+ expect(config.removalDisabledReason).toBeTruthy()+ expect(config.help).toContain(`${productName} billing limits`)+ expect(config.maxExceededError).toContain(`${productName} billing limits`)+ })it.each(['posthog_code_usage', 'replay_vision', 'product_analytics'])('does not cap %s without startup program enrollment',diff --git a/frontend/src/scenes/billing/billingLimitConfig.ts b/frontend/src/scenes/billing/billingLimitConfig.tsindex 5c8cd3a67554..ef8f1f380193 100644--- a/frontend/src/scenes/billing/billingLimitConfig.ts+++ b/frontend/src/scenes/billing/billingLimitConfig.ts@@ -33,7 +33,7 @@ type BillingLimitConfigResolver = (context: BillingLimitConfigContext) => Partia// Mirrors the caps the billing service enforces for startup-program customers, so the form// rejects out-of-range limits before the API does. The billing API product names are too-// verbose for copy (e.g. "PostHog Code (usage-based)").+// verbose for copy (e.g. "PostHog Desktop (usage-based)").const startupProgramCapResolver = (productName: string): BillingLimitConfigResolver => {return ({ billing, customLimitUsd, billingLimitNextPeriod }) => {if (!billing?.startup_program_label) {@@ -58,7 +58,7 @@ const startupProgramCapResolver = (productName: string): BillingLimitConfigResol}const BILLING_LIMIT_CONFIG_BY_PRODUCT: Record<string, BillingLimitConfigResolver> = {- [POSTHOG_CODE_USAGE_PRODUCT_KEY]: startupProgramCapResolver('Code'),+ [POSTHOG_CODE_USAGE_PRODUCT_KEY]: startupProgramCapResolver('Desktop'),[REPLAY_VISION_PRODUCT_KEY]: startupProgramCapResolver('Replay vision'),}