Repository navigation
feat(web): let a workspace whose plan ended browse read-only, with one "Choose a plan" dialog - #1599
Conversation
…e "Choose a plan" dialog
On the cloud, an ended trial, a cancel during the trial and a cancel
after the first payment can now sign in and look around. They used to
see a full-screen "subscription expired" notice that only signed out.
Onboarding is unchanged: an admin who never started a trial still goes
to the plan step.
- The dashboard layout lets these workspaces in, read-only. A thin
banner says so, with "See plans".
- UpgradeDialogProvider and useUpgradeGate ({ guard, isLocked,
openUpgrade }) open one "Choose a plan to keep going" dialog, with the
action that was clicked as a label.
- Admins go to Billing; members are told to ask their admin.
- A failed payment (past_due, unpaid) says so and opens Stripe's
portal.
- A 402 subscription_inactive from the API opens the dialog
(use-failure-toast, api-failure's subscription class, and the
Webflow, catalog, publish and Send to CMS clients).
- Automatic calls (Library's Webflow status, the editor's link, source,
claim and page reads, Improve's read) aren't sent while locked.
- Billing: an ended subscription starts a new Checkout ("Choose
{plan}", monthly or annual). The checkout route takes admins only,
refuses a second live subscription (409), and validates its body.
Billing reads again after a change.
- MCP: list_ and get_ tools stay open; every other tool, and REST
writes, answer subscription_inactive. Chat and new conversations
answer 402, and runSiteAuditFor, generateBriefFor and
createImproveActionFor check too. A chat message refused by a 402
goes back to the input.
Self-hosted is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
left a comment
There was a problem hiding this comment.
Looks good, with follow-ups. Merge it only once #1589's API is live (see "Before and after the API deploy").
What I checked:
- Merge state. One commit (22fdd46) on 55b49e7.
git merge-treewith main (15b5b5f) is clean. Main's changes since then that touch the same files are #1567 (Library's send filter), #1593 (Webflow card) and the billing/plan config. All three auto-merge, and the merged tree's tests pass (below). - Who's affected.
evaluateSubscriptionAccesskeepsactiveandtrialingas the only open statuses, the same pairisSubscriptionActiveuses on the server (#1589). Paying and trialing workspaces getokand nothing changes for them:subscriptionActivestays true, the banner renders nothing,guard()runs the handler, anduseFailureToastonly opens the dialog onsubscription_inactiveor on a plan refusal while already locked.- Self-hosted: the layouts skip the check (
isCloud()), andPlanProviderforcessubscriptionActive: truewhenNEXT_PUBLIC_IS_CLOUDisn't set.subscriptionActiveForreturns true off the cloud, so the MCP and agent gates never fire there. - An admin with no
stripe_subscription_idkeeps the plan step (choose_plan). The webhook never clears the id onsubscription.deleted, so a cancelled workspace doesn't fall back into onboarding. The onboarding layout sends an ended, onboarded workspace to/dashboard, and there's no loop between the two layouts.
- Checkout.
- The admin check, the Zod body and the 409 on a live subscription are right.
subscriptionEndedandLIVE_STATUSESagree with the layout:past_due/unpaidgo to the portal,canceled/incomplete_expired/none start a new Checkout. - Onboarding's call (
{ planId, organizationId }) still parses. A new account's creator isadminby the column default, so the new role check doesn't block the first purchase.
- The admin check, the Zod body and the 409 on a live subscription are right.
- Server-side gates on the web.
- The MCP tools are wrapped in
registerTool;tool()throws. All 50 tools on the stack's head follow the prefix rule: the 36list_/get_tools only read, and the 14 others (accept/dismiss, update status, brief, audit, improve action, sentiment override, draft create/source/suggest/ready) are gated. The plan is read once per request, and a failed read refuses the call. authenticateMcpRequestrefuses POST/PUT/PATCH/DELETE on the/api/mcp/*REST routes./api/mcpitself opts out and gates per tool.generateBriefFor,runSiteAuditForandcreateImproveActionForassert after the ownership check, so any caller is covered.POST /api/agent/chatandPOST /api/agent/conversationsanswer 402 before any model call. Reading and deleting conversations stay open./api/aeo/*forwards to the API, which #1589 gates./api/keys,/api/settings/pulseand/api/settings/ai-providersstill write while locked; none of them costs anything (follow-up 1).
- The MCP tools are wrapped in
- Tests.
- On main merged with this PR, the whole web suite passes apart from failures that main shows on its own in the same run (export and
server/-path tests that need files outsideweb/).tsc --noEmiton the merged tree adds no errors to main's. - With this PR's source files put back to 55b49e7 and its tests kept, 24 of its 25 test files fail (38 tests, plus the files that no longer load).
- On main merged with this PR, the whole web suite passes apart from failures that main shows on its own in the same run (export and
Before and after the API deploy:
- With today's API (no #1589), this PR shouldn't go out. It's the first change that lets an ended workspace into the dashboard. This PR guards almost no buttons itself; #1606 and #1609 add those.
- Today's API leaves several model and page-reading routes to #1589's middleware: the report summary, fan-out intents, competitor and topic suggestions, and the content page reads. An ended workspace could run them from the dashboard.
- The routes already behind plan-guard answer its 402 without a code. The web reads that as
planand, while locked, opens the dialog. So those are fine.
- With #1589 live, every route that costs answers 402
subscription_inactive, and this PR turns that into the dialog.- What still goes through is the writes that go straight to the database from server actions and RLS. That's adding or editing prompts, topics, competitors, brands, notes and drafts' fields, for pages #1606/#1609 don't cover yet.
- None of those costs anything: tracking and the other sweeps skip an ended organization.
- Merge #1599, #1606 and #1609 together, or close together. On #1599 alone, every button outside the dialog's own paths runs and lands on a 402 or a plain toast.
Follow-ups:
- Writes that skip the API. "Read-only" holds only in the UI for the direct server-action and RLS writes (the ~26 actions in the description), and for
/api/keysand/api/settings/*. A sharedassertSubscriptionActive(orgId)in those actions would make the rule hold server-side the way the MCP surface already does. An RLS-level check on the main tables would also work. Neither costs today, so it can be its own PR, but it belongs before C3 is called done. - An org read that fails opens the dashboard unlocked (
isCloud() && !orgError). That's fine once #1589 is live, because the API still refuses. It's worth a comment that this leans on the API. - Re-subscribing goes through
/api/stripe/success. That route triggers tracking and volume analysis for the first brand, as for a new account. For a returning customer that's a full run at once on the day they pay. It's probably wanted, but it's worth confirming. - The plan step for an ended trial vs. an ended paid plan. As the description says, there's no stored trace to tell them apart. If that copy matters later, a
trial_ended_atset by the webhook would do it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…essage test main's catalog-client test (ansvisor#1583) asks for words for every StoreError code; 'subscription' opens the upgrade dialog instead of saying one, so the test leaves it out, as ansvisor#1613 does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merged main forward (through #1611) so the read-only chain applies on today's main. One fix, 9616d2e: main's |
…lan & usage, not Starter's (#1671) * fix(prompts): show an organization whose plan ended its own plan in Plan & usage, not Starter's Follow-up from the read-only browser check. /api/prompts/usage read the plan with planFromOrgRow, which gives an organization without an active subscription Starter's limits, so an ended Growth workspace's Plan & usage fold said "Starter plan · 25 of 50 on Starter · Upgrade to Growth". - plan-guard.ts: usagePlanFromOrgRow is the plan to show usage against. While the subscription is active or trialing it's planFromOrgRow's; once it has ended (cloud), the plan the row names, Enterprise overrides merged, marked ended. planFromOrgRow is unchanged for every other caller. - The summary's plan gets `ended: true` and the new cta `choose_plan` then (ended is left out otherwise, so other answers are as before). - The cards say "Growth plan · ended", 0 slots left, and "Your Growth plan has ended · Choose a plan", linking to the plan page as the other upgrades do. - The MCP's prompt usage read (getPromptUsageFor) reads it the same way. Only seen once an ended workspace can open the dashboard (the read-only web part, #1599). The coach skills list plan.cta's values; they'll need choose_plan in their own docs PR. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(prompts): leave an ended plan no slots in the Add Prompt dialog and bulk import, and say so in get_prompt_usage Review follow-up. - locationQuotaFromUsage read only locationLimit, so with the plan ended the cards said 0 slots left while the Add Prompt dialog and bulk import still let 154 more in. An ended plan's quota now reads as full. - get_prompt_usage's description told the agent "Slots left = locationLimit − locationsUsed" with no word of plan.ended, so it would say an ended Growth plan had 154 left. It now names `ended` and the choose_plan cta, and says no slot is left until a plan is chosen. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…access, part 3) (#1704) * feat(settings): store who sees which left-menu sections (menu access, part 1) Menu access, part 1 of 7: the data and the rule, with no UI yet. - 00374 adds organization_menu_roles, the sections a role (not admin) doesn't see. Members of the organization read it and the server writes it. - On profiles it adds menu_shown, menu_hidden and can_manage_menus, which only the server sets (00228's guard is extended), and work_areas and work_areas_asked_at, which the person sets. - lib/menu-access.ts holds the rule: the role's sections, then the person's exceptions, narrowed to their work areas. - Action Center is always on. - Nobody takes a section off an admin's menu; only their own work areas narrow it. - A section is named by its route, so a new one shows by default. - lib/actions/menu-access.ts covers getMyMenu, the Settings data, the role table, per-person exceptions and menu managers (admin only). It also writes the person's own work areas. Hide only: pages still open from a link, roles and data access don't change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): leave a person's hidden sections off the left menu (menu access, part 2) The dashboard layout reads the viewer's menu once (getMyMenu, part 1) and hands the sections it leaves out to a MenuAccessProvider. Both menus filter by them through shouldShowDashboardNavItem: - the sidebar drops a group whose sections are all off the menu, title and all; - the mobile menu drops the active brand's Prompts link with the Prompts section. If the menu can't be read, the whole menu shows. Hide only: an address still opens its page. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): clear a person's menu access when they move organization A removed member keeps their profile and an invitation moves it to the next organization, so a menu manager of one organization arrived in another still able to change its menus, with their old exceptions. A trigger now clears menu_shown, menu_hidden and can_manage_menus on a new organization and can_manage_menus on a new role, unless the same update sets them; it fires after the guard, so the guard still checks what the person asked for. Also reloads PostgREST's schema at the end of 00374, validates setMenuManager's flag with Zod, and tests that the work-area check in the database lists exactly the app's work areas. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): choose which left-menu sections each role sees (menu access, part 3) A new Settings section, Menu access, for admins and the managers they let change menus. Others don't see it in Settings, and its address tells them who can. - A table of the menu's sections by its groups, with a column per role: - each box saves at once, and is put back with a toast if the save fails; - Admin is always Everything, and Action Center can't be turned off; - "Use a set…" fills a role from a work area's ready-made set, or Everything. - Fixed column shares keep the table inside Settings' column at 1024 px. - en.json carries the copy and the nine work areas' names and lines, so the Account and welcome-step parts can use them too. - MenuAccessProvider also carries whether the viewer can change menus. The plan dialog for a workspace whose plan has ended follows once #1599 lands. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): count everyone already here as asked about their work areas "What do you work on?" is for new sign-ups and people joining from an invite, once. Without this, every existing person would get the step at their next sign-in. They can still pick work areas in Settings › Account. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): read the menu with the layout's own profile read (menu access, part 2 review) The dashboard layout read the viewer's menu through getMyMenu, a second user check and profile read after its own: two or three requests in a row on every render. The menu columns now come with the profile the layout already reads. The role's row (none for admins) is read alongside the organization and the brands. menuOfProfile builds the menu from both, and getMyMenu uses the same. - A role row that can't be read is logged (console.error) and the menu shows whole, rather than the failure passing silently. - The sidebar no longer reads the tracked prompts' count while Prompts is off the menu. - Tests cover a group dropped with its title when all its sections are hidden, the whole menu without a menu to go by, the count not read, the mobile menu leaving hidden sections off (the brand's Prompts link with Prompts), and readRoleHidden. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): keep a save that went through when another fails, and let "Use a set…" fit (menu access, part 3 review) - A failed save on Menu access reads the role table again, instead of putting back the state from before it, which also undid a later save that had gone through. - No router.refresh after a save: setRoleMenu's revalidatePath already brings the menu up to date, so each click no longer renders twice. - The role columns get a little more of the table, and the select's chevron is smaller, so "Use a set…" isn't cut at 1024 px with the sidebar open. - Tests: picking a ready-made set saves it; a failed save next to a successful one keeps the successful one; Settings lists Menu access only for someone who can change menus. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): keep Everything inside the admins' column at 1024 px (menu access, part 3 review) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Gökhan Geyik <[email protected]>
…ions (menu access, part 4) (#1705) * feat(settings): store who sees which left-menu sections (menu access, part 1) Menu access, part 1 of 7: the data and the rule, with no UI yet. - 00374 adds organization_menu_roles, the sections a role (not admin) doesn't see. Members of the organization read it and the server writes it. - On profiles it adds menu_shown, menu_hidden and can_manage_menus, which only the server sets (00228's guard is extended), and work_areas and work_areas_asked_at, which the person sets. - lib/menu-access.ts holds the rule: the role's sections, then the person's exceptions, narrowed to their work areas. - Action Center is always on. - Nobody takes a section off an admin's menu; only their own work areas narrow it. - A section is named by its route, so a new one shows by default. - lib/actions/menu-access.ts covers getMyMenu, the Settings data, the role table, per-person exceptions and menu managers (admin only). It also writes the person's own work areas. Hide only: pages still open from a link, roles and data access don't change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): leave a person's hidden sections off the left menu (menu access, part 2) The dashboard layout reads the viewer's menu once (getMyMenu, part 1) and hands the sections it leaves out to a MenuAccessProvider. Both menus filter by them through shouldShowDashboardNavItem: - the sidebar drops a group whose sections are all off the menu, title and all; - the mobile menu drops the active brand's Prompts link with the Prompts section. If the menu can't be read, the whole menu shows. Hide only: an address still opens its page. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): clear a person's menu access when they move organization A removed member keeps their profile and an invitation moves it to the next organization, so a menu manager of one organization arrived in another still able to change its menus, with their old exceptions. A trigger now clears menu_shown, menu_hidden and can_manage_menus on a new organization and can_manage_menus on a new role, unless the same update sets them; it fires after the guard, so the guard still checks what the person asked for. Also reloads PostgREST's schema at the end of 00374, validates setMenuManager's flag with Zod, and tests that the work-area check in the database lists exactly the app's work areas. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): choose which left-menu sections each role sees (menu access, part 3) A new Settings section, Menu access, for admins and the managers they let change menus. Others don't see it in Settings, and its address tells them who can. - A table of the menu's sections by its groups, with a column per role: - each box saves at once, and is put back with a toast if the save fails; - Admin is always Everything, and Action Center can't be turned off; - "Use a set…" fills a role from a work area's ready-made set, or Everything. - Fixed column shares keep the table inside Settings' column at 1024 px. - en.json carries the copy and the nine work areas' names and lines, so the Account and welcome-step parts can use them too. - MenuAccessProvider also carries whether the viewer can change menus. The plan dialog for a workspace whose plan has ended follows once #1599 lands. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): let managers change menus and set a person's own sections (menu access, part 4) Two more cards on Settings › Menu access. Who can change menus: - lists the managers; - an admin switches one on (setMenuManager) to let them use this page; - a manager who changes menus sees the switches but can't flip them. People: every non-admin with their role, work areas, menu ("{role}'s menu", or "Custom: +Prompts, −Content") and how many sections it keeps. Customize opens their sections: - ticked as their role has them; - a change from the role marked "shown for them" or "hidden for them"; - Action Center always on; - each box saved at once (setMemberMenu); - "Use {role}'s menu" goes back to the role's. A failed save puts the switch or box back, with a toast. A row lays out on one line when the card is wide, and on two when it's narrow (1024 px). Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): count everyone already here as asked about their work areas "What do you work on?" is for new sign-ups and people joining from an invite, once. Without this, every existing person would get the step at their next sign-in. They can still pick work areas in Settings › Account. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): read the menu with the layout's own profile read (menu access, part 2 review) The dashboard layout read the viewer's menu through getMyMenu, a second user check and profile read after its own: two or three requests in a row on every render. The menu columns now come with the profile the layout already reads. The role's row (none for admins) is read alongside the organization and the brands. menuOfProfile builds the menu from both, and getMyMenu uses the same. - A role row that can't be read is logged (console.error) and the menu shows whole, rather than the failure passing silently. - The sidebar no longer reads the tracked prompts' count while Prompts is off the menu. - Tests cover a group dropped with its title when all its sections are hidden, the whole menu without a menu to go by, the count not read, the mobile menu leaving hidden sections off (the brand's Prompts link with Prompts), and readRoleHidden. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): keep a save that went through when another fails, and let "Use a set…" fit (menu access, part 3 review) - A failed save on Menu access reads the role table again, instead of putting back the state from before it, which also undid a later save that had gone through. - No router.refresh after a save: setRoleMenu's revalidatePath already brings the menu up to date, so each click no longer renders twice. - The role columns get a little more of the table, and the select's chevron is smaller, so "Use a set…" isn't cut at 1024 px with the sidebar open. - Tests: picking a ready-made set saves it; a failed save next to a successful one keeps the successful one; Settings lists Menu access only for someone who can change menus. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): read the people's menus again when a save fails (menu access, part 4 review) As with the role table: a failed save on Who can change menus or People reads the settings again (onFailed), instead of putting back the state from before it, which could undo a later save that had gone through. No router.refresh after a save: setMenuManager and setMemberMenu revalidate already. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): keep Everything inside the admins' column at 1024 px (menu access, part 3 review) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Gökhan Geyik <[email protected]>
…t (menu access, part 5) (#1706) * feat(settings): store who sees which left-menu sections (menu access, part 1) Menu access, part 1 of 7: the data and the rule, with no UI yet. - 00374 adds organization_menu_roles, the sections a role (not admin) doesn't see. Members of the organization read it and the server writes it. - On profiles it adds menu_shown, menu_hidden and can_manage_menus, which only the server sets (00228's guard is extended), and work_areas and work_areas_asked_at, which the person sets. - lib/menu-access.ts holds the rule: the role's sections, then the person's exceptions, narrowed to their work areas. - Action Center is always on. - Nobody takes a section off an admin's menu; only their own work areas narrow it. - A section is named by its route, so a new one shows by default. - lib/actions/menu-access.ts covers getMyMenu, the Settings data, the role table, per-person exceptions and menu managers (admin only). It also writes the person's own work areas. Hide only: pages still open from a link, roles and data access don't change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): leave a person's hidden sections off the left menu (menu access, part 2) The dashboard layout reads the viewer's menu once (getMyMenu, part 1) and hands the sections it leaves out to a MenuAccessProvider. Both menus filter by them through shouldShowDashboardNavItem: - the sidebar drops a group whose sections are all off the menu, title and all; - the mobile menu drops the active brand's Prompts link with the Prompts section. If the menu can't be read, the whole menu shows. Hide only: an address still opens its page. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): clear a person's menu access when they move organization A removed member keeps their profile and an invitation moves it to the next organization, so a menu manager of one organization arrived in another still able to change its menus, with their old exceptions. A trigger now clears menu_shown, menu_hidden and can_manage_menus on a new organization and can_manage_menus on a new role, unless the same update sets them; it fires after the guard, so the guard still checks what the person asked for. Also reloads PostgREST's schema at the end of 00374, validates setMenuManager's flag with Zod, and tests that the work-area check in the database lists exactly the app's work areas. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): choose which left-menu sections each role sees (menu access, part 3) A new Settings section, Menu access, for admins and the managers they let change menus. Others don't see it in Settings, and its address tells them who can. - A table of the menu's sections by its groups, with a column per role: - each box saves at once, and is put back with a toast if the save fails; - Admin is always Everything, and Action Center can't be turned off; - "Use a set…" fills a role from a work area's ready-made set, or Everything. - Fixed column shares keep the table inside Settings' column at 1024 px. - en.json carries the copy and the nine work areas' names and lines, so the Account and welcome-step parts can use them too. - MenuAccessProvider also carries whether the viewer can change menus. The plan dialog for a workspace whose plan has ended follows once #1599 lands. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): let managers change menus and set a person's own sections (menu access, part 4) Two more cards on Settings › Menu access. Who can change menus: - lists the managers; - an admin switches one on (setMenuManager) to let them use this page; - a manager who changes menus sees the switches but can't flip them. People: every non-admin with their role, work areas, menu ("{role}'s menu", or "Custom: +Prompts, −Content") and how many sections it keeps. Customize opens their sections: - ticked as their role has them; - a change from the role marked "shown for them" or "hidden for them"; - Action Center always on; - each box saved at once (setMemberMenu); - "Use {role}'s menu" goes back to the role's. A failed save puts the switch or box back, with a toast. A row lays out on one line when the card is wide, and on two when it's narrow (1024 px). Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): let people pick their work areas in Settings › Account (menu access, part 5) Settings › Account gets "Your work areas": the nine areas as chips plus Everything. - Picking one narrows the person's own left menu; admins can pick too, since nobody else narrows an admin's menu. - Each change is saved at once (setMyWorkAreas) and the menu refreshes; a failed save puts the chips back, with a toast. - "Your menu" lists the sections. One that's off says why: "Hidden by your admin" (role or exception) or "Not in your work areas". A note says how many the admin took off. - getMyMenu now also returns hiddenByAdmin. The sidebar says "N sections off your menu. Change" above Send feedback when something is off, with Change linking to Account. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): count everyone already here as asked about their work areas "What do you work on?" is for new sign-ups and people joining from an invite, once. Without this, every existing person would get the step at their next sign-in. They can still pick work areas in Settings › Account. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): read the menu with the layout's own profile read (menu access, part 2 review) The dashboard layout read the viewer's menu through getMyMenu, a second user check and profile read after its own: two or three requests in a row on every render. The menu columns now come with the profile the layout already reads. The role's row (none for admins) is read alongside the organization and the brands. menuOfProfile builds the menu from both, and getMyMenu uses the same. - A role row that can't be read is logged (console.error) and the menu shows whole, rather than the failure passing silently. - The sidebar no longer reads the tracked prompts' count while Prompts is off the menu. - Tests cover a group dropped with its title when all its sections are hidden, the whole menu without a menu to go by, the count not read, the mobile menu leaving hidden sections off (the brand's Prompts link with Prompts), and readRoleHidden. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): keep a save that went through when another fails, and let "Use a set…" fit (menu access, part 3 review) - A failed save on Menu access reads the role table again, instead of putting back the state from before it, which also undid a later save that had gone through. - No router.refresh after a save: setRoleMenu's revalidatePath already brings the menu up to date, so each click no longer renders twice. - The role columns get a little more of the table, and the select's chevron is smaller, so "Use a set…" isn't cut at 1024 px with the sidebar open. - Tests: picking a ready-made set saves it; a failed save next to a successful one keeps the successful one; Settings lists Menu access only for someone who can change menus. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): read the people's menus again when a save fails (menu access, part 4 review) As with the role table: a failed save on Who can change menus or People reads the settings again (onFailed), instead of putting back the state from before it, which could undo a later save that had gone through. No router.refresh after a save: setMenuManager and setMemberMenu revalidate already. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): read the work areas again when a save fails (menu access, part 5 review) As on Menu access: Settings › Account's work areas read the menu again when a save fails, instead of putting back the state from before it. No router.refresh after a save: setMyWorkAreas revalidates the layout already. The Settings list test mocks the Account card too. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): keep Everything inside the admins' column at 1024 px (menu access, part 3 review) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Gökhan Geyik <[email protected]>
…joining (menu access, part 6) (#1707) * feat(settings): store who sees which left-menu sections (menu access, part 1) Menu access, part 1 of 7: the data and the rule, with no UI yet. - 00374 adds organization_menu_roles, the sections a role (not admin) doesn't see. Members of the organization read it and the server writes it. - On profiles it adds menu_shown, menu_hidden and can_manage_menus, which only the server sets (00228's guard is extended), and work_areas and work_areas_asked_at, which the person sets. - lib/menu-access.ts holds the rule: the role's sections, then the person's exceptions, narrowed to their work areas. - Action Center is always on. - Nobody takes a section off an admin's menu; only their own work areas narrow it. - A section is named by its route, so a new one shows by default. - lib/actions/menu-access.ts covers getMyMenu, the Settings data, the role table, per-person exceptions and menu managers (admin only). It also writes the person's own work areas. Hide only: pages still open from a link, roles and data access don't change. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): leave a person's hidden sections off the left menu (menu access, part 2) The dashboard layout reads the viewer's menu once (getMyMenu, part 1) and hands the sections it leaves out to a MenuAccessProvider. Both menus filter by them through shouldShowDashboardNavItem: - the sidebar drops a group whose sections are all off the menu, title and all; - the mobile menu drops the active brand's Prompts link with the Prompts section. If the menu can't be read, the whole menu shows. Hide only: an address still opens its page. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): clear a person's menu access when they move organization A removed member keeps their profile and an invitation moves it to the next organization, so a menu manager of one organization arrived in another still able to change its menus, with their old exceptions. A trigger now clears menu_shown, menu_hidden and can_manage_menus on a new organization and can_manage_menus on a new role, unless the same update sets them; it fires after the guard, so the guard still checks what the person asked for. Also reloads PostgREST's schema at the end of 00374, validates setMenuManager's flag with Zod, and tests that the work-area check in the database lists exactly the app's work areas. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): choose which left-menu sections each role sees (menu access, part 3) A new Settings section, Menu access, for admins and the managers they let change menus. Others don't see it in Settings, and its address tells them who can. - A table of the menu's sections by its groups, with a column per role: - each box saves at once, and is put back with a toast if the save fails; - Admin is always Everything, and Action Center can't be turned off; - "Use a set…" fills a role from a work area's ready-made set, or Everything. - Fixed column shares keep the table inside Settings' column at 1024 px. - en.json carries the copy and the nine work areas' names and lines, so the Account and welcome-step parts can use them too. - MenuAccessProvider also carries whether the viewer can change menus. The plan dialog for a workspace whose plan has ended follows once #1599 lands. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): let managers change menus and set a person's own sections (menu access, part 4) Two more cards on Settings › Menu access. Who can change menus: - lists the managers; - an admin switches one on (setMenuManager) to let them use this page; - a manager who changes menus sees the switches but can't flip them. People: every non-admin with their role, work areas, menu ("{role}'s menu", or "Custom: +Prompts, −Content") and how many sections it keeps. Customize opens their sections: - ticked as their role has them; - a change from the role marked "shown for them" or "hidden for them"; - Action Center always on; - each box saved at once (setMemberMenu); - "Use {role}'s menu" goes back to the role's. A failed save puts the switch or box back, with a toast. A row lays out on one line when the card is wide, and on two when it's narrow (1024 px). Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(settings): let people pick their work areas in Settings › Account (menu access, part 5) Settings › Account gets "Your work areas": the nine areas as chips plus Everything. - Picking one narrows the person's own left menu; admins can pick too, since nobody else narrows an admin's menu. - Each change is saved at once (setMyWorkAreas) and the menu refreshes; a failed save puts the chips back, with a toast. - "Your menu" lists the sections. One that's off says why: "Hidden by your admin" (role or exception) or "Not in your work areas". A note says how many the admin took off. - getMyMenu now also returns hiddenByAdmin. The sidebar says "N sections off your menu. Change" above Send feedback when something is off, with Change linking to Account. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): count everyone already here as asked about their work areas "What do you work on?" is for new sign-ups and people joining from an invite, once. Without this, every existing person would get the step at their next sign-in. They can still pick work areas in Settings › Account. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(onboarding): ask what people work on, once (menu access, part 6) "What do you work on?" is a step of its own (components/onboarding/ work-areas-step.tsx). It shows: - the nine work areas as cards, with each area's line and sections; - the menu they give as they're picked, with the count the admin took off. Continue or "Skip: show me everything" saves (setMyWorkAreas), so it's asked once; it changes later in Settings › Account. - Cloud sign-up: it comes after the competitors and before the plan. WORK_AREAS_STEP and PLAN_STEP name the two steps, so the plan step and anything added to it move together. Resuming a finished sign-up opens whichever of the two is still owed. - Anyone not asked in onboarding (an invited person, or a self-hosted admin with no plan step) is sent by the dashboard layout, once, to /dashboard/welcome. It sits in the onboarding group, so the layout can't send it to itself. - An invited person reads "Welcome to {brand} Workspace, {first name}" and "You've joined as {role}." (the organization's name when it has several brands). - An admin is asked "What do you work on?". - lib/menu-access.ts gets hiddenWithWorkAreas, which the Account card now uses too. People already here were counted as asked by 00374. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): read the menu with the layout's own profile read (menu access, part 2 review) The dashboard layout read the viewer's menu through getMyMenu, a second user check and profile read after its own: two or three requests in a row on every render. The menu columns now come with the profile the layout already reads. The role's row (none for admins) is read alongside the organization and the brands. menuOfProfile builds the menu from both, and getMyMenu uses the same. - A role row that can't be read is logged (console.error) and the menu shows whole, rather than the failure passing silently. - The sidebar no longer reads the tracked prompts' count while Prompts is off the menu. - Tests cover a group dropped with its title when all its sections are hidden, the whole menu without a menu to go by, the count not read, the mobile menu leaving hidden sections off (the brand's Prompts link with Prompts), and readRoleHidden. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): keep a save that went through when another fails, and let "Use a set…" fit (menu access, part 3 review) - A failed save on Menu access reads the role table again, instead of putting back the state from before it, which also undid a later save that had gone through. - No router.refresh after a save: setRoleMenu's revalidatePath already brings the menu up to date, so each click no longer renders twice. - The role columns get a little more of the table, and the select's chevron is smaller, so "Use a set…" isn't cut at 1024 px with the sidebar open. - Tests: picking a ready-made set saves it; a failed save next to a successful one keeps the successful one; Settings lists Menu access only for someone who can change menus. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): read the people's menus again when a save fails (menu access, part 4 review) As with the role table: a failed save on Who can change menus or People reads the settings again (onFailed), instead of putting back the state from before it, which could undo a later save that had gone through. No router.refresh after a save: setMenuManager and setMemberMenu revalidate already. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): read the work areas again when a save fails (menu access, part 5 review) As on Menu access: Settings › Account's work areas read the menu again when a save fails, instead of putting back the state from before it. No router.refresh after a save: setMyWorkAreas revalidates the layout already. The Settings list test mocks the Account card too. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(settings): keep Everything inside the admins' column at 1024 px (menu access, part 3 review) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Gökhan Geyik <[email protected]>
* feat(settings): store who sees which left-menu sections (menu access, part 1)
Menu access, part 1 of 7: the data and the rule, with no UI yet.
- 00374 adds organization_menu_roles, the sections a role (not admin)
doesn't see. Members of the organization read it and the server
writes it.
- On profiles it adds menu_shown, menu_hidden and can_manage_menus,
which only the server sets (00228's guard is extended), and
work_areas and work_areas_asked_at, which the person sets.
- lib/menu-access.ts holds the rule: the role's sections, then the
person's exceptions, narrowed to their work areas.
- Action Center is always on.
- Nobody takes a section off an admin's menu; only their own work
areas narrow it.
- A section is named by its route, so a new one shows by default.
- lib/actions/menu-access.ts covers getMyMenu, the Settings data, the
role table, per-person exceptions and menu managers (admin only).
It also writes the person's own work areas.
Hide only: pages still open from a link, roles and data access don't
change.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(settings): leave a person's hidden sections off the left menu (menu access, part 2)
The dashboard layout reads the viewer's menu once (getMyMenu, part 1) and
hands the sections it leaves out to a MenuAccessProvider. Both menus filter
by them through shouldShowDashboardNavItem:
- the sidebar drops a group whose sections are all off the menu, title and
all;
- the mobile menu drops the active brand's Prompts link with the Prompts
section.
If the menu can't be read, the whole menu shows. Hide only: an address
still opens its page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(settings): clear a person's menu access when they move organization
A removed member keeps their profile and an invitation moves it to the
next organization, so a menu manager of one organization arrived in
another still able to change its menus, with their old exceptions. A
trigger now clears menu_shown, menu_hidden and can_manage_menus on a new
organization and can_manage_menus on a new role, unless the same update
sets them; it fires after the guard, so the guard still checks what the
person asked for.
Also reloads PostgREST's schema at the end of 00374, validates
setMenuManager's flag with Zod, and tests that the work-area check in
the database lists exactly the app's work areas.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(settings): choose which left-menu sections each role sees (menu access, part 3)
A new Settings section, Menu access, for admins and the managers they let
change menus. Others don't see it in Settings, and its address tells them
who can.
- A table of the menu's sections by its groups, with a column per role:
- each box saves at once, and is put back with a toast if the save
fails;
- Admin is always Everything, and Action Center can't be turned off;
- "Use a set…" fills a role from a work area's ready-made set, or
Everything.
- Fixed column shares keep the table inside Settings' column at 1024 px.
- en.json carries the copy and the nine work areas' names and lines, so
the Account and welcome-step parts can use them too.
- MenuAccessProvider also carries whether the viewer can change menus.
The plan dialog for a workspace whose plan has ended follows once #1599
lands.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(settings): let managers change menus and set a person's own sections (menu access, part 4)
Two more cards on Settings › Menu access.
Who can change menus:
- lists the managers;
- an admin switches one on (setMenuManager) to let them use this page;
- a manager who changes menus sees the switches but can't flip them.
People: every non-admin with their role, work areas, menu ("{role}'s
menu", or "Custom: +Prompts, −Content") and how many sections it keeps.
Customize opens their sections:
- ticked as their role has them;
- a change from the role marked "shown for them" or "hidden for them";
- Action Center always on;
- each box saved at once (setMemberMenu);
- "Use {role}'s menu" goes back to the role's.
A failed save puts the switch or box back, with a toast. A row lays out on
one line when the card is wide, and on two when it's narrow (1024 px).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(settings): let people pick their work areas in Settings › Account (menu access, part 5)
Settings › Account gets "Your work areas": the nine areas as chips plus
Everything.
- Picking one narrows the person's own left menu; admins can pick too,
since nobody else narrows an admin's menu.
- Each change is saved at once (setMyWorkAreas) and the menu refreshes; a
failed save puts the chips back, with a toast.
- "Your menu" lists the sections. One that's off says why: "Hidden by your
admin" (role or exception) or "Not in your work areas". A note says how
many the admin took off.
- getMyMenu now also returns hiddenByAdmin.
The sidebar says "N sections off your menu. Change" above Send feedback
when something is off, with Change linking to Account.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(settings): count everyone already here as asked about their work areas
"What do you work on?" is for new sign-ups and people joining from an
invite, once. Without this, every existing person would get the step at
their next sign-in. They can still pick work areas in Settings › Account.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(onboarding): ask what people work on, once (menu access, part 6)
"What do you work on?" is a step of its own (components/onboarding/
work-areas-step.tsx). It shows:
- the nine work areas as cards, with each area's line and sections;
- the menu they give as they're picked, with the count the admin took off.
Continue or "Skip: show me everything" saves (setMyWorkAreas), so it's
asked once; it changes later in Settings › Account.
- Cloud sign-up: it comes after the competitors and before the plan.
WORK_AREAS_STEP and PLAN_STEP name the two steps, so the plan step and
anything added to it move together. Resuming a finished sign-up opens
whichever of the two is still owed.
- Anyone not asked in onboarding (an invited person, or a self-hosted
admin with no plan step) is sent by the dashboard layout, once, to
/dashboard/welcome. It sits in the onboarding group, so the layout can't
send it to itself.
- An invited person reads "Welcome to {brand} Workspace, {first name}"
and "You've joined as {role}." (the organization's name when it has
several brands).
- An admin is asked "What do you work on?".
- lib/menu-access.ts gets hiddenWithWorkAreas, which the Account card now
uses too.
People already here were counted as asked by 00374.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(settings): read the menu with the layout's own profile read (menu access, part 2 review)
The dashboard layout read the viewer's menu through getMyMenu, a second
user check and profile read after its own: two or three requests in a row
on every render. The menu columns now come with the profile the layout
already reads. The role's row (none for admins) is read alongside the
organization and the brands. menuOfProfile builds the menu from both,
and getMyMenu uses the same.
- A role row that can't be read is logged (console.error) and the menu
shows whole, rather than the failure passing silently.
- The sidebar no longer reads the tracked prompts' count while Prompts is
off the menu.
- Tests cover a group dropped with its title when all its sections are
hidden, the whole menu without a menu to go by, the count not read, the
mobile menu leaving hidden sections off (the brand's Prompts link with
Prompts), and readRoleHidden.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(settings): keep a save that went through when another fails, and let "Use a set…" fit (menu access, part 3 review)
- A failed save on Menu access reads the role table again, instead of
putting back the state from before it, which also undid a later save
that had gone through.
- No router.refresh after a save: setRoleMenu's revalidatePath already
brings the menu up to date, so each click no longer renders twice.
- The role columns get a little more of the table, and the select's
chevron is smaller, so "Use a set…" isn't cut at 1024 px with the
sidebar open.
- Tests: picking a ready-made set saves it; a failed save next to a
successful one keeps the successful one; Settings lists Menu access
only for someone who can change menus.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(settings): read the people's menus again when a save fails (menu access, part 4 review)
As with the role table: a failed save on Who can change menus or People
reads the settings again (onFailed), instead of putting back the state
from before it, which could undo a later save that had gone through. No
router.refresh after a save: setMenuManager and setMemberMenu revalidate
already.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(settings): read the work areas again when a save fails (menu access, part 5 review)
As on Menu access: Settings › Account's work areas read the menu again when
a save fails, instead of putting back the state from before it. No
router.refresh after a save: setMyWorkAreas revalidates the layout
already. The Settings list test mocks the Account card too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(settings): keep Everything inside the admins' column at 1024 px (menu access, part 3 review)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs(settings): explain menu access (menu access, part 7)
A new guide, Menu access, covers:
- who changes menus, and letting a manager do it;
- choosing what each role sees, with "Use a set…";
- changing one person's menu (People → Customize);
- the nine work areas and their sections;
- when "What do you work on?" is asked, and changing the answer in
Settings → Account;
- how a menu is worked out, and what "hide only" means;
- a self-host note on migration 00374.
Add your first brand now lists the cloud's step 6 (What do you work on?)
before the plan step, which becomes step 7.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs(settings): write the menu access examples without braces, which MDX reads as code
---------
Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Gökhan Geyik <[email protected]>
# Conflicts: # web/src/app/[locale]/(dashboard)/layout.tsx # web/src/lib/mcp/data.ts
|
Merged main forward (8356ba3): resolved (dashboard)/layout.tsx (UpgradeDialogProvider wraps main's MenuAccessProvider, ReadOnlyBanner kept) and lib/mcp/data.ts imports (kept both). Typecheck and layout/MCP tests pass. |
gkhngyk
left a comment
There was a problem hiding this comment.
Looks good, with follow-ups. Your merge of main resolved the two conflicts. At merge time the whole read-only stack on today's main passes the web and server suites, typecheck, lint and format.
Since my last review (22fdd46), the branch merged main at 3f6a4d4 (9865d8a) and added 9616d2e. The PR's own change is the same apart from 9616d2e: catalog-client.test.ts now leaves 'subscription' out of its "every code has a message" check, since that code opens the plan dialog instead of saying something. That's right.
The one thing I asked to wait for, #1589's API in production, is done, so this can go out.
What I checked:
- Merge state on main (8356ba3). It conflicts in two files, both from main's newer PRs, not this PR's own logic:
web/src/app/[locale]/(dashboard)/layout.tsx(menu access, #1703/#1704/#1707). Keep main'sroleHiddenread and adderror: orgErrorto the same destructure:const [{ data: org, error: orgError }, brands, roleHidden] = …. Nest the providers:MenuAccessProvideroutside,UpgradeDialogProviderinside it (or the other way round, both work), and keep<ReadOnlyBanner />where this PR put it. Keep main's "What do you work on?" redirect after the subscription check.web/src/lib/mcp/data.ts(#1671). Keep both imports:usagePlanFromOrgRowfrom main andassertSubscriptionActivefrom this PR.
- The new tools on main. Since 3f6a4d4, main changed
list_action_historyandget_prompt_usage's output and added no tool. Both arelist_/get_and only read, sogateWriteToolsstill leaves the right ones open. - Paying and self-hosted workspaces, Checkout, the MCP gate and the agent routes: unchanged since my last review, and still as I described there.
- Tests on this head. The PR's 25 test files: 24 pass. The editor page's test timed out under load in that run and passes on its own (a known slow file).
tsc --noEmit: no errors.
Follow-ups (unchanged from last time, none blocking):
- Writes that skip the API. #1613 now covers the server actions and Next routes. Direct table writes with a person's own session (RLS) are still open; that's #1613's note for later.
- An org read that fails opens the dashboard unlocked (
isCloud() && !orgError). Fine with #1589 live; worth a comment that it leans on the API. - The MCP message names only "its free trial ended or it was canceled", but
past_dueis refused too. #1613 moved the text tosubscription-guard.ts; if it changes, update the quote indocs/guides/mcp-server.mdx(#1631) in the same change. - Re-subscribing goes through
/api/stripe/success, which runs tracking and volumes for the first brand as for a new account. Probably wanted; worth confirming.
Merge order: #1599 first, then #1604, #1606 → #1609 → #1612 → #1614, and #1613 (each after its parent), then #1631 last.
Summary
Read-only once the plan has ended: the web. On the cloud, a workspace whose 14-day trial ended, or whose plan was cancelled (during the trial or after a payment), can now sign in and look around. Before, it got a full-screen "subscription expired" notice that only signed out. Ansvisor wants these members back in, so a campaign can bring them to the product.
Nothing may change or cost anything until the workspace buys a plan. Every action opens one "Choose a plan to keep going" dialog; the X closes it and browsing goes on.
The API's part is #1589 (402
subscription_inactiveon writes). This PR stands on its own from main. Self-hosted is unchanged.Who's affected:
stripe_subscription_id) still goes to the plan step. A trial in progress works as today.cancel_at_period_end, so a paying customer, or one in the trial, keeps everything until that period ends.past_due,unpaid) is read-only too, with Update payment method (Stripe's portal).invoice.payment_succeededunlocks it.The layout and the dialog:
(dashboard)/layout.tsxlets these workspaces in.(onboarding)/layout.tsxsends a finished-onboarding, ended workspace to/dashboard.ReadOnlyBanner): "Your workspace is read-only. You can look around; adding, running and AI need a plan." with See plans. It's hidden on Billing, and on a failed payment it says so.UpgradeDialogProvideranduseUpgradeGate()(providers/upgrade-gate.ts) give{ guard, isLocked, openUpgrade }.guard(fn, { action })runsfnon an active plan, and otherwise opens the dialog with the action as a small label ("Adding prompts needs a plan").guard()in the next PRs (C1–C3). This PR is the base.subscription_inactivefrom the API opens the dialog, not a toast. This goes throughuse-failure-toast,api-failure.ts's newsubscriptionclass, and the Webflow, catalog, publish and Send to CMS clients.Billing:
/api/stripe/checkout:admin_only);subscription_existswhile a live subscription exists, so there's never a second one;planId,interval,returnTo: 'billing').router.refresh()).MCP and chat:
lib/mcp/subscription-gate.ts:list_andget_tools stay open. Every other tool answerssubscription_inactive, by default for any tool added later;server.tool(...)now throws, so nothing can skip the gate.mcp-auth.ts: REST writes answer 402.POST /api/agent/chatandPOST /api/agent/conversationsanswer 402. A refused message goes back to the input.runSiteAuditFor,generateBriefForandcreateImproveActionForcheck too (assertSubscriptionActive), so no caller skips it. Their REST routes answer 402 (failedCallResponse).The old
subscription-expired-notice.tsxis removed. Strings are inen.json(readOnly.*,apiFailure.subscription).Related issue
None. Product decision (Ansvisor, 2026-10-27): an ended trial or plan browses read-only until it buys.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
cd web && yarn vitest run src/components/providers src/components/billing "src/app/[locale]/(dashboard)/layout.test.tsx" "src/app/[locale]/(onboarding)/layout.test.tsx" src/app/api/stripe src/app/api/agent src/lib/mcp src/lib/mcp-auth.test.ts src/lib/api-failure.test.ts src/config/plans.test.tsNEXT_PUBLIC_IS_CLOUD=true, with feat(server): keep a workspace read-only once its plan has ended #1589's API andIS_CLOUD=true), give an organizationsubscription_status = canceledand astripe_subscription_id. Then:Checked in the browser at 1024 px, light and dark, against the dev DB, with #1589's API and this web, both in cloud mode. The demo organization was set to a cancelled Growth plan for the check, then put back.
Two things the check found, both in the next PR (C1, the Prompts area's buttons):
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also run in
web/:yarn format,yarn lint(0 errors),yarn typecheck;yarn test(4,214 tests);yarn build.The pre-push review's findings are folded in:
isSubscriptionActivekept as on main);For you, @gkhngyk:
org.planwhile the API gives an ended org Starter's limits. The only difference isshopping_analytics, whose reads get 403 while browsing.skills/*/SKILL.mddocs should say that write tools answersubscription_inactive. That's a separate docs PR.🤖 Generated with Claude Code