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
Changes paywall override resolution and tab-driven state publishing across core component states; behavior is covered by new tests but affects dynamic paywall UI broadly.

Overview
Tab selection now drives shared paywall state so other components can react via state_condition overrides.

When a visible TabsComponent has stateUpdates, TabsComponentView seeds and updates the store with the selected tab id (payload reference) on first composition and on every selection change; hidden tabs do not publish (iOS parity). TabsComponentStyle carries stateUpdates, and each tab style entry now includes an id.

Text, Image, Stack, and Icon component states pass stateReader = stateStore::currentValueOrDefault into ConditionContext, so overrides keyed on store values re-resolve when tabs (or anything else) updates state.

The paywall-tester TabsWithButtons sample adds selectedTab declarations, tab stateUpdates, and offer copy that swaps when selectedTab equals tab-1. Compose instrumentation tests cover store-driven text overrides, tab-click publishing, and hidden-tabs behavior.

Reviewed by Cursor Bugbot for commit 8be8aae. 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.49%. Comparing base (e471070) to head (8be8aae).

Additional details and impacted files
@@                      Coverage Diff                      @@
##           alvarobrey/pweng-57-resolver    #3664   +/-   ##
=============================================================
  Coverage                         80.49%   80.49%           
=============================================================
  Files                               404      404           
  Lines                             16771    16771           
  Branches                           2397     2397           
=============================================================
  Hits                              13500    13500           
  Misses                             2327     2327           
  Partials                            944      944           

☔ 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 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 2 times, most recently from 19e96e5 to 7924dc1 Compare July 6, 2026 13:58
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch 2 times, most recently from 072ff84 to f6fdb83 Compare July 7, 2026 13:08
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 7924dc1 to 68817b9 Compare July 7, 2026 13:08

@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.

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

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit f6fdb83. Configure here.

@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-57-resolver branch from 68817b9 to e471070 Compare July 7, 2026 15:05
@AlvaroBrey AlvaroBrey force-pushed the alvarobrey/pweng-65-android-tab-state branch from f6fdb83 to 8be8aae Compare July 7, 2026 15:05
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