feat(billing): report who saw and reviewed a plan proposal
Summary
Issue: none (asked by Romaric on 3 Dec 2026)
When Qovery staff send a plan proposal ("The Qovery team suggests Growth…"), they only knew whether someone saw the banner once. They want to know who saw it, who opened Review and who came from the email, to decide whom to recontact. The console now reports what each billing person does with a proposal; pricing-api keeps one line per person and shows it to staff.
- Seen: each display of the Usage page card or the top bar, with where it showed (
cardorbar). pricing-api counts repeats within 30 minutes as one visit. - Review opened: Review on the card, or the proposal link opening the review.
- Email clicked: the proposal link came from the email. The email's button now carries
&source=email; a link without a source is treated as the email, since emails already sent have none. - Top bar: its Review link now carries
&source=bar, so it is not counted as an email click. - Older pricing-api: if the client has no events call, the first-view call is used as before. Reporting never throws and never blocks the banner or the review.
- SDK: the Console pins
qovery-pricing-typescript-axios0.1.2. The new types are declared in data-access and the events call (POST /organization/{id}/proposals/{proposalId}/events) goes through the same Axios instance with the user's token. Oncesdk-v0.1.7is published from pricing-api, bump the pin and switch to the generatedproposalEvent.
Merge after the pricing-api change is deployed: before that, the events route does not exist there and the reports are dropped (the banner and the review still work).
pricing-api side: gitlab qovery/backend/pricing-api, docs/INTEGRATION.md section 3.4j.
Screenshots / Recordings
No visual change in the Console. I have not checked this branch in the running Console app.
Testing
-
settings-billing-usage.spec.tsx: seen from the card, review opened from the card, the email link reports the click then the review, the top bar link reports a review from the bar,proposalEventis mounted -
offers-bar.spec.tsx: the card and the top bar each report a seen with their source, the older view call is not used -
utils/paywall-rules.spec.ts: link source parsing, the events a link reports, the top bar review path, the fallback to the first-view call, the request sent with the user's token - Billing feature suite: 18 suites, 130 tests pass
- Prettier on the changed files; ESLint shows no errors
- Changes tested in the running Console
PR Checklist
- Conventional Commits title with a scope
- Self-review of the diff
- New business logic covered by unit tests
Summary by cubic
Reports what each billing person does with a plan proposal, so Qovery staff see who saw it, who opened Review and who came from the email. Previously they only knew a proposal was seen once.
Reporting
seenfires each time the Usage page card or top bar shows, with its source; repeats within 30 minutes count as one visit.review_openedfires on the card's Review or when a proposal link opens the review.email_clickedfires when the link came from the email. The email's button now carries&source=email; links without a source count as the email. The top bar's Review link now carries&source=bar.- Older pricing-api without the events route falls back to the first-view call. Reporting never throws or blocks the banner or the review.
- The events call goes through the same Axios instance with the user's token until
qovery-pricing-typescript-axios0.1.7 is published. - Merge after the pricing-api change is deployed; before that, reports are dropped.