Skip to content

feat(prompts): give Starter a $1 trial of Improve, with an upgrade once it's spent - #1296

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:feature/starter-improve-trial
Oct 21, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:feature/starter-improve-trial

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Starter gets a $1 monthly trial of Improve: the Positions panel's AI suggestions (prompt_improve). Starter users can try what Improve does before they upgrade. Once the $1 is spent, the Improve tab offers Starter an Upgrade link to the billing page.

This changes PROMPT-003's decision that Improve is Growth and above. The other plans keep 1% of the plan price (Growth $2.49, Enterprise $4.99, self-hosted unlimited). Starter's $1 is a fixed trial, not 1% of $49.

Plans (server/src/config/plans.js, web/src/config/plans.ts, kept in step)

  • Starter features now include prompt_improve.
  • Starter improveMonthlyBudgetUsd changes from 0 to 1, with a comment saying why.
  • The server enforces the budget as before: enforceImproveQuota charges each generation's real token cost against the monthly budget, so $1 holds whichever model is configured. The tab's estimate showed about 100 generations at the current default.

Improve tab (web/src/components/prompts/prompt-improve-tab.tsx)

  • Messages: the budget note now reads from en.json (prompts.improve.quota): "About N generations left this month", the percent-left hint, and "This month's suggestion budget is used up. It resets when your subscription renews."
  • Upgrade link: when the budget is spent on Starter, the note adds "Upgrade for more", linking to /dashboard/settings?tab=billing (the same target as the Content usage card's upgrade). Paid plans only see when it resets.
  • One message: a spent budget was said twice, by the server's error and by the note. It's now said once, by the note, which carries the link. Generate stays disabled as before.
  • The controller passes planId through to the note.

Related issue

Changes PROMPT-003 (Improve plan limits). It also gives Starter the budget the Content Editor's AI will use (Rebuild outline in #1293 is metered from the same Improve budget).

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 IS_CLOUD=true on the server and NEXT_PUBLIC_IS_CLOUD=true on the web, put an organization on starter.

  1. Open Prompts → a tracked prompt's positions → Improve. It's unlocked and reads "About N generations left this month".
  2. Spend the budget. Generate until it runs out, or add a prompt_improve_usage row of cost_usd 1 for the org this month. The note reads "This month's suggestion budget is used up…", followed by Upgrade for more, which opens Settings → Billing. Generate is disabled.
  3. On Growth with a spent budget, the same note shows without the Upgrade link.

Checked locally:

  • The demo organization was moved to Starter for the check: the tab was unlocked with about 105 generations left, then used up with the Upgrade link once a $1 usage row was added. The plan was set back to self_hosted and the row deleted.
  • Light and dark themes.
  • The billing page itself needs a Stripe key, which isn't set locally.

Tests:

  • Server: prompt-improve.test.js. Improve is on every plan; Starter's budget is $1, and the other budgets are unchanged.
  • Web: new prompt-improve-tab.test.tsx:
    • generations left with the percent hint;
    • Starter used up with the Upgrade link and Generate disabled;
    • Growth used up without the link;
    • nothing shown on unlimited.

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,912 tests) and yarn build pass. Server: npm run format, npm run lint and npm test (1,919 tests, also without a .env, as CI runs them) pass. No migration.

🤖 Generated with Claude Code

…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]>
@cihan-gyk

Copy link
Copy Markdown
Collaborator Author

@gkhngyk This PR is a product change from main, independent of the Content Editor stack.

Plans are kept in step in server/src/config/plans.js and web/src/config/plans.ts. No migration.

@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. The server and web budgets match, and a spent budget is now said once, by the note, with the upgrade link on Starter only.

Tested on top of current main with #1297, #1298 and #1299.

@gkhngyk
gkhngyk merged commit 93f3365 into ansvisor:main Oct 21, 2026
6 checks passed
gkhngyk added a commit to cihan-gyk/ansvisor that referenced this pull request Oct 21, 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