Skip to content

Warn before the free trial runs out, and shorten the dialog at the end - #2692

Merged
samjulien merged 8 commits into
mainfrom
claude/polish-free-usage-limit-12f627
Dec 2, 2026
Merged

samjulien merged 8 commits into
mainfrom
claude/polish-free-usage-limit-12f627

Conversation

@samjulien

@samjulien samjulien commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Polishes the OpenBot Cloud free trial from the design audit: warn before it runs out, show what stopped when it does, and give a member someone to ask.

What changed

  • A warning before the limit. From 80% of the free trial used (freeRunsUsedPercent), one quiet line under the message box: "85% of your free trial used · Add a card" for an owner or an admin, "… · Ask an admin to add a card" for a member. New TrialNote (components/plan/trial-note.tsx), added under both composer layouts. Never for a CopilotKit employee.
  • The used-up dialog, redesigned on the shared dialog shell (no size, padding or title overrides):
    • Paused Bots. The person's own Bots (mine, from the sidebar's agentListQueryOptions) as overlapping AbstractAvatars, faded, up to 4 plus "+N", then a "Paused" pill. Bots shared with them aren't counted. Left out when there are none or the list isn't read yet.
    • The line. "All 50 Bot runs in your free trial are used, so your 6 Bots are paused. Your Bots, conversations and memory are all kept." "Your Bot is paused" for one; no Bot part with none of their own; the old fallback without the allowance.
    • The bar is back: "Free trial, 100% used", full, the Progress primitive at its own height.
    • Admin: a plan card, an Item variant="outline": "Keep your Bots running", two check lines ("Your Bots run again as soon as the card is added", "Covers everyone in {organization}"), and "$5 per member a month". Then Not now and Add a card (initial focus). No monthly total: the plan API sends no billed seat count.
    • Member: the admins to ask as Item rows with Separators (PersonAvatar, name, email, Owner/Admin), owners first, up to 3 then "And N more", then "It's $5 per member a month." and Got it. With no admin known, the old sentence on its own.
    • Failed payment: same shell, "Your last payment didn't go through", no bar, no plan card, Not now and Update card. A member gets the admin rows under "Ask an admin to update the card".
    • The $5 is defined once (PRICE_DOLLARS in words.ts); every price sentence is built from it.
  • Settings › Organization › Plan row. Row-size labels, a grey line "When it's used up, Bots pause until a card is added.", and Add a card under the bar from 80% used. The bar is the primitive's own.
  • The CopilotKit employee dialog (Sentry photo and thank-you line) is unchanged. It moved into its own EmployeeContent component with the same markup and words.

Things to know

  1. The 80% Add a card shows only where the server sends addCardUrl. The API spec (OrganizationPlanFree example) and the existing tests say addCardUrl is null while runs are left, even for an admin. So today an admin at 80% sees "85% of your free trial used · At 100%, Bots pause until a card is added", and the Plan row shows no button. Once the server sends the link while status is free, both appear with no app change. That server change is not in this PR (no API changes here).
  2. The backdrop is unchanged. This dialog already uses the shared DialogOverlay default, the same as every other dialog. A lighter backdrop is a change to the dialog primitive for the whole app, which docs/design-system.md keeps in its own PR.
  3. "Paused" may need to match the word Check-ins that can always look, pause all, and a Bot's routines on its page and in its conversations #1561 uses for its "Pause all" state once that lands.

Before and after

Workbench, host=browser. The plan is faked with an API override for GET /api/v2/organizations/:organizationId/plan, and the Bots list with one for GET /api/v2/organizations/:organizationId/bots: six of the person's own Bots (two for the member) plus one shared Bot, which isn't counted.

Used-up dialog, admin

Before After
before-dialog-admin-light after-dialog-admin-light
before-dialog-admin-dark after-dialog-admin-dark

Used-up dialog, member

Before After
before-dialog-member-light after-dialog-member-light
before-dialog-member-dark after-dialog-member-dark

Failed payment

Before (admin) After
before-dialog-pastdue-admin-light after-dialog-pastdue-admin-light
after-dialog-pastdue-admin-dark
after-dialog-pastdue-member-light

Under the message box at 85% (admin) and 90% (member)

Before After
before-note-admin-light after-note-admin-light
after-note-member-dark

Settings › Organization › Plan at 85% (admin)

Before After
before-plan-row-admin-light after-plan-row-admin-light
after-plan-row-admin-dark

