Skip to content

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

Merged
juliusmarminge merged 3 commits into
mainfrom
t3code/mobile-pooled-limits
Sep 6, 2026
Merged

feat(mobile): pool usage limits across selected environments#10334
juliusmarminge merged 3 commits into
mainfrom
t3code/mobile-pooled-limits

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 6, 2026

Copy link
Copy Markdown
Member

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.

Before After
Per-environment mobile limits Pooled 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.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Sep 6, 2026
Comment thread apps/mobile/src/features/usage/UsageRouteScreen.tsx
Comment thread apps/mobile/src/features/usage/UsageRouteScreen.tsx Outdated
Comment thread apps/mobile/src/features/usage/UsageRouteScreen.tsx
Comment thread apps/mobile/src/features/usage/UsageRouteScreen.tsx
@cursor

cursor Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.6 KiB +9 B (+0.1%) 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.0 KiB −2 B (−0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 6.6 KiB +11 B (+0.2%) 7.8 KiB
Codex Live turn WebSocket decoded 57.1 KiB 57.1 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 10 10 0 (0.0%) 21
Claude Total thread wire 13.6 KiB 13.5 KiB −37 B (−0.3%) 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.0 KiB 0 B (0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.5 KiB 6.5 KiB −37 B (−0.6%) 7.8 KiB
Claude Live turn WebSocket decoded 57.8 KiB 57.8 KiB −44 B (−0.1%) 66.4 KiB
Claude Live turn messages 9 8 −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.

@macroscopeapp

macroscopeapp Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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.

@juliusmarminge
juliusmarminge merged commit b155c21 into main Sep 6, 2026
34 of 35 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/mobile-pooled-limits branch September 6, 2026 07:57
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 6, 2026
## What's Changed
* feat(usage): pool subscription limits per provider across accounts and environments by @juliusmarminge in pingdotgg/t3code#10300
* chore(web): remove usage limits demo fixtures by @juliusmarminge in pingdotgg/t3code#10330
* fix(web): expose error disclosure state by @saphid in pingdotgg/t3code#10125
* fix(web): name the editor picker accurately by @saphid in pingdotgg/t3code#10124
* fix(web): make task row states readable by @saphid in pingdotgg/t3code#10128
* fix(web): explain hosted connection prerequisites by @saphid in pingdotgg/t3code#10129
* fix(web): name combobox chip removal targets by @saphid in pingdotgg/t3code#10127
* fix(marketing): present the Git workflow as an illustration by @saphid in pingdotgg/t3code#10130
* feat(mobile): pool usage limits across selected environments by @juliusmarminge in pingdotgg/t3code#10334
* fix(release): space automatic nightlies at least six hours apart by @t3dotgg in pingdotgg/t3code#10272
* refactor(web): share bulk thread deletion between sidebars by @t3dotgg in pingdotgg/t3code#10106
* refactor(client): share tool outcome rules by @t3dotgg in pingdotgg/t3code#10122
* refactor(server): share Claude result status and error mapping by @t3dotgg in pingdotgg/t3code#10296
* fix(server): settle inactive threads without a PR lookup by @t3dotgg in pingdotgg/t3code#10103
* fix(ssh): report remote stop failures without losing ownership by @t3dotgg in pingdotgg/t3code#10105
* perf(server): stop scanning old OpenCode parts by @t3dotgg in pingdotgg/t3code#10116
* perf(server): avoid full thread reads on turn start by @t3dotgg in pingdotgg/t3code#10108
* perf(web): skip checkpoint map rebuilds while streaming by @t3dotgg in pingdotgg/t3code#10118
* perf(server): skip plan bodies in thread summaries by @t3dotgg in pingdotgg/t3code#10341
* fix(server): skip disabled provider instances for text generation fallback by @t3dotgg in pingdotgg/t3code#10346
* fix(server): capture checkpoints before refreshing PR status by @t3dotgg in pingdotgg/t3code#10347
* fix(web): keep manual panel choices during a turn by @t3dotgg in pingdotgg/t3code#10113
* fix(threads): keep completed requests closed across clients by @t3dotgg in pingdotgg/t3code#10123
* perf(server): finish runtime messages without full thread reads by @t3dotgg in pingdotgg/t3code#10120
* refactor(server): let adapters declare context compaction by @t3dotgg in pingdotgg/t3code#10112
* fix(server): link thread PRs without an open client by @t3dotgg in pingdotgg/t3code#10101


**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260906.1293...v0.0.39-nightly.20260906.1303

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260906.1303
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant