From 413af1a39eecbb6a6f740072dc60d0b132be41fd Mon Sep 17 00:00:00 2001 From: Sam Julien Date: Tue, 1 Dec 2026 15:22:34 -0800 Subject: [PATCH 1/7] Warn before the free trial runs out, and shorten the dialog at the end - From 80% of the free trial used, a line under the message box says how much is used, with Add a card where the server sends the way to add one, or "Ask an admin to add a card" for a member. - The used-up dialog says it once: title, one line that also says Bots, conversations and memory are kept, the price ("$5 per member per month") with what it covers, then Not now and Add a card. No full bar and no sentence repeating the button. - A member is told which admins to ask, by name, from the members list. - The Plan row in Settings draws an 8px bar with row-size labels, says what happens at 100%, and offers Add a card beside the bar from 80% where the server sends the way. - The CopilotKit employee dialog is unchanged. --- CHANGELOG.md | 10 + .../components/channels/composer/composer.tsx | 4 + .../organization-settings-page.tsx | 48 ++++- .../components/plan/card-needed-dialog.tsx | 143 ++++++++++---- app/src/components/plan/trial-note.tsx | 42 ++++ app/src/lib/plan/queries.ts | 18 ++ app/src/lib/plan/words.ts | 112 ++++++++--- app/tests/plan-free-trial.test.tsx | 184 +++++++++++++++++- 8 files changed, 475 insertions(+), 86 deletions(-) create mode 100644 app/src/components/plan/trial-note.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c13cf3930..93bf12c412 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,16 @@ Newest first. `Unreleased` is what is on `main` and not yet tagged. added later. An OpenBot that doesn't offer `openbot` is asked for every permission it lists, as before. +**OpenBot Cloud.** + +- **The free trial warns before it runs out, and the dialog at the end is shorter.** From 80% used, + a line under the message box says how much is used, with Add a card for an owner or an admin + where OpenBot offers it, and "Ask an admin to add a card" for a member. Once it's used up, the + dialog says it once, that your Bots, conversations and memory are all kept, and the price, "$5 + per member per month", with Not now beside Add a card. A member is told which admins to ask, by + name. Settings, Organization's Plan row draws a thicker bar and says "When it's used up, Bots + pause until a card is added." + **API.** - **Added: the scope `openbot`, for OpenBot's own apps.** It is every other scope of the `appOAuth` diff --git a/app/src/components/channels/composer/composer.tsx b/app/src/components/channels/composer/composer.tsx index e19f5b264b..f55bce782b 100644 --- a/app/src/components/channels/composer/composer.tsx +++ b/app/src/components/channels/composer/composer.tsx @@ -30,6 +30,7 @@ import { } from "react"; import { attachmentModality } from "@/components/channels/chat-messages"; import { IconWaveform } from "@/components/icons/waveform"; +import { TrialNote } from "@/components/plan/trial-note"; import { useTouchTyping } from "@/hooks/use-touch-typing"; import { attachmentAddress, @@ -2092,6 +2093,8 @@ export function Composer({ + {/* Under the box once most of the free trial is used: components/plan/trial-note.tsx. */} + ); } @@ -2191,6 +2194,7 @@ export function Composer({ + {/* The notice's invisible copy, below the box: see above. Hidden from everyone and inert. */}