Skip to content

fix(mobile): retain organization hub values and expose retry - #7928

Open
iscekic wants to merge 1 commit into
mainfrom
drain/organization-hub-query-states
Open

iscekic wants to merge 1 commit into
mainfrom
drain/organization-hub-query-states

Conversation

@iscekic

@iscekic iscekic commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Change

  • Keep organization usage labels visible with cached totals or em dash placeholders.
  • Show unavailable status and Retry for paused or failed usage/settings reads without cached data.
  • Keep cached low-balance settings visible and preserve configuration navigation once data exists.
  • Add regression coverage and document connectivity behavior.

Verification

  • Android emulator against an isolated localhost backend and seeded fake account: airplane mode with Wi-Fi/data disabled, first hub visit shows labeled placeholders and Retry on usage and low-balance settings.
  • Exercised usage Retry and restored connectivity; numeric usage and configured settings load.
  • Reopened the hub in airplane mode with cached data: totals and settings remain visible alongside the offline banner.
  • Targeted mounted suites: 10 tests passed.
  • Mobile typecheck and full mobile lint passed; formatting and git diff --check passed.

Proxy answers

The owner's proxy gave these answers in the owner's place.

  1. Question: Offline interaction: When low-balance settings have no cached data and are offline or failed, should the row become a Retry action rather than opening configuration? Cached settings would retain normal navigation.
    Answer: Retry unavailable row
    Confidence: 0.75 · Precedent: Make plans cover the retryable-error state; session df491946927a: owner listed the happy, loading, retryable-error, non-retryable-error, and empty states. The brief also asks for an error with a Retry action.

@iscekic iscekic added drain Work item from the findings drain explorer:android Finding surfaced by the Android explorer labels Oct 17, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The organization hub now keeps usage tiles labeled with cached totals or em-dash placeholders and exposes Retry for paused or failed usage/settings reads; the changed lines are consistent with the existing query-state and accessibility patterns and I found no high-confidence defects.

Files Reviewed (5 files)
  • apps/mobile/README.md
  • apps/mobile/src/components/organization/hub-screen.tsx
  • apps/mobile/src/components/organization/hub-screen.mounted.test.tsx
  • apps/mobile/src/components/organization/org-usage-stats.tsx
  • apps/mobile/src/components/organization/org-usage-stats.mounted.test.tsx

Details of the review:

  • lowBalanceUnavailable and unavailable correctly require data == null, so cached payloads keep their values and the low-balance row keeps navigating once data exists; the removed "missing payload is not off" invariant is preserved (orgWithMembers.data != null still gates off).
  • isPaused / isError / isFetching / refetch are all present on the tRPC @tanstack/react-query results in this repo, and queryError.offlineTitle, common.somethingWentWrong, and common.retry exist in en.json.
  • organizationMemberProcedure backs organizations.usageStats, so the newly always-visible section cannot regress into a permanent permission error for non-billing roles.
  • accessibilityRole="alert" on a raw Text and the trailing prop on ConfigureRow are established patterns in this codebase, so no convention deviation is introduced.
  • No new listeners, timers, subscriptions, or effects were added; both new suites unmount their renderers, and the added void refetch() calls are React Query managed, so no memory-leak path is introduced.

Reviewed by deepseek-v4.1-flash · Input: 74K · Output: 20K · Cached: 1.1M

Review guidance: REVIEW.md from base branch main

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drain Work item from the findings drain explorer:android Finding surfaced by the Android explorer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant