Append a referrer param to the "Built with Reflex" badge link - #6951
Conversation
Greptile SummaryThe PR adds compile-time referral attribution to the fixed “Built with Reflex” badge URL while preserving the existing URL when no referral value is configured.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/reflex-base/src/reflex_base/environment.py | Adds the optional compile-time referral environment variable used by the badge. |
| packages/reflex-components-core/pyproject.toml | Updates the sibling-package development floor so the referenced environment attribute is available. |
| packages/reflex-components-core/src/reflex_components_core/core/sticky.py | Builds the fixed reflex.dev badge URL with a percent-encoded referral value when configured. |
| tests/units/reflex_components_core/core/test_sticky.py | Covers default, configured, encoded-special-character, and empty referral values. |
Reviews (4): Last reviewed commit: "Update packages/reflex-components-core/p..." | Re-trigger Greptile
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56e8530465
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…dge link The badge always links to reflex.dev; when the REFLEX_REFERRER_PARAM env var is set at compile time, its value is appended urlencoded as https://reflex.dev/?ref=<value>. This is the mechanism the referral bonus (ENG-11623) rides on: the hosting service injects the per-owner identifier at build time, and the destination itself stays fixed.
56e8530 to
e20d354
Compare
…ky test to subpackage path
…pace checkout satisfies it
Closes ENG-11714. Unblocks ENG-11623 (referral bonus).
What
The badge always links to
reflex.dev— the destination is not freely settable. When theREFLEX_REFERRER_PARAMenvironment variable is set at compile time, its value is appended urlencoded:Without the env var the badge link is unchanged (
https://reflex.dev), so existing apps are unaffected.Why this shape
Per discussion with @masenf: land it in the framework where the sticky badge is defined, keep the link pinned to reflex.dev, append only the param (if present), and urlencode it so special characters are not misinterpreted. The hosting service injects the per-owner referral identifier at build time via the env var — no user code changes.
Testing
Unit tests cover the default link, the appended param, urlencoding of special characters, and the empty-value fallback.