Repository navigation
Warn before the free trial runs out, and shorten the dialog at the end - #2692
Conversation
- 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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
…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.
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
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. NewTrialNote(components/plan/trial-note.tsx), added under both composer layouts. Never for a CopilotKit employee.mine, from the sidebar'sagentListQueryOptions) as overlappingAbstractAvatars, 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.Progressprimitive at its own height.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.Itemrows withSeparators (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.PRICE_DOLLARSinwords.ts); every price sentence is built from it.EmployeeContentcomponent with the same markup and words.Things to know
addCardUrl. The API spec (OrganizationPlanFreeexample) and the existing tests sayaddCardUrlis 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 whilestatusisfree, both appear with no app change. That server change is not in this PR (no API changes here).DialogOverlaydefault, the same as every other dialog. A lighter backdrop is a change to the dialog primitive for the whole app, whichdocs/design-system.mdkeeps in its own PR.Before and after
Workbench,
host=browser. The plan is faked with an API override forGET /api/v2/organizations/:organizationId/plan, and the Bots list with one forGET /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
Used-up dialog, member
Failed payment
Under the message box at 85% (admin) and 90% (member)
Settings › Organization › Plan at 85% (admin)
The workbench fake sets
addCardUrlat 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 typecheckinapp/,bun run lint,bun run format:check: clean.Changelog
OpenBot Cloud.
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
Items withSeparators; 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.