The workbench fake sets addCardUrl at 85% so the admin link and button show.

Checks

  • bun test app/tests/plan-free-trial.test.tsx app/tests/plan-notices.test.tsx app/tests/ui-look-guard.test.ts app/tests/color-scheme.test.ts: 39 pass. The plan tests cover the paused Bots row ("+2", a shared Bot not counted, none of their own), the line with the Bot count, the full bar, the plan card (no total), the member's admin rows and Got it, the sentence with no admin known, the failed payment, Not now, the 80% note and the Plan row.
  • bun run typecheck in app/, bun run lint, bun run format:check: clean.
  • Looked at admin and member, light and dark, and the failed payment, in the desktop workbench.

Changelog

OpenBot Cloud.

  • The free trial warns before it runs out, and the dialog at the end shows what stopped. 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 shows your own Bots marked Paused, says how many runs were used and that your Bots,
    conversations and memory are all kept, and shows the full bar. An owner or an admin gets the
    price, $5 per member a month, and Not now beside Add a card. A member sees the owners and admins
    to ask, with their roles. Settings, Organization's Plan row says "When it's used up, Bots pause
    until a card is added."

Review fixes

  • Dave: dropped the plan card's monthly total (the plan API sends no billed seat count), and moved the Plan row's Add a card under the bar.
  • Design review: only the person's own Bots are counted as paused; the shared dialog shell and title as they are; the plan card and the admin rows are Items with Separators; both bars use the primitive's height; the price reads "$5 per member a month" everywhere in the dialog; the Settings page's imports are back in their original order.

- 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.
- The person's Bots sit at the top, faded, with a Paused pill: up to
  four, the rest counted. Left out when there are none or they aren't
  read yet.
- The line says how many runs were used and how many Bots that paused,
  and that Bots, conversations and memory are kept.
- The free trial bar is back, full.
- An admin gets a plan card: "Keep your Bots running", $5 per member a
  month, two lines on what adding the card does, and the organization's
  monthly total from the members list once it is read.
- A member gets the owners and admins to ask as rows with their role,
  "It's $5 a month for each member.", and Got it.
- A failed payment keeps the same shell with no bar and no plan card.
- The $5 lives in one place; the other prices are built from it.

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One blocker. card-needed-dialog.tsx:265 and words.ts:41 compute N members and a monthly dollar total from the members list, but the plan API sends no total or seat count. The members list includes people who may not be billed (accounts being deleted, people who never opened OpenBot, CopilotKit employees), so the shown total can disagree with the bill. Either drop that line, or have the server send the billed total and show that. Everything else checks out: members see only owners' and admins' name, email and role, which the API already allows; the plan card is admins-only; and the 80% cut-off applies to the server's freeRunsUsedPercent. Not blocking: at 390px, Add a card squeezes the Plan row's bar to half width (organization-settings-page.tsx:277), so put it under the bar as the employee button does.

… bar

The plan API sends no billed seat count, and the members list includes
people who may not be billed, so a total worked out from it could
disagree with the bill. The plan card keeps the price and the two lines
on what adding a card does.

On the Plan row, Add a card from 80% sits under the bar, as the
employee's button does, so the bar keeps its width in a narrow window.
davidmckayv
davidmckayv previously approved these changes Dec 2, 2026

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved at f3db806. The plan card no longer works out a monthly total: monthlyTotal and the members query are gone, with a comment saying why, and Add a card sits under the Plan bar. The privacy and 80% checks from the earlier review still hold.

- Count and show only the person's own Bots as paused, not Bots shared
  with them; with none, the line has no Bot part.
- Use the shared dialog shell and title as they are.
- The plan card is an outline Item, and the admins a member is told to
  ask are Items with separators.
- Both bars use the Progress primitive's own height.
- The price reads "$5 per member a month" on the card and in the
  member's line.
- Put the Settings page's imports back in their original order.
The title and the price stay on one row; the two lines sit under them in an ItemFooter, so each fits on one line at the dialog's width.
davidmckayv
davidmckayv previously approved these changes Dec 2, 2026

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-reviewed the design-check fixes at 75c448e: only your own Bots count, the shared dialog shell is back, the plan card is an Item. Checked at 390 and 1440px, light and dark. Holds.

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-approved: since my last approval this push only merges main and drops the CHANGELOG.md edit (the note is in the description). Nothing else changed.

