📝 Walkthrough
Snapshot expiry now considers reset times only when they are later than the corresponding account’s check time. Reset labels distinguish newer reset times from already-known ones. Tests cover expiry conditions and timeline refresh states. A script manages subscription-widget fixtures.
Changes: Subscription usage snapshots
Layer / File(s) Summary Snapshot expiry and reset labels
apps/mobile/src/widgets/subscriptionUsageSnapshot.ts,apps/mobile/src/widgets/subscriptionUsageSnapshot.test.tsSnapshot freshness no longer uses reset times at or before an account’s checkedAt. Reset labels show “Next reset” for later timestamps and “Reset” otherwise. Tests cover expiry conditions and timeline refresh states.Widget fixture management
apps/mobile/scripts/seed-widget-fixture-22973.mtsThe script lists fixtures, applies fixture data to the widget coordinator, and reverts tracked widget files and the generated fixture module. It validates fixture names, anchors, source changes, and the expected coordinator hook. Priority: ➖ Normal
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related issues
- Issue 22973 — Its report describes an empty subscription widget when a reset timestamp precedes the account observation time. This change excludes those timestamps from snapshot expiry.
Merge Risk: 🟡 Moderate · up to 02932
The widget expiry fix itself has no outstanding concerns in this review. The added developer fixture script fails the repository's lint check, so CI must pass before merge. It can also overwrite local edits or leave a half-applied state, though only in a development workflow.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title clearly and concisely describes the primary fix: preventing subscription-widget expiry from using a reset window that has already passed. Linked Issues check Passed The changes address the coding requirement in #22973for the synthetic expiry failure.subscriptionUsageSnapshot.tsignores reset times at or before each account'scheckedAtwhen it calculates pro…Out of Scope Changes check Passed The changed files stay within the scope of #22973. The regression tests validate the subscription widget expiry and publication behavior.seed-widget-fixture-22973.mtsprovides an issue-specific bef…Description check Passed The description follows the required Problem, Change, Scope and approval, and Verification sections. It explains the bug, implementation, linked issue, test results, platform limitations, and evidence… Full details: Linked Issues check
Explanation
The changes address the coding requirement in
#22973for the synthetic expiry failure.subscriptionUsageSnapshot.tsignores reset times at or before each account'scheckedAtwhen it calculates provider expiry. It labels those resets asResetand retains the reported percentage. Future resets and the 15-minute freshness limit still expire the provider. The shared snapshot timeline is covered for iOS and Android inputs, pooled accounts, boundary times, and expired timeline entries insubscriptionUsageSnapshot.test.ts. The issue states that the phone's actual timestamps are unknown, so live-device confirmation is not a coding requirement established by#22973.
Full details: Out of Scope Changes check
Explanation
The changed files stay within the scope of
#22973. The regression tests validate the subscription widget expiry and publication behavior.seed-widget-fixture-22973.mtsprovides an issue-specific before/after fixture for the real snapshot-to-widget path. No unrelated product feature, Agent Activity work, failed-refresh behavior, or Dynamic Island work is included.
Full details: Description check
Explanation
The description follows the required Problem, Change, Scope and approval, and Verification sections. It explains the bug, implementation, linked issue, test results, platform limitations, and evidence. The scope section does not include an explicit maintainer approval comment, but it identifies the triaged issue and automated issue flow; the remaining content is complete and relevant.
✨ Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
- Commit to this branch
- Create a new PR
📝 Generate docstrings
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.