Skip to content

feat(RevenueCatUI): Tab selected-state (PWENG-65)#3664

Open
AlvaroBrey wants to merge 7 commits into
alvarobrey/pweng-57-resolverfrom
alvarobrey/pweng-65-android-tab-state
Open

feat(RevenueCatUI): Tab selected-state (PWENG-65)#3664
AlvaroBrey wants to merge 7 commits into
alvarobrey/pweng-57-resolverfrom
alvarobrey/pweng-65-android-tab-state

Conversation

@AlvaroBrey

@AlvaroBrey AlvaroBrey commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Wires tab selection into the store: TabsComponent.stateUpdates fires on selection, publishing the selected tab id as a $value payload. Hidden tabs still publish on first composition so sibling components aren't left on stale state. The 4 reader component states (Text, Image, Stack, Icon) pass stateReader = stateStoreProvider()::currentValueOrDefault into ConditionContext.

End-to-end instrumentation tests for the read path (state condition drives a text swap) and write path (tab click publishes to store). Paywall-tester example (bottom text):

Screen_recording_20260629_125906.webm

Note

Medium Risk
Touches paywall override resolution and shared component state across Text/Image/Stack/Icon; behavior changes for state-driven tabs but is scoped to RevenueCatUI with new tests.

Overview
Connects tab selection to the paywall state store so other components can react via state_condition overrides.

When a Tabs component is visible, TabsComponentView runs stateUpdates on first show and whenever the selection changes, writing the selected tab id (payload reference) into PaywallStateStore. Hidden tabs do not publish (store stays on declared defaults).

Text, Image, Stack, and Icon component states now pass stateReader = stateStore::currentValueOrDefault into ConditionContext, so overrides keyed on store values recompose when tab state changes. TabsComponentStyle carries stateUpdates and each tab style includes an id from the model.

Adds instrumentation tests for the read path (state override swaps copy) and write path (tab click updates store), plus a paywall-tester sample with selectedTab declarations and tab-dependent offer text.

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

Copy link
Copy Markdown
Contributor 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.

@AlvaroBrey AlvaroBrey self-assigned this Jun 26, 2026
@AlvaroBrey AlvaroBrey changed the title feat(RevenueCatUI): thread state store into component condition evaluation feat(RevenueCatUI): Tab selected-state (PWENG-65) Jun 26, 2026
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.48%. Comparing base (7924dc1) to head (072ff84).

Additional details and impacted files
@@                      Coverage Diff                      @@
##           alvarobrey/pweng-57-resolver    #3664   +/-   ##
=============================================================
  Coverage                         80.48%   80.48%           
=============================================================
  Files                               403      403           
  Lines                             16717    16717           
  Branches                           2386     2386           
=============================================================
  Hits                              13455    13455           
  Misses                             2322     2322           
  Partials                            940      940           

☔ View full report in Codecov by Harness.
📢 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.

@AlvaroBrey

Copy link
Copy Markdown
Contributor Author

@cursor review

@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch 2 times, most recently from d4e83d3 to f712a7c Compare June 29, 2026 10:36
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from c7fa19c to 1d7720c Compare June 29, 2026 10:36
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from b3836e0 to 50f79b8 Compare June 29, 2026 13:34
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch 2 times, most recently from 1c15d31 to fd18a34 Compare June 29, 2026 13:44
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from 50f79b8 to 64862dc Compare June 29, 2026 13:44
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from fd18a34 to abf2497 Compare June 29, 2026 14:54
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from 2073b6b to 3d2df28 Compare June 29, 2026 14:54
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from abf2497 to 445a2cf Compare June 30, 2026 09:40
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from dda51db to 9a17073 Compare June 30, 2026 09:42
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 445a2cf to 92cb005 Compare June 30, 2026 10:12
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from 9a17073 to d77344e Compare June 30, 2026 10:12
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 92cb005 to 287498f Compare June 30, 2026 10:27
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from d77344e to 8f64ee7 Compare June 30, 2026 10:27
@AlvaroBrey AlvaroBrey marked this pull request as ready for review June 30, 2026 10:46
@AlvaroBrey AlvaroBrey requested a review from a team as a code owner June 30, 2026 10:46
@AlvaroBrey AlvaroBrey removed the request for review from a team June 30, 2026 10:46
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch 2 times, most recently from 7875cf2 to 447c5f0 Compare July 1, 2026 13:46
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from 828b66e to 2019bef Compare July 1, 2026 13:46
@AlvaroBrey

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2019bef. Configure here.

@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 447c5f0 to 13c315c Compare July 1, 2026 16:44
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from 2019bef to ef06a92 Compare July 1, 2026 16:44
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 13c315c to 776f015 Compare July 1, 2026 19:05
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from ef06a92 to ebeb35c Compare July 1, 2026 19:05
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 776f015 to 3685a78 Compare July 1, 2026 19:26
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from ebeb35c to 6bbbe94 Compare July 1, 2026 19:26
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 3685a78 to 26892a7 Compare July 2, 2026 07:21
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch 2 times, most recently from 5320435 to 71fe206 Compare July 2, 2026 07:43
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 26892a7 to 196d178 Compare July 2, 2026 07:43
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from 71fe206 to f464f20 Compare July 3, 2026 10:14
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 196d178 to 4eab460 Compare July 3, 2026 10:14
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from f464f20 to 8661e79 Compare July 3, 2026 13:40
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 4eab460 to 0a3bab0 Compare July 3, 2026 13:40
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from 8661e79 to 120a967 Compare July 6, 2026 06:18
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 0a3bab0 to 19e96e5 Compare July 6, 2026 06:18
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 19e96e5 to 7924dc1 Compare July 6, 2026 13:58
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from 120a967 to 072ff84 Compare July 6, 2026 13:58
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.

1 participant