@samjulien
samjulien added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 01ac5fb Dec 2, 2026
37 checks passed
@samjulien
samjulien deleted the claude/polish-free-usage-limit-12f627 branch December 2, 2026 04:08
davidmckayv added a commit that referenced this pull request Dec 2, 2026
Their first CI run found them stale against changes that landed on main today:

- routine-run-now-layout: a running run now reads "Running now" (#2704).
- plan-notices-layout: the trial-used-up dialog says it in one sentence, "All 500 Bot runs in your
  free trial are used." (#2692), as the suite's plan-free-trial.test.tsx reads it.
- artifacts-screens: Back's focus reaches the tile that opened the artifact a moment after the
  address changes, once the list is drawn again; the case read it at once, while it was still on
  Back. It waits for it now, up to 5 s, and fails when the list's focus call is taken out.
davidmckayv added a commit that referenced this pull request Dec 2, 2026
Their first CI run found them stale against changes that landed on main today:

- routine-run-now-layout: a running run now reads "Running now" (#2704).
- plan-notices-layout: the trial-used-up dialog says it in one sentence, "All 500 Bot runs in your
  free trial are used." (#2692), as the suite's plan-free-trial.test.tsx reads it.
- artifacts-screens: Back's focus reaches the tile that opened the artifact a moment after the
  address changes, once the list is drawn again; the case read it at once, while it was still on
  Back. It waits for it now, up to 5 s, and fails when the list's focus call is taken out.
davidmckayv added a commit that referenced this pull request Dec 2, 2026
Their first CI run found them stale against changes that landed on main today:

- routine-run-now-layout: a running run now reads "Running now" (#2704).
- plan-notices-layout: the trial-used-up dialog says it in one sentence, "All 500 Bot runs in your
  free trial are used." (#2692), as the suite's plan-free-trial.test.tsx reads it.
- artifacts-screens: Back's focus reaches the tile that opened the artifact a moment after the
  address changes, once the list is drawn again; the case read it at once, while it was still on
  Back. It waits for it now, up to 5 s, and fails when the list's focus call is taken out.
felixpy pushed a commit to felixpy/OpenBot that referenced this pull request Dec 2, 2026
…e shards (CopilotKit#2780)

* Bring six never-run browser tests up to the app as it is, and hold the app's Desktop calls to the real shell

* Run 33 browser tests no CI job named, in the WebKit job split into three shards

* Bring three more never-run browser tests up to today's app

Their first CI run found them stale against changes that landed on main today:

- routine-run-now-layout: a running run now reads "Running now" (CopilotKit#2704).
- plan-notices-layout: the trial-used-up dialog says it in one sentence, "All 500 Bot runs in your
  free trial are used." (CopilotKit#2692), as the suite's plan-free-trial.test.tsx reads it.
- artifacts-screens: Back's focus reaches the tile that opened the artifact a moment after the
  address changes, once the list is drawn again; the case read it at once, while it was still on
  Back. It waits for it now, up to 5 s, and fails when the list's focus call is taken out.

* Open folds before reading inside them, in the browser tests CopilotKit#2782 left unopened

CopilotKit#2782 draws what a folded line holds only once it is opened (`useDrawnOnceOpened`), so a long
turn's steps are not all on the page at once. Three browser tests no job ran read inside closed
folds, and the merge queue's run of this pull request on top of it failed them:

- run-ended-unheard-layout: openTo opens the closed lines on screen a level at a time until the
  step is drawn, and leaves the step's own line for the test to open.
- browse-steps-layout and work-folded-layout: the rows drawn on opening are styled too (each test
  builds the app's stylesheet for the classes on the page).
- work-folded-layout: folded, no command's card is out of a fold, and nothing of the work is on
  screen; it no longer waits for the cards to be drawn while folded, which is what CopilotKit#2782 stopped.
  Opened, the three commands are listed and each opens to its terminal inside the column, as before.

* Invitations from the organization switcher, and openTo waits for the page

The merge queue's run failed two things:

- sidebar-current-row: CopilotKit#2644 moved Invitations into the account menu's organization switcher. The
  test opens the menu, styles it, then opens the switcher and chooses Invitations, and waits for
  both menus to close.
- no-fixed-settle-waits: run-ended-unheard's openTo waited a fixed 250 ms while the finished turn
  was still being drawn. It waits for a closed line, or for what it is after, instead.
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