Skip to content

feat(controlplane): forward optional referral_code on sh checkout and trial - #2769

Merged
mekilis merged 3 commits into
new-convoy-uifrom
smart/feat-referral-code-passthrough
Aug 4, 2026
Merged

feat(controlplane): forward optional referral_code on sh checkout and trial#2769
mekilis merged 3 commits into
new-convoy-uifrom
smart/feat-referral-code-passthrough

Conversation

@mekilis

@mekilis mekilis commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Accept optional referral_code on self-hosted checkout and trial start requests.
  • Forward the field on the billing client payloads when present; omit when empty.
  • Add unit and integration coverage for pass-through with and without a code.

Test plan

  • Checkout/trial start with referral_code set forwards the field
  • Checkout/trial start without a code still succeeds
  • Blank code is not sent on the billing payload

Note

Medium Risk
Billing and event-replay behavior changes are user-visible; referral attribution is fail-open on bad codes but replay logic affects portal security boundaries.

Overview
Adds self-hosted referral support end-to-end: optional referral_code on guest checkout and trial start (trimmed and forwarded to Overwatch; omitted when blank), billing org models expose referral_code / share_url, and the dashboard shows a “Refer a friend” block when share_url is present plus optional referee fields on checkout and trial flows.

Fixes portal batch replay so OwnedEndpointIDs is the full portal allowlist while the query filter may narrow endpoints—multi-endpoint events that only touch owned targets can replay instead of being skipped when the filter was wrongly used as the ownership set.

Moves default text-neutral-12 from * to body so primary button label text can inherit text-white-100. Includes billing client/integration tests and regenerated Swagger docs.

Reviewed by Cursor Bugbot for commit 4e836c2. Bugbot is set up for automated code reviews on this repo. Configure here.

@mekilis
mekilis force-pushed the smart/feat-referral-code-passthrough branch from 4e86cd1 to 8d68eda Compare August 3, 2026 14:58
pass the trimmed referral_code through to overwatch guest checkout and
self-hosted trial start so attribution can stick at signup.
@mekilis
mekilis force-pushed the smart/feat-referral-code-passthrough branch from 8d68eda to 08eada2 Compare August 3, 2026 15:27
@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Current version of PR was reviewed by /review-bugbot with additional instructions on Aug 3, 10:24 GMT+1. It flagged 0 findings.

Bugbot on commit 08eada2 is skipped.

…ership

show the sh refer block from organisation share_url, accept optional
referral_code on checkout and trial, and keep OwnedEndpointIDs on the
full portal allowlist when filtering batch replay by endpointId.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4e836c2. Configure here.

…l list errors

call loadReferralShare from pollUntilBillingActive with a stale-response
token, and clear portal subscription loading failures without showing
stale rows or a false empty state.
@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

Current version of PR was reviewed by /review-bugbot with additional instructions on Aug 4, 16:20 GMT+1. It flagged 0 findings.

Bugbot on commit 78b098d is skipped.

@mekilis
mekilis merged commit 8bc8f71 into new-convoy-ui Aug 4, 2026
29 checks passed
@mekilis
mekilis deleted the smart/feat-referral-code-passthrough branch August 4, 2026 15:36
mekilis added a commit that referenced this pull request Aug 4, 2026
* redesign dashboard

* update convoy clean design

* finish Clean UI cleanup across dashboard surfaces

Align remaining shared components, billing, auth, filters, and dialogs with Clean tokens and native pill CTAs.

Co-authored-by: Cursor <cursoragent@cursor.com>

* honor portal endpoint filters within allowed scope

Intersect requested endpoint IDs with the portal link allowlist so delivery list and count queries can filter without widening token access.

Co-authored-by: Cursor <cursoragent@cursor.com>

* update billing session

* fix(dashboard): honor portal endpoint filters without widening scope (#2770)

keep query endpointId as an allowlist intersection on portal list/count/retry
paths, return typed empty pages when the intersection is empty, and cover the
contract in unit plus portal integration tests. also clear unused-var lint in
event deliveries filters.

* feat(controlplane): forward optional referral_code on sh checkout and trial (#2769)

* feat(billing): forward optional referral_code on sh checkout and trial

pass the trimmed referral_code through to overwatch guest checkout and
self-hosted trial start so attribution can stick at signup.

* feat(billing): wire referral share ui and fix portal batch replay ownership

show the sh refer block from organisation share_url, accept optional
referral_code on checkout and trial, and keep OwnedEndpointIDs on the
full portal allowlist when filtering batch replay by endpointId.

* fix(billing): reload referral share after activation and harden portal list errors

call loadReferralShare from pollUntilBillingActive with a stale-response
token, and clear portal subscription loading failures without showing
stale rows or a false empty state.

---------

Co-authored-by: Smart Mekiliuwa <st.nonso@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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