Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(mobile): pool usage limits across selected environments #10334

Mergedjuliusmarmingemerged 3 commits intomain fromrefs/pull/10334/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

Mobile Usage → Limits still listed each environment separately after web adopted pooled quotas. It now uses the same account deduplication and reset ordering, with numbered bars and tappable rows that open account details and the existing reset confirmation.

The Usage header filters both tabs and refreshes. Its menu shows each environment’s reporting state; a small amber dot marks selected environments still loading. The tab, period, and metric controls animate their selected pill and respect Reduce Motion.

Before / after

Same iPhone 17 Pro simulator, environments, all-environments selection, and top scroll position. Cropped to the Usage sheet. Before uses the base renderer at 00d6109cbb; live quota advanced by one percentage point between captures. The before renderer shows a duplicate cached account that the pooled view deduplicates.

BeforeAfter
Per-environment mobile limitsPooled mobile limits with a shared environment filter

Interaction recording

Tab/metric/period transitions, account details, reset confirmation cancelled, and deselecting the connected environment so only cached limits remain.

https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/c5172832d285e3aa/mobile-usage-flow.mp4

Verification

  • Mobile and shared typechecks pass; 47 quota and usage-merge tests plus 6 environment-selection regressions pass.
  • Scoped lint passes with one existing ControlPill ref warning. React Doctor: 91/100, no errors.
  • iOS simulator: both filter directions, empty selection and All reset, native menu checkmarks/status, weekly-only Codex accounts, four-account Claude pools, account details, and reset cancellation. No real credits spent.
  • Android paths typechecked; no Android emulator visual pass. Existing composer quota/reset controls retained. Shared sorting uses fresh arrays compatible with Hermes.

Implemented with GPT-6 via Codex.

Note

Add pooled usage limits and environment selection to mobile usage screen

  • Users can now include or exclude environments from usage totals and limit refreshes via a header filter that shows per-environment connection and compatibility status
  • The Limits tab renders pooled subscription limits per provider window, with colored quota segments, hatched reset portions, and numbered account rows ordered by reset timing
  • Pressing an account segment or row opens the new UsageLimitAccountScreen detail view showing plan, reset timing, source environments, masked email, and reset-credit actions
  • Removed the old per-provider and source-account limit row components in UsageLimitsSection.tsx; the exported section is now supplied by UsageLimitsPooled.tsx
  • SegmentedControl now exposes each option as an individually labeled selectable control with an animated sliding background
  • Behavioral Change: EnvironmentUsageStatus gains a connection-state field; useUsage and useRefreshLimits now restrict to selected environments (null selection includes all). The removed providerLimitsLabel helper and legacy UsageLimitsSection grouping must not be referenced by out-of-tree code.
Macroscope summarized 43f4cae.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. Bugbot is paused — on-demand spend limit reached

      Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

      A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

    3. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.6 KiB13.6 KiB+9 B (+0.1%)15.1 KiB✅
      CodexThread snapshot wire7.0 KiB7.0 KiB−2 B (−0.0%)7.3 KiB✅
      CodexLive turn WebSocket wire6.6 KiB6.6 KiB+11 B (+0.2%)7.8 KiB✅
      CodexLive turn WebSocket decoded57.1 KiB57.1 KiB0 B (0.0%)66.4 KiB✅
      CodexLive turn messages10100 (0.0%)21✅
      ClaudeTotal thread wire13.6 KiB13.5 KiB−37 B (−0.3%)15.1 KiB✅
      ClaudeThread snapshot wire7.0 KiB7.0 KiB0 B (0.0%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.5 KiB6.5 KiB−37 B (−0.6%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded57.8 KiB57.8 KiB−44 B (−0.1%)66.4 KiB✅
      ClaudeLive turn messages98−1 (−11.1%)21✅

      Baseline: e5d086c · PR result: 43f4cae · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 113.8 KiB
      • Claude decoded thread snapshot: 114.5 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    4. Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This PR introduces a substantial mobile usage feature with a new account-details workflow, pooled quota rendering, and environment-scoped aggregation and refresh behavior. Because it changes existing runtime behavior across the usage screen and shared production code, it warrants human review.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. juliusmarminge merged thisb155c21

    6. juliusmarminge closed this

Sign in to join this conversation.