Skip to content

[Conditional Configurability][3] Implement variable, selected package, and extended intro/promo condition evaluation#3112

Merged
vegaro merged 1 commit into
cesar/conditional-configurabilityfrom
cesar/pw-171-remaining-v0-conditions
Feb 18, 2026
Merged

[Conditional Configurability][3] Implement variable, selected package, and extended intro/promo condition evaluation#3112
vegaro merged 1 commit into
cesar/conditional-configurabilityfrom
cesar/pw-171-remaining-v0-conditions

Conversation

@vegaro

@vegaro vegaro commented Feb 17, 2026

Copy link
Copy Markdown
Member

Motivation

Completes the V0 condition evaluation logic.

  • With variable conditions paywalls can adapt based on developer custom variables.
  • Selected package conditions let components change based on which package the user has selected.
  • Intro/promo conditions now support explicit operator (=/!=) and value fields for more precise control.

Description

  • Implements Variable condition evaluation with equality comparison and type coercion (string, bool, int, double)
  • Implements SelectedPackage condition evaluation against the currently selected package ID
  • Implements extended IntroOffer and PromoOffer evaluation with operator (=/!=) and value fields
  • Removes Package condition (not used by backend or dashboard)
  • Threads customVariables through ConditionContext to all component state classes
  • Wires customVariables from PaywallState.Loaded into the evaluation pipeline

@vegaro vegaro requested a review from a team as a February 17, 2026 15:58
@vegaro vegaro marked this pull request as draft February 17, 2026 16:01
@vegaro vegaro force-pushed the cesar/pw-171-remaining-v0-conditions branch from 56b5031 to 8fa05ed Compare February 17, 2026 16:04
@vegaro vegaro force-pushed the cesar/pw-170-selected-package-condition-evaluation branch from e8dc666 to d22d929 Compare February 17, 2026 16:04
@vegaro vegaro changed the title [PW-171] Implement variable, package, and extended intro/promo condition evaluation [Conditional Configurability][3] Implement variable, package, and extended intro/promo condition evaluation Feb 17, 2026
@vegaro vegaro force-pushed the cesar/pw-170-selected-package-condition-evaluation branch from d22d929 to f2ca67e Compare February 17, 2026 16:16
@vegaro vegaro force-pushed the cesar/pw-171-remaining-v0-conditions branch from 8fa05ed to 3607d07 Compare February 17, 2026 16:16
@vegaro vegaro force-pushed the cesar/pw-171-remaining-v0-conditions branch from 3607d07 to 903b0ec Compare February 17, 2026 16:57
@vegaro vegaro force-pushed the cesar/pw-170-selected-package-condition-evaluation branch from f2ca67e to 5f6bebb Compare February 17, 2026 16:57

vegaro commented Feb 17, 2026

Copy link
Copy Markdown
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vegaro vegaro force-pushed the cesar/pw-170-selected-package-condition-evaluation branch from 5f6bebb to 1327aba Compare February 18, 2026 10:50
@vegaro vegaro force-pushed the cesar/pw-171-remaining-v0-conditions branch from 903b0ec to 48cd554 Compare February 18, 2026 10:50
@vegaro vegaro changed the title [Conditional Configurability][3] Implement variable, package, and extended intro/promo condition evaluation [Conditional Configurability][3] Implement variable and extended intro/promo condition evaluation Feb 18, 2026
@vegaro vegaro changed the title [Conditional Configurability][3] Implement variable and extended intro/promo condition evaluation [Conditional Configurability][3] Implement variable, selected package, and extended intro/promo condition evaluation Feb 18, 2026
@vegaro vegaro marked this pull request as ready for review February 18, 2026 10:53
@vegaro vegaro requested a review from facumenzella February 18, 2026 10:53

@facumenzella facumenzella left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See inline comment below

@vegaro vegaro force-pushed the cesar/pw-170-selected-package-condition-evaluation branch from 1327aba to 03f2bd3 Compare February 18, 2026 15:31
@vegaro vegaro force-pushed the cesar/pw-171-remaining-v0-conditions branch 2 times, most recently from 88e257e to 2020bc1 Compare February 18, 2026 15:34
@vegaro vegaro force-pushed the cesar/pw-170-selected-package-condition-evaluation branch from 03f2bd3 to 68d0698 Compare February 18, 2026 15:34
Base automatically changed from cesar/pw-170-selected-package-condition-evaluation to cesar/conditional-configurability February 18, 2026 15:35
@vegaro vegaro force-pushed the cesar/pw-171-remaining-v0-conditions branch 2 times, most recently from 082e975 to 72b2a6b Compare February 18, 2026 15:49
@codecov

codecov Bot commented Feb 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.22%. Comparing base (a7f9fb0) to head (1d0e5b1).
⚠️ Report is 1 commits behind head on cesar/conditional-configurability.

Additional details and impacted files
@@                        Coverage Diff                         @@
##           cesar/conditional-configurability    #3112   +/-   ##
==================================================================
  Coverage                              79.22%   79.22%           
==================================================================
  Files                                    347      347           
  Lines                                  13948    13948           
  Branches                                1893     1893           
==================================================================
  Hits                                   11050    11050           
  Misses                                  2112     2112           
  Partials                                 786      786           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…ation

- Introduce ConditionContext to group all condition evaluation parameters
- Implement Variable condition: compare custom variables by type and value
- Implement Package condition: compare against enclosing PackageComponent ID
- Implement extended IntroOffer/PromoOffer: evaluate with operator and value
  (legacy no-operator form defaults to equals/true for backwards compat)
- Thread customVariablesProvider through all component states
- Add mergedCustomVariables to PaywallState (developer overrides dashboard)
- Add comprehensive tests for all new condition evaluation paths

Co-authored-by: Cursor <cursoragent@cursor.com>
@vegaro vegaro force-pushed the cesar/pw-171-remaining-v0-conditions branch from 72b2a6b to 1d0e5b1 Compare February 18, 2026 16:14
@vegaro vegaro requested a review from facumenzella February 18, 2026 16:17
@vegaro vegaro merged this pull request into cesar/conditional-configurability Feb 18, 2026
25 of 28 checks passed
@vegaro vegaro deleted the cesar/pw-171-remaining-v0-conditions branch February 18, 2026 16:35
vegaro added a commit that referenced this pull request Feb 19, 2026
…, and extended intro/promo condition evaluation (#3112)

### Motivation
Completes the V0 condition evaluation logic. 

- With variable conditions paywalls can adapt based on developer custom
variables.
- Selected package conditions let components change based on which
package the user has selected.
- Intro/promo conditions now support explicit operator (`=`/`!=`) and
value fields for more precise control.

### Description
- Implements `Variable` condition evaluation with equality comparison
and type coercion (string, bool, int, double)
- Implements `SelectedPackage` condition evaluation against the
currently selected package ID
- Implements extended `IntroOffer` and `PromoOffer` evaluation with
`operator` (`=`/`!=`) and `value` fields
- Removes `Package` condition (not used by backend or dashboard)
- Threads `customVariables` through `ConditionContext` to all component
state classes
- Wires `customVariables` from `PaywallState.Loaded` into the evaluation
pipeline

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants