Repository navigation
Thank a CopilotKit employee once their free trial is used up, and never block them - #2157
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 24, 2026 21:18
davidmckayv
force-pushed
the
staff-free-screens
branch
4 times, most recently
from
November 24, 2026 22:51
1158b1a to
e768ace
Compare
…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
force-pushed
the
staff-free-screens
branch
from
November 24, 2026 23:23
e768ace to
3054c43
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thatnonereadsfreefor them. This is what they see.What changed
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.needsCardis false whenevercopilotKitEmployeeis 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.past_dueit 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.copilotKitEmployeeand anaddCardUrl(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.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: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.addCardUrlshows the full bar, the line, and no Add a card.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.