Skip to content

feat(billing): include chat and monthly investigations, simplify pricing - #788

Open
izadoesdev wants to merge 29 commits into
stagingfrom
codex/investigation-monthly-allowances
Open

feat(billing): include chat and monthly investigations, simplify pricing#788
izadoesdev wants to merge 29 commits into
stagingfrom
codex/investigation-monthly-allowances

Conversation

@izadoesdev

@izadoesdev izadoesdev commented Sep 13, 2026

Copy link
Copy Markdown
Member

Pricing cards currently mix credit grants with zero investigations, duplicate allowances, and an unconfigured $2 introductory price. Disabled billing switches also leave empty expanded space. This change defines Business at 100 completed investigations per month and Scale at 500, with $1 per extra investigation, and includes ordinary Databunny chat on new plans through Autumn.

Dashboard and public pricing use three primary cards with detailed limits in a collapsed comparison. Native prices and allowances replace copied provider prose and unsupported promotions; zero investigation markers, popularity/carbon claims, duplicate grants, and redundant checkout wording are removed. Event usage rates remain accessible. The public calculator, pricing API v3, structured data, Markdown, and investigation copy agree with the configured offer. Free, Scale, and Enterprise remain accessible as secondary public options.

Billing shows actual attached allowances, resets, purchased balances, additional usage, and custom prices, including complimentary subscriptions. Included-chat accounts hide credit purchase and auto-top-up controls; existing legacy balances and paid add-ons retain their terms and management controls. Closed settings unmount their fields. Failed or mismatched Autumn customer reads cannot overwrite saved billing caps. Expanded subscription reads bypass the plain-customer cache, and native chat entitlement is checked before model execution.

Billing and pricing add short transform/opacity feedback for opened settings, pending actions, plan cards, comparison disclosures, and the event estimator. Reduced-motion preferences disable the motion, while disabled billing settings still unmount immediately. Shared loading buttons retain their action label footprint and accessible name, center the spinner without changing width, and disable native activation until the request settles. Idle button child layout is preserved.

The cleanup deletes duplicate pricing components, a redundant test fixture wrapper, renderer context, and tier-difference helpers. Temporary research/sync/schema-apply scripts were outside the repository and have been removed separately; this PR adds no .mjs files.

Validation: final integrated repository lint, all 33 configured type/build tasks, and all 27 repository test tasks pass. Dashboard pricing passes 17 native renderer cases / 79 assertions, four desktop/mobile browser scenarios, and six billing-control browser regressions. Click/tap/keyboard rate disclosures, collapsed comparison, save/reload, and plan-change error feedback are verified. Focused native billing-control coverage passes 10 tests / 63 assertions. Public pricing passes 30 tests / 234 assertions and desktop/mobile browser checks, including collapsed comparison, accessible usage rates, no page overflow/errors, and a $324 estimate for 125 Business investigations. Synthetic provider fixtures cover native prices, allowance periods, legacy terms, and save failures; no production customer is used as a billing test.

Interaction validation: 12 billing browser cases pass across desktop/mobile and normal/reduced motion. All eight delayed-save checks hold the button at 62.71875px before and during loading, with zero width change, aria-busy, native disabled state, and one mutation despite a forced second click. Four public-pricing browser cases verify hover/press frame alignment, immediate disclosure closing, estimator values, no overflow or page errors, and no animation/transition under reduced motion.

Rollout is paused at the user's request. This update is for review and push; no live plan update, customer activation, or production database mutation is included. The native chat feature was created earlier, but live plans still have their old terms. The separate production promotion PR #789 remains a paused draft. The earlier investigation ledger is already on staging from #786; its necessity is under review, and its discarded apply scripts are not a release requirement established by this cleanup. Live Autumn invoice/reset behavior remains unverified in sandbox.

Scope is investigation pricing, included chat billing, and their presentation. No dependency on an unmerged PR; default model routing is owned by #784. AI-assisted implementation and review under the maintainer workflow.

@vercel

vercel Bot commented Sep 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dashboard Ready Ready Preview Sep 13, 2026 10:18pm UTC
databuddy-status Ready Ready Preview Sep 13, 2026 10:18pm UTC
documentation Ready Ready Preview Sep 13, 2026 10:18pm UTC

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 89ba1082-6e9b-414c-b990-39a6f7ca2460

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel
vercel Bot temporarily deployed to Preview – documentation September 13, 2026 01:03 Inactive
@vercel
vercel Bot temporarily deployed to Preview – dashboard September 13, 2026 01:03 Inactive
@unkey-deploy

unkey-deploy Bot commented Sep 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Unkey Deploy

Name Status Preview Inspect Updated (UTC)
links (preview) Ready Visit Preview Inspect Sep 13, 2026 10:16pm

@izadoesdev izadoesdev changed the title feat(billing): include monthly investigations with $1 additional usage feat(billing): include chat and monthly investigations, simplify billing Sep 13, 2026
@izadoesdev
izadoesdev marked this pull request as ready for review September 13, 2026 15:23
@izadoesdev

Copy link
Copy Markdown
Member Author

@greptileai Please review final head 875f665. The additional change preserves cancellation and native prices for existing active, past-due, and scheduled paid add-ons while hiding new credit offers. The earlier layout and native-price findings remain fixed. All local required checks and the added synthetic browser scenarios pass.

@blacksmith-sh

blacksmith-sh Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test/e2e/specs/regressions/billing-controls.spec.ts/
billing switches collapse and persist for included chat @regression
View Logs
test/e2e/specs/regressions/billing-controls.spec.ts/
billing switches collapse and persist for legacy credits @regression
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

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.

1 participant