Skip to content

fix(mobile): make Android subscription usage widgets scrollable - #13474

Merged
juliusmarminge merged 4 commits into
pingdotgg:mainfrom
tris203:t3code/fix-subscription-usage-wording
Sep 25, 2026
Merged

juliusmarminge merged 4 commits into
pingdotgg:mainfrom
tris203:t3code/fix-subscription-usage-wording

Conversation

@tris203

@tris203 tris203 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Android subscription widgets now scroll inside their container, show the entry count in the header using the app's existing Title (N) convention, and label the timestamp “Last checked”. Tapping a row still opens Usage → Limits.

Why

With Codex and OpenCode configured, the widget invented a Claude placeholder and appended a misleading “+N more” to the date. Its height estimate also left usable space empty and hid real limits. Snapshots now include only configured usage-capable providers or connected usage-source accounts, and Android receives the complete list. iOS keeps its existing bounded timeline and handles the newly possible empty snapshot.

UI Changes

Android 16 emulator, identical compact widget size and synthetic usage data. “One provider” means one usage-capable provider: Codex plus OpenCode configured. The header count is usage entries, not providers.

Configuration Before After
One usage provider: Codex (2 limits), plus OpenCode
Multiple usage providers: Codex + Claude (6 limits)
scroll.mp4
Last entries after scrolling

Validation

  • 16 focused subscription snapshot tests pass, including Codex/Claude with OpenCode, expired and empty snapshots, and all 20 Android limits versus the existing iOS bound.
  • Mobile typecheck and scoped lint pass; Android development client builds and installs.
  • Emulator: both provider configurations, scrolling through all six entries with fixed header/footer, and row tap opening Usage → Limits.
  • Web/desktop and wire contracts are unaffected. iOS rendering was typechecked; native iOS verification was not run on this Linux host.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Implemented with GPT-6 via Codex.

Summary by CodeRabbit

  • New Features

    • Android subscription usage widgets support scrolling through the full list of available limits and show a count of entries.
    • Configured providers can appear even when usage data is unavailable, with a “No limits available” message.
    • Empty subscription states display updated availability messaging.
  • Bug Fixes

    • Unsupported or unavailable providers no longer appear as subscription entries.
    • Android subscription widgets are enabled on Android 12L and later.
  • Documentation

    • Clarified the Android widget’s minimum supported version.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 24, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The PR replaces Android's static widget rows with a native scrollable collection and changes shared provider filtering, empty states, and Android version availability. These changes alter existing user-facing defaults across production widget paths, despite focused tests and no schema or infrastructure impact.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 94484e94-3c3a-4a14-b847-b9d854ce061a

📥 Commits

Reviewing files that changed from the base of the PR and between 1c68e01 and c4fe91e.

📒 Files selected for processing (8)
  • apps/mobile/modules/t3-subscription-widget/android/src/main/AndroidManifest.xml
  • apps/mobile/modules/t3-subscription-widget/android/src/main/java/expo/modules/t3subscriptionwidget/SubscriptionUsageWidget.kt
  • apps/mobile/modules/t3-subscription-widget/android/src/main/res/values-v32/bools.xml
  • apps/mobile/modules/t3-subscription-widget/android/src/main/res/values/bools.xml
  • apps/mobile/src/widgets/SubscriptionUsage.tsx
  • apps/mobile/src/widgets/subscriptionUsageSnapshot.test.ts
  • apps/mobile/src/widgets/subscriptionUsageSnapshot.ts
  • docs/user/usage.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/mobile/src/widgets/SubscriptionUsage.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The snapshot builder now selects eligible providers and supports platform-specific window limits. The Android widget now displays rows through a collection view and uses version-based receiver availability.

Changes

Subscription Usage Widgets

