fix: keep canceled subscriptions active until they expire - #1391
Conversation
f20f41a to
972d4f5
Compare
972d4f5 to
c392424
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c392424fe8
ℹ️ 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".
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
|
Pushed 5e05970: a canceled subscription now stops running at its last paid period even when it has a later fixed end date (status, subtitle, section, monthly cost, timing and the refresh timer all use that date), with a test for it, and the journey's last step now reads "Navigate back" so it matches the iOS twin. Answers the two bot threads above. |
|
Pushed ae6525c: the paid-through treatment now applies only to subscriptions the user pays. A canceled subscription the user created stays in CREATED and reads as expired as before (status, timing, dimming), covered by a new test that failed on the previous head. It also never moved sections on Android, because ACTIVE and EXPIRED already filter on the payer role. Same change as the iOS twin. |
|
Two independent reviews, nothing blocking a merge. worth doing, does not block
|
|
@coreyphillips Pushed fa6fb4c for your note on the ended canceled row:
The row now uses the last paid period's end for a canceled subscription you pay, so it reads "Expires February 1" like the detail's "EXPIRED February 1" instead of jumping to the later end date. The test for that case now asserts the row subtitle before and after the paid period ends, and it failed on the previous head. A canceled subscription without a fixed end date still reads "Expired" in the row. |
…nceled-status # Conflicts: # app/src/main/java/to/bitkit/ui/screens/subscriptions/SubscriptionsScreen.kt
|
Pushed bd66ef7: merged master into the branch to resolve the conflict in the subscription transition timer, keeping master's acceptance-time handling and this PR's paid-through refresh. No visible behavior change. Related unit tests, detekt and the dev build pass locally. |
|
Two independent reviews, nothing blocking a merge. worth doing, does not block
|
|
Pushed 4e451e7 for the creator-side listing and @coreyphillips' remaining notes:
@coreyphillips Already fixed in fa6fb4c (
@coreyphillips Fixed in f75355d: the blocked-peer filter in
@coreyphillips Fixed in 4e451e7: after Swipe To Cancel Also in this push (cf5acce): a canceled subscription you created follows the same rule as one you pay. While its paid period is ahead it stays under CREATED with "Expires "; once that date passes it moves to EXPIRED. One that was never canceled is unchanged. Tests failed on the previous head and pass now, and I checked both sides on an emulator with a seeded fixture (the Preview table has the screens). |
|
@coreyphillips @pwltr this one needs to merge for 2.6.0: its iOS twin synonymdev/bitkit-ios#846 is merged and ships in 2.6.0, so Android should match. Since the last approval it adds the creator-side listing (a canceled subscription you created stays under CREATED with "Expires " until its paid period ends, then moves to EXPIRED), hides a canceled blocked-peer subscription while it runs, and fixes the journey step order. CI is green on dcd8a5b and the branch is 0 behind master. Could one of you review it today? |
Closes #1413
Twin: synonymdev/bitkit-ios#846
Description
Out of Scope
SubscriptionsScreen.kt: the Renew button on the detail footer, tracked in Subscriptions: unbuilt controls and the swipe colour rule #1276.PaykitSubscription.kt: lifecycle rules (isActive,isExpired,canCancel) are unchanged.SubscriptionsScreen.kt: an expired subscription with a fixed end date still reads "Expires " in the list, as before.Design
Subscription Details Renew is the state for a canceled subscription that has not expired yet, and the Subscriptions overview lists it under ACTIVE as "Expires ". The frames show STATUS "Active" and no "Canceled" label.
Preview
Screenshots use a local-only fixture that seeds payer and creator canceled subscriptions in memory (not part of this PR); no real Swipe To Cancel was run. On the same fixture an open detail of a canceled subscription, payer or creator side, switched from STATUS "Active" and "EXPIRES" to "Expired" and "EXPIRED" at the end of its paid period without leaving the screen, and its row moved to EXPIRED, with the counts and monthly cost updating.
Subscriptions you pay
Subscriptions you created
QA Notes
Journeys
cancel-and-delete.xml— after Swipe To Cancel the detail shows STATUS "Active", "EXPIRES " and no Cancel; back on the list the subscription is in ACTIVE with "Expires "; on the creator it stays under CREATED with the same subtitle until the paid period ends, then moves to EXPIRED. The added steps were not run end to end: the journey needs two Pubky identities on regtestManual Tests
N/A
Automated Checks
SubscriptionsScreenTest.kt— status, row subtitle, ACTIVE/CREATED/EXPIRED grouping for subscriptions you pay and ones you created, monthly cost, timing and the end-of-period refresh for a canceled subscription before and after its paid period endsPaykitPaymentRequestRepoSubscriptionTest.kt— a canceled subscription from a blocked peer is hidden while its paid period runs and kept as history after it ends