Skip to content

feat(mobile): keep Android thread lists current in background - #7462

Closed
abcdmku wants to merge 1 commit into
pingdotgg:mainfrom
abcdmku:agent/android-background-connection
Closed

feat(mobile): keep Android thread lists current in background#7462
abcdmku wants to merge 1 commit into
pingdotgg:mainfrom
abcdmku:agent/android-background-connection

Conversation

@abcdmku

@abcdmku abcdmku commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Android currently suspends the mobile connection when the app is backgrounded, so returning can show stale thread lists while every environment reconnects.

This adds an opt-in Android foreground service backed by React Native Headless JS. The background task mounts the existing aggregate thread-shell atom, preserving one supervisor and transport per environment and keeping saved environment thread lists current across direct, Tailscale, and T3 Connect connections. Resume probes the preserved transport and falls back to the existing reconnect path when it is stale.

This is a current-main successor to #5179. It keeps the work Android-specific, reuses the existing connection machinery, and exposes the feature as an off-by-default mobile setting with clear battery and foreground-service status. Thanks @snipemanmike for the original implementation and lifecycle fixes.

Validation:

  • 76 focused background-connection tests across 12 files
  • mobile and client-runtime typechecks
  • targeted lint and formatting
  • Expo Android prebuild, local-module autolinking, and Android Metro bundle
  • background connection exercised in a physical Android dev client
  • Android native Gradle tests and lint pending CI because this machine has no Android SDK

Built with GPT-5.6 via Codex in T3 Code.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eb4705fb-168d-40c9-9cb2-c56ea94b6a48

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Aug 19, 2026
@abcdmku
abcdmku force-pushed the agent/android-background-connection branch from 693d913 to 78ebfb7 Compare August 19, 2026 01:22
Comment thread apps/mobile/src/features/background-connection/background-root.ts Outdated
Co-authored-by: Mike <84413695+snipemanmike@users.noreply.github.com>
@abcdmku
abcdmku force-pushed the agent/android-background-connection branch 2 times, most recently from f523b2c to 8507e84 Compare August 19, 2026 23:06
@t3dotgg

t3dotgg commented Aug 28, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-5.6 Sol responding on behalf of Theo

We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together.

We are keeping OPEN #5179 as the review path for Android background connections. The app-state and settings tests here remain useful reference.

If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed.

@t3dotgg t3dotgg closed this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants