orca/mobile/scripts
Kaynan Sampaio de Camargo c408a3d852
feat(mobile): show usage reset countdown on accounts screen (#7954)
* feat(mobile): show usage reset countdown on accounts screen

Surface the rate-limit reset time ("5h resets in 3h 54m · 7d resets in
6d 7h") under the usage bars on the mobile accounts screen, matching the
desktop status-bar tooltip copy. The resetsAt timestamps already arrive
in the accounts.subscribe snapshot; this only adds the presentation.

Claude-Session: https://claude.ai/code/session_01FvjvCsc9QoyQALqvxkvDqQ

* docs(mobile): JSDoc for new usage reset selectors

Claude-Session: https://claude.ai/code/session_01FvjvCsc9QoyQALqvxkvDqQ

* refactor(mobile): per-bar reset countdown instead of combined line

Drop the redundant "5h/7d" prefixes — each countdown now renders under
its own bar ("Resets in 3h 54m"), matching the desktop tooltip copy
exactly.

Claude-Session: https://claude.ai/code/session_01FvjvCsc9QoyQALqvxkvDqQ

* Extract shared reset-countdown formatter for desktop and mobile

- Move duration/countdown formatting out of tooltip.tsx into
  src/shared/rate-limit-reset-format.ts so mobile's account-usage-state
  can reuse it instead of a duplicated copy (with tests).
- Re-export formatResetCountdown from tooltip.tsx to avoid touching
  existing import paths.
- Resend the pairing deep link once more in start-emulator.mjs since
  the first can arrive before the Expo app's JS router is ready.

---------

Co-authored-by: kaynan <kaynan.camargo@terceiro-sky.com.br>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
2026-07-13 18:56:36 -07:00
..
build-terminal-webview-engine.mjs Fix blank mobile terminal on Android devices with outdated WebViews or blocked CDN (#7186) 2026-07-03 15:22:00 -07:00
mobile-expo-cli.mjs refs/heads/handle-mobile-pull-request-issues (#6598) 2026-06-28 00:58:17 -07:00
mobile-lag-scenario.ts Fix mobile workspace parity (#6207) 2026-06-23 17:07:28 -07:00
mock-server-encryption.ts Mobile: worktree-list sidebar for tablet/foldable layouts (#5505) 2026-06-16 16:50:38 -07:00
mock-server-file-preview-data.ts Show full workspace file tree on mobile (#7289) 2026-07-06 15:41:51 -07:00
mock-server-git-state.ts feat(mobile): combine PR sidebar and checks parity (#5641) 2026-06-17 22:52:12 -07:00
mock-server-rpc-handlers.ts Fix mobile file previews (#6315) 2026-06-26 12:10:58 -07:00
mock-server-terminal-fixtures.ts Fix mobile file previews (#6315) 2026-06-26 12:10:58 -07:00
mock-server.ts feat(mobile): combine PR sidebar and checks parity (#5641) 2026-06-17 22:52:12 -07:00
prepare-android-release.mjs fix(mobile): keep Android release versionCode committed (#7271) 2026-07-03 15:26:11 -07:00
repro-terminal-colors.ts Add braces to mobile control flow (#4351) 2026-05-31 21:32:37 -07:00
repro-workspace-picker-lag.ts feat(mobile): combine PR sidebar and checks parity (#5641) 2026-06-17 22:52:12 -07:00
repro-worktree-startup-stream.ts Add braces to mobile control flow (#4351) 2026-05-31 21:32:37 -07:00
start-emulator-pairing-runtime.mjs Improve mobile emulator pairing startup (#6527) 2026-06-27 18:48:14 -07:00
start-emulator.mjs feat(mobile): show usage reset countdown on accounts screen (#7954) 2026-07-13 18:56:36 -07:00
start-expo.mjs chore(lint): adopt unicorn/prefer-import-meta-properties (error) (#6847) 2026-06-29 23:37:30 -07:00
test-subscribe.ts Add braces to mobile control flow (#4351) 2026-05-31 21:32:37 -07:00