Layer / File(s) Summary
Provider selection and window limits
apps/mobile/src/widgets/subscriptionUsageSnapshot.ts, apps/mobile/src/widgets/SubscriptionUsageCoordinator.tsx, apps/mobile/src/widgets/SubscriptionUsage.tsx, apps/mobile/src/widgets/subscriptionUsageSnapshot.test.ts
The snapshot builder filters provider entries and accepts a configurable window limit. The coordinator supplies an unlimited limit on Android and six on iOS. The UI renders an empty-state message when there are no providers, and tests cover provider selection and window limits.
Android collection rendering and availability
apps/mobile/modules/t3-subscription-widget/android/src/main/AndroidManifest.xml, apps/mobile/modules/t3-subscription-widget/android/src/main/java/.../SubscriptionUsageWidget.kt, apps/mobile/modules/t3-subscription-widget/android/src/main/res/layout/t3_subscription_widget.xml, apps/mobile/modules/t3-subscription-widget/android/src/main/res/values*/..., docs/user/usage.md
The widget sends all rows through a RemoteViews collection and updates its title and footer based on rows with quota windows and check time. Collection intents use mutable flags and distinct request codes. Receiver availability is false by default and true from Android API 32; the documentation states that Android 12L or later is required.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant SubscriptionUsageWidget
  participant RemoteViews
  participant AndroidWidgetHost
  SubscriptionUsageWidget->>RemoteViews: Set RemoteCollectionItems and collection adapter
  RemoteViews->>AndroidWidgetHost: Provide collection rows for display
Loading

Merge Risk: ⚪ Minimal · up to c4fe9

The Android widget changes and provider filtering have no identified issue requiring a fix before merge. Normal checks can proceed.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 5 files. (4 skipped: 4… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: making Android subscription-usage widgets scrollable.
Description check ✅ Passed The description includes all required sections, explains the change and rationale, documents UI changes with before/after screenshots and a video, and completes the checklist. It also records validati…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 5 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

juliusmarminge and others added 2 commits September 24, 2026 17:29
Servers report default-enabled drivers such as Claude even when their CLI
is missing, so the widget still showed a Claude placeholder. Only show
providers that are installed and not API-key accounts without subscription
limits.

The Android widget now requires Android 12L (API 32), where the platform
collection API needs no compat service. This drops core-remoteviews and
its service. The header counts limits, not placeholder rows.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@juliusmarminge
juliusmarminge merged commit 59abcd6 into pingdotgg:main Sep 25, 2026
22 of 23 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 25, 2026
## What's Changed
* fix(web): sidebar Back always returns to the main app by @t3dotgg in pingdotgg/t3code#13516
* fix(desktop): desktop updates reconnect in seconds, not minutes by @t3dotgg in pingdotgg/t3code#12006
* fix(connect): remove tunnels after hosts go offline by @t3dotgg in pingdotgg/t3code#9386
* fix(mobile): capture a lit 6.9-inch lock screen in the agent-activity showcase by @juliusmarminge in pingdotgg/t3code#13522
* feat(grok): offer one-click updates through `grok update` by @juliusmarminge in pingdotgg/t3code#13523
* fix(mobile): make Android subscription usage widgets scrollable by @tris203 in pingdotgg/t3code#13474
* fix(web): keep sidebar terminal pulses in sync by @t3dotgg in pingdotgg/t3code#12962
* feat(web): add iPhone Duo 3D controls by @juliusmarminge in pingdotgg/t3code#12813
* fix(relay): export tunnel cleanup counters to Axiom by @juliusmarminge in pingdotgg/t3code#13528
* fix(server): Grok accounts with no usage yet no longer vanish from Limits by @jakeleventhal in pingdotgg/t3code#12799
* fix(server): report the Grok account email so usage limits merge across environments by @jakeleventhal in pingdotgg/t3code#12588
* feat(web): add usage page keybinding by @jakeleventhal in pingdotgg/t3code#9434
* chore: clear Effect language service suggestions by @juliusmarminge in pingdotgg/t3code#13536
* ci(relay): add a forced manual relay deploy by @juliusmarminge in pingdotgg/t3code#13550
* fix(web): selected text stays visible on a revealed file line by @t3dotgg in pingdotgg/t3code#13548
* fix(web): collapsed composer bar stops flipping its labels while you scroll by @t3dotgg in pingdotgg/t3code#13555
* fix(clients): sync status no longer flickers when opening running threads by @t3dotgg in pingdotgg/t3code#13551
* fix(server): newer Codex models get T3 Code's instructions again by @t3dotgg in pingdotgg/t3code#13547


**Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260924.2223...v0.0.43-nightly.20260925.2237

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

Labels

size:L 100-499 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.

2 participants