Skip to content

Thank a CopilotKit employee once their free trial is used up, and never block them - #2157

Merged
davidmckayv merged 5 commits into
mainfrom
staff-free-screens
Nov 24, 2026
Merged

davidmckayv merged 5 commits into
mainfrom
staff-free-screens

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Built on #2156 (the spec), whose commits this branch carries; it lands after that one.

A CopilotKit employee on OpenBot Cloud never pays. They get the same free trial as everyone, counted the same way, but their own runs are never refused for want of a plan. The plan read marks them (copilotKitEmployee) and keeps the organization's real status, except that none reads free for them. This is what they see.

What changed

  • The trial-used-up dialog, once. When an employee's allowance is used up, the same dialog opens by itself once, with exactly the same words as everyone's ("Your free trial was 500 Bot runs, and they're all used. From now on, OpenBot is $5 a month for each member of this organization."), plus the line "Free because you're a CopilotKit employee. Thanks, Uncle Atai!" in place of Add a card or the ask-an-admin line. Under it, a photo of Sentry (a white golden retriever on a rock above a mountain meadow) and "Sentry loves you too." The photo is an 800px WebP in app/src/assets (104 KB, metadata stripped), drawn only in the employee's dialog and lazy-loaded, so nobody else downloads it; it runs the dialog's full text width with the app's rounded corners, and on a short window the dialog's body scrolls like every dialog's. It has no button, only the dialog's own close. Like everyone's, a reload or a link opened afresh doesn't open it again.
  • Never blocked, in any status. needsCard is false whenever copilotKitEmployee is true, a failed payment included, so sending a message, Run now, Work on it and the other AI actions go straight through, the blocking dialog never opens on one, and there is no blocked banner and no Add a card beside a run.
  • Settings. Past the cap the Plan row keeps the full bar ("Free trial", "100% used") with the same line under it. On past_due it still shows "Last payment failed" with Update card for an admin (organizationNeedsCard): it's the organization's bill, and everyone else in it is stopped.
  • An employee admin can pay for the others. When the plan read carries copilotKitEmployee and an addCardUrl (the organization needs a card for members who aren't employees), the Plan row says "Everyone else in this organization needs a card added to keep their Bots running. It's $5 a month for each member." with Add a card under the bar. Still no blocking dialog, banner or guard on the employee's own AI actions, and the easter-egg dialog keeps no button.
  • Built from the app's own Dialog, Progress and Item, the same components as the normal used-up dialog. The line names the company, so the user-copy test lists it as a named exception.

Everyone else is unchanged: the normal used-up dialog, the member's line, the banner and the refused-run button behave exactly as before.

Tests

  • app/tests/plan-free-trial.test.tsx, through the app's real screens and query client against a server at the API's addresses:
    • An employee past the cap: the dialog opens by itself with the same words, the line, Sentry's photo (by its alt text, lazy) and "Sentry loves you too.", with no link and no "Ask an admin", and no blocked banner. After closing it, sending a message goes through (the message is sent, no dialog), Run now on a routine reaches the server (the request is made, no dialog), and a page load later it doesn't open by itself again.
    • An employee in an organization whose payment failed: no dialog, no banner, sending goes through, and the Plan row shows "Last payment failed" with Update card.
    • An employee admin with addCardUrl: the Plan row shows the line and Add a card to the payment page, no banner, and sending still goes through with no dialog. Red without the change (no Add a card), green with it.
    • The Plan row past the cap without addCardUrl shows the full bar, the line, and no Add a card.
    • The admin and member used-up dialogs now also check the line and the photo are absent.
  • Red/green: with the app's plan code put back to main's, the three new tests fail and the six existing ones pass; with the change, all nine pass.
  • app/tests/plan-notices-layout.test.tsx (real Chromium, the app's stylesheet) draws the employee's dialog and Plan row in light and dark at 1440 and 390 px: the photo is drawn at the text's full width, nothing runs off the page, no link in the dialog, no banner; on a 520px-tall window the dialog stays on screen and its body scrolls down to "Sentry loves you too."; the employee admin's Plan row with Add a card keeps the bar's width and the whole line at 390px (the first run caught it clamped to two lines, cutting off the price). 55 pass.
  • The user-copy tests, the plan notices tests, the tolerant reader, app typecheck and lint pass.

…er block them

A CopilotKit employee's runs are never refused for want of a plan; the plan read marks them (copilotKitEmployee) and stays free past the cap. Once their allowance is used, the trial-used-up dialog opens by itself once with the same words, plus "Free because you're a CopilotKit employee. Thanks, Uncle Atai!" in place of Add a card or the ask-an-admin line, and only a way to close. needsCard stays false for them, so no AI action is stopped, the dialog never reopens on one, and no blocked banner shows. The Settings Plan row keeps the full bar with the same line.
…layout test

The plan notices layout test gains an employee past the free allowance: their trial-used-up dialog and Plan row in light and dark, wide and on a phone, with nothing off the page, no link in the dialog and no banner.
An employee reads the organization's real status (active, past_due) except that none reads free. needsCard is now false for them in every status, so on past_due their AI actions still go through with no dialog and no banner. The Plan row keeps the organization's bill: past_due still reads Last payment failed with Update card for admins, since everyone else in the organization is stopped.
Under the employee line, a photo of Sentry, a white golden retriever, and the line "Sentry loves you too." The photo is an 800px WebP (104 KB, no metadata) in app/src/assets, drawn only in the employee's dialog and lazily, so nobody else downloads it. It runs the dialog's full text width with the app's rounded corners; on a short window the dialog's body scrolls as it does for every dialog. The layout test serves the bundle's images and checks the photo is drawn, fits at 390px, and scrolls into view on a short window.
… employees

Found on the end-to-end run: an employee admin had no way to pay for coworkers who aren't employees. When the plan read carries copilotKitEmployee with an addCardUrl, the Settings Plan row says everyone else in the organization needs a card to keep their Bots running, at $5 a month for each member, and offers Add a card under the bar. Nothing else changes for the employee: no blocking dialog, no banner, and their AI actions go through. The employee lines on the row are no longer clamped to two lines, which cut the price off at phone width.
@davidmckayv
davidmckayv merged commit 4c570e7 into main Nov 24, 2026
23 checks passed
@davidmckayv
davidmckayv deleted the staff-free-screens branch November 24, 2026 23:54
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.

1 participant