Skip to content

feat(settings): link the billing plans to every feature on the pricing page - #1311

Merged
gkhngyk merged 11 commits into
ansvisor:mainfrom
cihan-gyk:feature/billing-pricing-link
Oct 22, 2026
Merged

gkhngyk merged 11 commits into
ansvisor:mainfrom
cihan-gyk:feature/billing-pricing-link

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Billing links the plan cards to the full feature list on www.ansvisor.com/pricing (product owner's request).

The plan cards only list each plan's highlights, so most of what a plan includes isn't visible in the app. A quiet link under the cards, "See everything each plan includes ↗", opens the pricing page in a new tab.

Stacked on #1300 (feature/billing-annual-plans, 67c3d18). This PR's own change is 81cbfdc. Web only; no migration, no new dependency.

Why this form: the aim is to show more of the product without drawing people away from buying.

  • It is a muted text link, not a button, and it comes after the cards. It doesn't compete with Buy now / Upgrade.
  • It opens in a new tab (rel="noopener noreferrer"), so the Billing page stays open to come back and buy.
  • Every role sees it, managers and analysts included (they can't buy, but can read).

Code

  • PRICING_URL = 'https://www.ansvisor.com/pricing' in config/plans.ts, next to CONTACT_SALES_URL.
  • plan-switcher.tsx: the link between the plan cards and the custom-plan box.
  • Copy: settings.seeAllPlanFeatures in en.json.

Related issue

Product request (2026-10-21). No issue.

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

With NEXT_PUBLIC_IS_CLOUD=true, open Settings → Billing:

  1. Under the plan cards there is "See everything each plan includes" with an external-link icon.
  2. Clicking it opens www.ansvisor.com/pricing in a new tab, and Billing stays open.
  3. As a manager, the link shows too (with the admin-only note from feat(settings): buy a trial now from Billing, with annual plans and the SAVE50 offer #1300).

Checked locally with the demo organization temporarily on a Starter trial (since restored), in light and dark, and at 1024 px.

Test: plan-switcher.test.tsx — the link's address, text, target="_blank" and rel, as a manager.

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/) (0 errors; the 6 warnings are in untouched files, as on main)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

Web: yarn test (1,947 tests) and yarn build pass.

🤖 Generated with Claude Code

cihan-gyk and others added 8 commits October 21, 2026 01:20
…ce it's spent

Starter now has the Improve tab (prompt_improve) on a $1 monthly budget,
a trial rather than 1% of its $49 price, so it can see what Improve does.
PROMPT-003 kept Improve to Growth and above.

- server/src/config/plans.js and web/src/config/plans.ts: Starter gets
  prompt_improve and improveMonthlyBudgetUsd 1.
- Improve tab: the budget note reads from en.json
  (prompts.improve.quota); once the budget is spent, Starter gets an
  "Upgrade for more" link to the billing page. A spent budget is said
  once, by the note, instead of also repeating the server's error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Settings → Billing's plan cards and custom plan box now follow
www.ansvisor.com/pricing.

- Each card lists, with a check: brands, unlimited seats, prompts
  tracked, the answer engines it tracks by name (Starter: ChatGPT &
  Microsoft Copilot; Growth: ChatGPT, Perplexity, Gemini, Microsoft
  Copilot, Google AI Mode and Google AI Overviews, instead of
  "8 answer engines"), content briefs and site audits a month, and what
  the plan adds; the taglines are the pricing page's.
- "Need a custom plan?" says who it's for and that it starts at
  $499/month, with six of the custom plan's points.
- The copy is in en.json (settings.planCards, customPlanPoints); the card
  keys nothing uses any more are removed. Plan limits are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…wth at 5x

AI usage (the monthly budget Improve and, later, the Content Editor's AI
spend) now comes in tiers the billing cards can name: Starter $1 (1x),
Growth $5 (5x, up from $2.49), Enterprise $10 at the least (up from $4.99,
so it stays above Growth; 1% of the contract still raises it).

- server/src/config/plans.js and web/src/config/plans.ts: the new budgets,
  with comments; plan-guard.js and improve-cost.js no longer say the
  budget is 1% of the plan price.
- Billing cards: "{n}x AI usage", worked out from the budgets against
  Starter's, with a hover note on what it covers (Agent Chat runs on the
  customer's own key).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he SAVE50 offer

During the free trial every plan card buys now: the trial ends today on the
plan and billing period picked (a Starter trial can buy Growth, or a year
up front) and the card added for the trial pays at once, with the SAVE50
code filled in for a monthly plan. A failed payment changes nothing and
offers Stripe's page to update the card. After the trial, a paid plan can
switch between monthly and annual billing as well as change plan.

The cards get a Monthly / Annual switch (a year is twelve months less 20%,
the full price struck through, "Save 20%") and a Popular badge on Growth.
Annual prices come from STRIPE_STARTER_ANNUAL_PRICE_ID and
STRIPE_GROWTH_ANNUAL_PRICE_ID; the plan request is validated with zod.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… plan on a declined card

- PATCH /api/stripe/subscription answers 403 admin_only for any role but
  admin, before anything is charged; Billing shows non-admins a note
  instead of the Buy, Upgrade, Downgrade, Switch and Reactivate buttons.
- A billing period switch now uses payment_behavior error_if_incomplete,
  so a declined card returns 402 payment_failed and leaves the plan as it
  was instead of moving it to the new period past due.
- Test: buying with the code field left empty applies no discount.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…g page

The plan cards list each plan's highlights. A quiet link under them,
"See everything each plan includes", opens www.ansvisor.com/pricing in a
new tab, so the Billing page and its Buy buttons stay where they are.
Shown to every role. PRICING_URL sits next to CONTACT_SALES_URL.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk A small one on top of #1300: a muted "See everything each plan includes ↗" link under the Billing plan cards, opening www.ansvisor.com/pricing in a new tab, so people can see the whole feature list without leaving Billing. Web only. It's stacked on #1300, so please merge #1300 first; until then the diff here includes #1300's changes (this PR's own change is 81cbfdc).

gkhngyk
gkhngyk previously approved these changes Oct 21, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. It merges right after #1300.

cihan-gyk and others added 2 commits October 21, 2026 18:00
DELETE /api/stripe/subscription answers 403 admin_only for other roles
before Stripe is called, and Billing shows Cancel Subscription to admins
only, with tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
gkhngyk previously approved these changes Oct 21, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still looks good. The PR's own change (81cbfdc) is the same after #1300's admin-only cancel was merged in. The merge commit adds nothing else, and the branch merges cleanly onto current main and alongside #1312.

gkhngyk
gkhngyk previously approved these changes Oct 22, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving after merging main in (#1300 landed). Tested on top of main with #1300: web and server tests, tsc, lint and Prettier pass.

@gkhngyk
gkhngyk merged commit 12846db into ansvisor:main Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants