From 589f58f9166aca4af437b365a4b0493ded06a7a8 Mon Sep 17 00:00:00 2001 From: Hunter Date: Sat, 28 Feb 2026 23:07:12 -0500 Subject: [PATCH] feat: add ever-present upgrade button for free-tier users (#9315) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Add persistent upgrade CTAs for free-tier users: a topbar button and "Upgrade to add credits" replacing "Add Credits" in popovers and settings panels. ## Changes - **What**: - New `TopbarSubscribeButton` component in both GraphCanvas and LinearView topbars, visible only to free-tier users - Profile popover (legacy + workspace): free-tier users see "Upgrade to add credits" instead of "Add Credits", linking directly to the pricing table - Manage Plan settings (legacy + workspace): same replacement — free-tier users see "Upgrade to add credits" instead of "Add Credits" - Paid-tier users retain the original "Add Credits" behavior in all locations - All upgrade buttons go directly to the pricing table (one-step flow) ## Review Focus - The `isFreeTier` conditional gating on the buttons — ensure free-tier users see upgrade CTAs and paid users see normal Add Credits - Layout in Manage Plan panels uses `flex flex-col gap-3` to stack the upgrade button below the usage history link instead of side-by-side ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9315-feat-add-ever-present-upgrade-button-for-free-tier-users-3166d73d365081228cdfe6a67fec6aec) by [Unito](https://www.unito.io) --- packages/design-system/src/css/style.css | 4 +++ src/components/graph/GraphCanvas.vue | 2 ++ .../topbar/CurrentUserPopoverLegacy.vue | 18 ++++++++++- .../topbar/TopbarSubscribeButton.vue | 25 +++++++++++++++ src/components/ui/button/button.variants.ts | 7 +++-- src/locales/en/main.json | 2 ++ .../components/SubscribeButton.vue | 14 ++------- .../components/SubscribeToRun.vue | 7 +---- .../SubscriptionPanelContentLegacy.vue | 21 ++++++++++--- .../CurrentUserPopoverWorkspace.vue | 31 ++++++++++++++++--- .../SubscriptionPanelContentWorkspace.vue | 15 ++++++++- src/views/LinearView.vue | 2 ++ 12 files changed, 118 insertions(+), 30 deletions(-) create mode 100644 src/components/topbar/TopbarSubscribeButton.vue diff --git a/packages/design-system/src/css/style.css b/packages/design-system/src/css/style.css index 44365bda36..dfecf0de11 100644 --- a/packages/design-system/src/css/style.css +++ b/packages/design-system/src/css/style.css @@ -634,6 +634,10 @@ } } +@utility bg-subscription-gradient { + background: var(--color-subscription-button-gradient); +} + @utility highlight { background-color: color-mix(in srgb, currentColor 20%, transparent); font-weight: 700; diff --git a/src/components/graph/GraphCanvas.vue b/src/components/graph/GraphCanvas.vue index 810932cbc6..dd27d7c8c9 100644 --- a/src/components/graph/GraphCanvas.vue +++ b/src/components/graph/GraphCanvas.vue @@ -18,6 +18,7 @@ > + @@ -140,6 +141,7 @@ import NodePropertiesPanel from '@/components/rightSidePanel/RightSidePanel.vue' import NodeSearchboxPopover from '@/components/searchbox/NodeSearchBoxPopover.vue' import SideToolbar from '@/components/sidebar/SideToolbar.vue' import TopbarBadges from '@/components/topbar/TopbarBadges.vue' +import TopbarSubscribeButton from '@/components/topbar/TopbarSubscribeButton.vue' import WorkflowTabs from '@/components/topbar/WorkflowTabs.vue' import { useChainCallback } from '@/composables/functional/useChainCallback' import type { VueNodeData } from '@/composables/graph/useGraphNodeManager' diff --git a/src/components/topbar/CurrentUserPopoverLegacy.vue b/src/components/topbar/CurrentUserPopoverLegacy.vue index ff40f1c600..f3dced10cd 100644 --- a/src/components/topbar/CurrentUserPopoverLegacy.vue +++ b/src/components/topbar/CurrentUserPopoverLegacy.vue @@ -46,6 +46,16 @@ class="icon-[lucide--circle-help] cursor-help text-base text-muted-foreground mr-auto" /> + + + + +