Repository navigation
docs(demo): explain the demo brand to users and contributors (demo brand, part 7) - #1740
Merged
Merged
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]>
…r Annual and a promo code
The "Choose a plan to keep going" dialog for an ended plan now carries
the plans, as the approved design has them.
- Starter and Growth (Popular) have "Choose {plan}"; Custom has "Starting
at $499/mo" and "Contact us". Each lists the Billing cards' features,
through a shared usePlanFeatures.
- Monthly or Annual ("Save 20%"): an annual price shows its struck 12×
price and what it is a month.
- A promo code is checked by the API (POST /api/stripe/promo-code, admins
only), through the same Stripe lookup ansvisor#1300 uses (findPromotionCode,
takesPromoCode: monthly plans only).
- A valid code shows its chip, the first month's price on each card and
in the button ("Choose Growth · $124.50 today").
- A bad one says so; on Annual a note offers Switch to Monthly.
- Choose opens Stripe Checkout for that plan and period, with the code
applied as a discount. The checkout route checks the code again and
refuses it on an annual plan.
- Members see "Ask your admin to choose a plan", with no code field.
- The footer reads "Prices in USD." with a link to the pricing page.
- A failed payment keeps its "Update payment method" dialog.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…g does after ansvisor#1598 Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the plan has ended
Read-only, part C1. On an ended plan, every action in Prompts, Prompt
Suggestions, Topics, Query Fan-out, Brand Visibility and Competitors
opens the "Choose a plan" dialog with the action named, and runs
nothing. On an active plan they run as before. Buttons aren't disabled.
- Tracked Prompts: add, import, edit, analyze and refresh volumes, the
bulk bar, work status and the row menu.
- Prompt and topic suggestions: generate, add, accept, dismiss.
- Manage prompts and topics: add, generate, locations, analyze, edit,
delete.
- Query Fan-out's Track; Brand Visibility's Run All, Test Single Prompt,
Opportunities' Track and Send, and pinning a competitor.
- Competitors: suggest (its dialog calls AI on opening), add, delete.
- The Positions panel: Improve's Generate and Regenerate, Send Actions,
and Create or Optimize content.
- The labels live in readOnly.actions.* ("Adding prompts needs a plan").
- volumes.ts tells the API's 402 subscription_inactive from a feature
the plan lacks, so a refused analysis opens the dialog instead of "not
part of your current plan".
- While locked, Tracked Prompts doesn't warn that volume data is
unavailable, and Query Fan-out doesn't send its intent classification.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…keep the editor read-only, while the plan has ended
Read-only, part C2. On an ended plan, every action that writes or costs
in Content Opportunities, the opportunity panel, Content Plan, Library,
New content and the Content Editor opens the "Choose a plan" dialog,
naming the action, and runs nothing.
- Opportunities: New, the bulk bar (send, done, dismiss and delete open
the dialog instead of their confirm), the row menu, the webhook
settings' Test and Save, and the panel's sends, brief, Reviewed,
Restore and Dismiss.
- Plan: New content, Start, Assign, Priority, Hide and Show. A ?start=
link starts nothing while locked.
- Library: New content (and ?new=1), status changes, archive, delete,
and single and bulk Send to CMS.
- The editor:
- Run Agent, Rewrite, Fix rules, hand-off;
- accepting or rejecting suggestions;
- Mark ready, Ready back to review, Mark published, Send to CMS,
History Restore;
- page and site type, author and reviewer;
- Quality's confirms, sources and images, and Add line or Remove;
- renaming, dropping files, the toolbar;
- the Brief's run, rewrite and edit; the Sources and Rules changes;
Your input.
- The editor itself is read-only while locked (editable: false, the
HTML view readOnly), and autosave is off (useDraftAutosave { off }):
nothing is saved, and leaving doesn't warn.
- Reading, filters, exports, Copy HTML and Stop stay open.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d from every way to add a brand, while the plan has ended Site Audit, Action Center, Mentions, Citations, AI Referral Traffic, Shopping, Reports, Chat, brand settings and Settings now guard their actions with useUpgradeGate, as Prompts (ansvisor#1606) and Content (ansvisor#1609) do. Every way to add a brand (sidebar, /dashboard/brands, brand guard, /dashboard/brands/new) opens the dialog. Disconnects, key revokes and API key creation stay open. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…has ended, on the server Server actions and Next routes that write to Supabase without going through the API now call assertWritable() first: on the cloud, an organization without an active plan gets SubscriptionInactiveError (routes: 402 subscription_inactive), so the read-only rule holds even if a guarded button is bypassed. Setup's writes stay open to an organization that never subscribed, as the API's onboarding routes do. Profile, invitations accepted, revokes, removals, API keys and billing stay open. A static test pins every writing action to the check or to the open list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ng stores open while read-only, and stop the site trust card's automatic re-read From the pre-push review: ending an access stays open, as disconnects do; a partial site trust result isn't re-read while the plan has ended, since that read scrapes. Adds tests for the audit page's Run audit and the integrations' property mapping, resets shared mocks between tests, closes the mobile menu before the dialog, and words the KPI preview for a read-only workspace. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…it too, while read-only At the limit, /dashboard/brands' Add Brand links to Billing; a read-only workspace now gets the dialog there as on every other way to add a brand. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ansvisor's decision (2026-10-27): deleting a brand only removes what the person gave us, so it stays open while the plan has ended. The API opens DELETE /brands/:id in ansvisor#1611. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d the plan in one query, and pin the write check's place From the pre-push review: markBrandAsEcommerce no longer goes through the strictly guarded setBrandShoppingMode (a shared applyShoppingMode does the writes), so a setup detected as e-commerce turns Shopping on again. assertWritable reads the profile and its organization in one query. The coverage test now requires the check as each writer's first await, sees writers kept in variables and signed upload URLs, refuses a setup-open function that reaches a strictly guarded one, and keeps brand deletion open (Ansvisor, 2026-10-27). main's saveDraftShoppingPath is guarded; catalog-client's every-code test leaves out 'subscription', which opens the plan dialog instead of a message. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… plan has ended, and keep the buttons opening the plan dialog With ansvisor#1611, an ended workspace's quota reads come back as `noPlan` with 0 limits. isNoPlan(quota, isLocked) keeps those from reading as used up: Site Audit, Prompts, the content usage card, Improve and the opportunity panel say "No active plan" instead of a red 0/0 or "limit reached", and their buttons stay clickable so the guard opens the dialog. The AI bot report shows the workspace's own data instead of the Starter upsell. Setup's suggestions name the onboarding daily limit (429) on their own. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…upsell and one lock rule while the plan has ended From the pre-push review: the Prompts row menu still looks up an open content suggestion with no plan; an ended Starter workspace keeps the bot report's upsell (its old plan has no report), read from the plan the web already knows; auditBlock, bulkSuggestBlock and the bot states take isLocked as the pages do; the audit settings and the content usage tooltip don't speak of a plan that renews; setup's prompt step keeps its own "add your own" line. Improve's unreachable no-plan branch is gone. Tests for the onboarding limit and the quota meter. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
…y-plan-dialog Co-Authored-By: Claude Opus 5.5 <[email protected]> # Conflicts: # web/src/components/settings/plan-switcher.tsx
…y-guard-prompts Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-guard-content Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-guard-rest Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nd main's other new actions while the plan has ended main's new writes, with C3's guard pattern and labels: - Merchant Center (ansvisor#1583): picking and adding an account open the plan dialog ("Connecting a store needs a plan"); the server's 'subscription' refusal on Add opens it too, instead of looking up a missing settings.catalog.stores.errors.subscription message. - Category pages (ansvisor#1587): Change, Save, No page and Use the match are guarded; the catalog client reads the server's 402 subscription_inactive as 'subscription', which opens the dialog instead of the generic failure. - Brief › Shopping path (ansvisor#1591): Pick from the catalog, Pick again, Add product, Lock, Swap and Remove are guarded. - Action Center Check now (AC-010, ansvisor#1565) is guarded. New labels: changeCategoryPages, changeShoppingPath, checkTasks. Insert › Products (ansvisor#1607) already goes through the toolbar's guard and the read-only editor shows no insert menu; a test now says so. The Shopping rules (ansvisor#1610) change through the rules hook, already guarded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-plan-display Co-Authored-By: Claude Opus 5.5 <[email protected]>
…g it during render React's refs rule refuses passing add, which reads addingRef, to guard while rendering. add now opens the plan dialog itself on a read-only workspace. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-plan-display Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y-direct-writes Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # web/src/app/[locale]/(dashboard)/dashboard/brands/[id]/prompts/page.test.tsx
…page ⌘ or Ctrl with ⇧O (new chat), K (search), J (side panel) or \ (menu) reach the preview while the app around it has the focus: the page hands them to the frame, which answers them as it does inside. The frame takes the focus when it opens, and on a Mac the preview shows ⌘ for Ctrl. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This was referenced Oct 29, 2026
…core # Conflicts: # server/src/lib/action-center/execution/run.js # server/src/lib/action-center/execution/run.test.js # supabase/schema.sql
…n's new tables sweepCompetitorTimeline (learning C3, on main) chose brands by their organization's plan only, so a demo brand's sample answers would have had their cited pages read every night. It now leaves demo brands out, as the other sweeps do. The demo coverage list names the brand tables main added: cited_page_features, competitor_page_events and competitor_timeline_scans (pending a demo follow-up) and chat_conversations (with Chat). Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # supabase/schema.sql
Chat's precedence (ansvisor#1776) left readBrandIsDemo false until the demo chain added brands.is_demo, with a type check that stops compiling once the column exists. It now reads the column, as the server's demo guard does, so a tool that changes or spends on the demo brand is refused with demo_brand; a brand that isn't found isn't one, and a failed read throws. Co-Authored-By: Claude Opus 5.5 <[email protected]>
POST /brands/:id/detect-site-type (ansvisor#1761, on main) reads the brand's home page and may ask AI for its kind. The demo guard's coverage test fails on a write route in neither list, so it is now guarded by the brand in its path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
chat_user_prefs (00400) and chat_auto_choices (00401) are a person's own rows, not a brand's: the write guard's coverage test fails on a writable table in no list, so both are named as no brand's rows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # web/src/lib/actions/brand.ts # web/src/lib/actions/prompt.test.ts # web/src/lib/actions/prompt.ts # web/src/lib/subscription-guard.ts
# Conflicts: # web/src/lib/mcp/data.ts
approve_task_review, dismiss_task_review (ansvisor#1713) and mark_content_draft_published (ansvisor#1715) write a brand's data, and the demo gate's test fails on a write tool WRITE_TOOL_BRANDS doesn't name. A task review finds its brand through its action; a draft through its own row. The test's API key now carries the role main's McpAuthContext requires. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
gkhngyk
approved these changes
Oct 29, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good, with follow-ups: the guide matches what the stack does. No changes here. take-1740 (678af934) is this head with take-1739 merged in, so the docs part carries the earlier fixes; the docs themselves are unchanged. It merges with main with no conflicts in the docs files; the code conflicts are the earlier parts'.
What I checked:
docs/guides/demo-brand.mdxagainst the code. Each of these matches:- who sees the demo: a new workspace without a card, a workspace whose plan ended, and everyone once it exists;
- the band, Chat's preview, and the integrations shown connected (
DEMO_INTEGRATIONS: Search Console, Analytics, Webflow; WordPress and Framer not connected); - the two ways to start and their rules: a card either way, SAVE50 on monthly Buy now, the trial only before a first subscription;
- hidden, never deleted;
- rebuilt on a version change or after 3 days, cleared after 14 idle days.
- Navigation.
docs/mint.jsonlists the guide under Platform Guides, and the FAQ entry links to it. - CONTRIBUTING. It says to cover a new brand table in
server/src/lib/demo/coverage.jsand to bumpDEMO_VERSION.
Follow-ups:
- CONTRIBUTING names one of the three checks a new change can fail. Two more catch a contributor:
- a new write route under
/apigoes inDEMO_GUARDEDorDEMO_OPEN(server/src/middleware/demo-brand.js;demo-brand.test.jsfails until it does); - a new table people can write attaches
refuse_demo_brand_writes()in its migration (write-guard.test.js).
A new MCP write tool or REST mirror also needsWRITE_TOOL_BRANDS/demoBrandRefusal(web/src/lib/mcp/demo-gate.ts).
- a new write route under
- "Soon (next week)" will go stale. Say "Coming soon", or date it.
- The Self-hosting paragraph names 00380 only. 00381 runs on every install too, and only adds the write guard.
4 of 5 tasks
Merged
5 tasks done
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.
Summary
Demo brand, part 7 of 7 (docs). Explains the demo brand to users and to contributors.
docs/guides/demo-brand.mdx(new, inmint.json): who sees it, what it shows, and what it can't do..exampledomains. The band, Chat as Soon (next week), and which integrations show connected with sample data, coming soon, or as on any brand (WordPress, Framer).docs/faq.mdx: "Can I try Ansvisor without a card?"CONTRIBUTING.md: a migration that adds a table with abrand_idsays what the demo shows for it (a demo module, orSKIPPEDwith the reason), orcoverage.test.jsfails. A change to the demo's data shape bumpsDEMO_VERSION.Stack (merge in this order): #1734 core → #1735 workflows → #1736 site → #1737 guard → #1738 web → #1739 MCP → this.
Deploy: apply 00380 and 00381, deploy the server, then the web. The web's onboarding and demo band call
POST /api/demo, and its dialog reads 402demo_brand, so the server goes first.Related issue
None (demo brand).
Stacked on #1739 (demo brand, part 6: MCP).
Type of change
docs— Documentation onlyHow to test
docs/guides/demo-brand.mdxrenders in Mintlify (mint devindocs/) under Guides, and the FAQ links to it.Checklist
_before-publish.test.tsxtimed out under load and passes alone (37 tests);bash supabase/build-schema.sh:schema.sqlis current🤖 Generated with Claude Code