[mobile] Migrate processing status surfaces (6/7) - #1870
Conversation
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughMobile screens now use ChangesProcessing status presentation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant MobileScreen
participant useProcessingStatus
participant ProcessingStatusQuery
participant ProcessingStatusWidget
MobileScreen->>useProcessingStatus: request datasets or providerId
useProcessingStatus->>ProcessingStatusQuery: call processing.status
ProcessingStatusQuery-->>useProcessingStatus: return status data
useProcessingStatus-->>MobileScreen: expose data, error, loading
MobileScreen->>ProcessingStatusWidget: render processing status
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Mobile PreviewScan to open on device:
To test on device:
|
|
Storybook previews for This comment updates automatically on each PR push. |
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Pull Request Review SummaryThe migration from Key Observations & Recommendations:
🤖 Reviewed by codereviewbot.ai - Catch bugs before your team does. |
Greptile SummaryThis PR moves mobile processing surfaces to the processing-status API. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "fix: refresh processing status on pull" | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/mobile/app/providers/[id].tsx (1)
813-822: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winInvalidate processing status on disconnect.
The new
processing.statuscache is invalidated for pull-to-refresh here, but the disconnect success path above still invalidates onlysync.providersandsync.providerStatsbeforerouter.back(). Returning toProvidersScreencan therefore show the pre-disconnect account-wide status until a later poll or manual refresh. AddtrpcUtils.processing.status.invalidate()to the disconnect success path as well.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/mobile/app/providers/`[id].tsx around lines 813 - 822, Update the disconnect success path in the provider flow to also call trpcUtils.processing.status.invalidate() alongside the existing sync.providers and sync.providerStats invalidations, before router.back().
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/mobile/app/`(tabs)/recovery.tsx:
- Line 184: Add processing status invalidation to the pull-to-refresh handlers:
update packages/mobile/app/(tabs)/recovery.tsx at lines 184-184 to call
utils.processing.status.invalidate() alongside
utils.mobileDashboard.recovery.invalidate(), and
packages/mobile/app/(tabs)/strain.tsx at lines 186-186 to call it alongside
utils.mobileDashboard.training.invalidate().
In `@packages/mobile/components/ProcessingStatusWidget.test.tsx`:
- Line 47: Remove the unnecessary “as const” assertion from the ready fixture in
ProcessingStatusWidget tests, and type the ready object using the existing
snapshot fixture contract so overallStatus remains type-checked without
bypassing the compiler.
In `@packages/mobile/components/ProcessingStatusWidget.tsx`:
- Around line 72-80: Update the error branch in ProcessingStatusWidget so it
renders the full unavailable state only when data is absent; when cached data
exists, keep rendering that snapshot and surface the refetch error
non-blockingly without replacing the status. Preserve the server-provided
error.message and retain the existing ready/alwaysVisible visibility behavior.
- Line 71: Replace the early null return in ProcessingStatusWidget’s initial
loading branch with the component’s explicit loading UI, so loading && !data
renders a visible state. In
packages/mobile/components/ProcessingStatusWidget.stories.tsx at lines 63-63,
retain the existing loading scenario unchanged to verify that rendered state.
---
Outside diff comments:
In `@packages/mobile/app/providers/`[id].tsx:
- Around line 813-822: Update the disconnect success path in the provider flow
to also call trpcUtils.processing.status.invalidate() alongside the existing
sync.providers and sync.providerStats invalidations, before router.back().
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d736ac4b-d463-4ef9-b00d-f921f249597d
📒 Files selected for processing (27)
packages/mobile/app/(tabs)/activities.test.tsxpackages/mobile/app/(tabs)/activities.tsxpackages/mobile/app/(tabs)/index.test.tsxpackages/mobile/app/(tabs)/index.tsxpackages/mobile/app/(tabs)/recovery.test.tsxpackages/mobile/app/(tabs)/recovery.tsxpackages/mobile/app/(tabs)/strain.test.tsxpackages/mobile/app/(tabs)/strain.tsxpackages/mobile/app/_layout.cleanup.test.tsxpackages/mobile/app/providers/[id].test.tsxpackages/mobile/app/providers/[id].tsxpackages/mobile/app/providers/index.test.tsxpackages/mobile/app/providers/index.tsxpackages/mobile/app/providers/provider-data-delete-control.tsxpackages/mobile/app/sleep.tsxpackages/mobile/components/DataReadinessBanner.stories.tsxpackages/mobile/components/DataReadinessBanner.test.tsxpackages/mobile/components/DataReadinessBanner.tsxpackages/mobile/components/ProcessingStatusWidget.stories.tsxpackages/mobile/components/ProcessingStatusWidget.test.tsxpackages/mobile/components/ProcessingStatusWidget.tsxpackages/mobile/lib/query-client.test.tspackages/mobile/lib/trpc-fetch.test.tspackages/mobile/lib/useAutoSync.test.tspackages/mobile/lib/useAutoSync.tspackages/mobile/lib/useProcessingStatus.tspackages/mobile/lib/useRefresh.test.ts
💤 Files with no reviewable changes (3)
- packages/mobile/components/DataReadinessBanner.tsx
- packages/mobile/components/DataReadinessBanner.stories.tsx
- packages/mobile/components/DataReadinessBanner.test.tsx
|
LGTM! The refactoring from 🤖 Reviewed by codereviewbot.ai - Catch bugs before your team does. |
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
Part 6 of the #1852 processing-status stack.
Migrates mobile dashboard, activity, recovery, strain, sleep, and provider surfaces to the processing-status API. Adds the mobile processing-status widget and removes the legacy mobile readiness banner.
Previous: #1869. Next: #1872.
Changed files: 27.
Summary by CodeRabbit
New Features
Bug Fixes