Repository navigation
fix(mobile): stop showing low-balance alert as off and fix usage stats skeleton - #6762
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental commit Files Reviewed (2 files)
Previous Review Summary (commit 6bccfb0)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 6bccfb0)Status: No Issues Found | Recommendation: Merge Executive SummaryBoth render-branch fixes are correct: Files Reviewed (2 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
Initialize lowBalanceSubtitle at its declaration to satisfy init-declarations, and collapse the usage stats if/else into a ternary so no-unnecessary-condition and prefer-ternary pass.
|
bot: Fixed failing checks in 0df6da6. |
Fix proof
The hub's 'Low balance alert' row subtitle falls back to 'Off' whenever the withMembers query has no data, so while that query is paused offline or has errored (it is not in the persisted read cache)
Asserted value:
apps/mobile/src/components/organization/hub-screen.tsx. Sense check (jev): probability 0.95The scripts were proven on an earlier base, so only the head ran.
Head
0df6da628267Head log: backend-assert f4f2ff320335 exited 0
On the organization hub the 2x2 usage-stat tiles disappear and only the 'Last 30 days' eyebrow renders when the usage query is paused (offline), because OrgUsageStats keys its skeleton off React Query
Asserted value:
apps/mobile/src/components/organization/org-usage-stats.tsx. Sense check (model): The changed lineconst { data, isPending, isError } = useOrgUsageStats(organizationId)in org-usage-stats.tsx swaps isLoading for isPending, the exact fix the claim names for the paused-query state.The scripts were proven on an earlier base, so only the head ran.
Head
0df6da628267Head log: backend-assert b556fae42f7a exited 0
Changelog for users
Changelog for maintainers
E2E proof
The hub's 'Low balance alert' row subtitle falls back to 'Off' whenever the withMembers query has no data, so while that query is paused offline or has errored (it is not in the persisted read cache) an org with the alert enabled reads as disabled; the subtitle must not treat missing settings as off.
Code trace:
apps/mobile/src/components/organization/hub-screen.tsx:93 changed in 6e24929a7d044ac77b9e8d97fdd7da4502eeb420. Sense check (jev): probability 0.96Changed lines
On the organization hub the 2x2 usage-stat tiles disappear and only the 'Last 30 days' eyebrow renders when the usage query is paused (offline), because OrgUsageStats keys its skeleton off React Query
isLoading(isPending && isFetching), which is false for a paused query; it must useisPending, as the sibling low-balance sheet already documents for this exact state.Code trace:
apps/mobile/src/components/organization/org-usage-stats.tsx:38 changed in 6e24929a7d044ac77b9e8d97fdd7da4502eeb420. Sense check (jev): probability 0.91Changed lines
Owner request