diff --git a/frontend/src/scenes/inbox/components/config/SelfDrivingSection.tsx b/frontend/src/scenes/inbox/components/config/SelfDrivingSection.tsx index 27cac8afa671..284af47624af 100644 --- a/frontend/src/scenes/inbox/components/config/SelfDrivingSection.tsx +++ b/frontend/src/scenes/inbox/components/config/SelfDrivingSection.tsx @@ -255,6 +255,12 @@ export function SelfDrivingSection(): JSX.Element { />

Agents open PRs for actionable reports.

+ {/* The switch is team-scoped but the PRs it opens bill against the org-wide allowance, + so the scope is stated here, where someone turns PR generation on. */} +

+ This switch is per project, but the PR allowance is shared across your whole organization. See + Usage below. +

diff --git a/frontend/src/scenes/inbox/components/onboarding/InboxOnboarding.tsx b/frontend/src/scenes/inbox/components/onboarding/InboxOnboarding.tsx index 5fac7f261181..14845204576c 100644 --- a/frontend/src/scenes/inbox/components/onboarding/InboxOnboarding.tsx +++ b/frontend/src/scenes/inbox/components/onboarding/InboxOnboarding.tsx @@ -64,7 +64,7 @@ const BEATS: Beat[] = [ ), subtext: ( <> - Your first 3 PRs each month are free, then it's $15 per PR after that. + Your organization's first 3 PRs each month are free, then it's $15 per PR after that. ), preview: , diff --git a/frontend/src/scenes/inbox/components/shell/InboxUsageWidget.tsx b/frontend/src/scenes/inbox/components/shell/InboxUsageWidget.tsx index d58536e0b411..a6c360f756ec 100644 --- a/frontend/src/scenes/inbox/components/shell/InboxUsageWidget.tsx +++ b/frontend/src/scenes/inbox/components/shell/InboxUsageWidget.tsx @@ -1,7 +1,7 @@ import { useActions, useValues } from 'kea' import { Form } from 'kea-forms' -import { LemonButton, LemonInput, LemonModal, LemonSkeleton, LemonTag, Tooltip } from '@posthog/lemon-ui' +import { LemonButton, LemonInput, LemonModal, LemonSkeleton, LemonTag } from '@posthog/lemon-ui' import { BillingUpgradeCTA } from 'lib/components/BillingUpgradeCTA' import { LemonField } from 'lib/lemon-ui/LemonField' @@ -86,7 +86,7 @@ function EditLimitModal(): JSX.Element { isOpen={isModalOpen} onClose={closeModal} title="PR limit" - description="How many pull requests agents can open each month before pausing." + description="How many pull requests agents can open across your whole organization each month before pausing." width={460} footer={ <> @@ -106,7 +106,8 @@ function EditLimitModal(): JSX.Element {
{freePrs > 0 && pricePerPrUsd != null && ( - The first {freePrs} PRs each month are free, then {currencyFormatter(pricePerPrUsd)} per PR. + Your organization's first {freePrs} PRs each month are free, then{' '} + {currencyFormatter(pricePerPrUsd)} per PR. )} {estimatedBudgetUsd != null && pricePerPrUsd != null && ( @@ -164,28 +165,36 @@ export function InboxUsageWidget(): JSX.Element | null { return ( <>
-
- Pull requests - {!isSubscribed ? ( - - Free plan - - ) : canAccessBilling && status !== 'limit' ? ( - - ) : null} + {/* Scope and free tier are stated in the card itself, not in a tooltip: the count and the + allowance are org-wide while the switch that spends them is per project, so hover-only + copy left people expecting a per-project free tier and surprised by the bill. */} +
+
+ Pull requests + {!isSubscribed ? ( + + Free plan + + ) : canAccessBilling && status !== 'limit' ? ( + + ) : null} +
+

+ {freePrs > 0 + ? `Shared across your organization. The first ${freePrs} PRs each month are free.` + : 'Shared across your organization.'} +

- 0 ? `The first ${freePrs} PRs each month are free` : undefined}> -
- -
-
+
+ +
{spentUsd != null && ( {currencyFormatter(spentUsd)} @@ -193,13 +202,10 @@ export function InboxUsageWidget(): JSX.Element | null { )}
- - {/* tabIndex so keyboard users can focus the count and get the org-wide scope */} - - {usedPrsDisplay} - {limitPrs != null ? ` / ${limitPrs}` : ''} PRs created - - + + {usedPrsDisplay} + {limitPrs != null ? ` / ${limitPrs}` : ''} PRs created + {resetDate && ( Resets {resetDate.format('MMM D')} )}