GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(mobile): live activity toggle no longer re-links saved environments by Deji-Techh · Pull Request #32779 · pingdotgg/t3code

Conversation

@Deji-Techh

@Deji-Techh Deji-Techh commented Nov 8, 2026

Copy link
Copy Markdown

Problem

Turning Live Activity Updates (iOS) or Ongoing Agent Activity (Android) on in Settings → Notifications fails on every device with:

Ongoing activity unavailable
Could not obtain environment link proof: Invalid managed endpoint origin.

The toggle re-linked every saved environment that grants relay:write through the host's POST /api/connect/link-proof. Since #19271, that endpoint signs a proof only when the request arrives on the loopback origin it names (the WSL desktop-bootstrap session is the sole exception). A phone reaches the host over the LAN, Tailscale, or the T3 Connect tunnel, so the proof is always refused and the whole toggle rolls back.

Reproduced on this machine with the Android app: the host logged two POST http://192.168.0.196:3773/api/connect/link-proof requests from the phone (okhttp, 400) at 02:30:57 and 02:31:51, each failing in environment.cloud.makeLinkProof with CloudLinkOriginInvalidError: Invalid managed endpoint origin. The desktop app on the host succeeded over 127.0.0.1:3773 in the same window.

Change

The toggle now only updates this device's relay registration preference and no longer links environments from the phone:

  • The relay already decides Live Activity and ongoing-activity delivery per device from that preference.
  • Every desktop, web, and CLI link already enables activity updates for the environment (liveActivitiesEnabled: true), so the phone relink was redundant.
  • Removed the mobile environment-link module and its tests, the liveActivityPreferences wrapper, refreshManagedRelayEnvironments, and the Clerk token / relay:write plumbing in the settings screen.
  • Android registrations now apply the new native activity configuration before the relay write and restore the stored configuration if the permission lookup, preference update, or relay write fails, unless a newer registration has configured the device since.

The server's loopback-only link-proof check is unchanged. This follows the direction in #27412 and is the mobile counterpart to #32426's clearer message for remote desktop clients.

Scope and approval

Fixes #27412

This is @juliusmarminge's #27432 rebased onto current main after it went conflicting (DIRTY). The only substantive adjustment is a typing fix for the newer Effect version on main (Effect.onError cleanup inference in remoteRegistration.ts). If you would rather land the original branch, close this and rebase #27432 instead.

Verification

  • pnpm --filter @t3tools/mobile typecheck: exits 0. Only the pre-existing effect(schemaClassMissingBrand) suggestions remain.
  • Mobile unit suite: 281 test files, 3309 tests pass.
  • vp test run src/features/agent-awareness/remoteRegistration.test.ts: 17 passed.
  • vp fmt --check and vp lint on the changed files pass.
  • Not checked on a physical device: enabling still needs a signed-in T3 Connect account, which this machine does not have. The dialog text changes were not captured, and the pre-commit knip task could not run here because only the mobile dependency graph is installed (it fails resolving untouched apps/web and apps/marketing configs); CI covers it.

AI-assisted: diagnosed from the host's server trace for the real failing request, then rebased and re-verified locally.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@juliusmarminge
fix(mobile): live activity toggle no longer re-links saved environments
799f229
Turning Live Activity updates (Android ongoing activity) on or off re-linked
every saved environment through the host's link-proof endpoint, which only
accepts loopback hosts. A real phone reaches the host over LAN, Tailscale or
the tunnel, so the toggle always failed with "Invalid managed endpoint origin."

The relay already gates Live Activity delivery on each device's registration
preference, and desktop, web and CLI links enable activities at the link
level. The toggle now only updates this device's registration preference. The
unused mobile environment-link module and its Clerk token plumbing are gone.

Android registrations restore the stored native activity configuration when
the permission lookup, preference update, or relay write fails, unless a
newer registration has configured the device since.

Fixes pingdotgg#27412
Rebased from pingdotgg#27432 onto current main.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T02:06:28.214218Z 799f229 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Nov 8, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 799f229

Macroscope's review found this PR approvable — The activity toggle now changes only this device's preference instead of re-linking saved environments. Android failure recovery restores prior native settings, keeping the change bounded without altering product defaults or access permissions.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot]
macroscopeapp Bot approved these changes Nov 8, 2026
View reviewed changes
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 8, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 799f229f48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/mobile/src/features/settings/SettingsNotificationsRouteScreen.tsx
clerkToken: tokenResult.value,
connections,
}),
updateAgentAwarenessRegistrationPreferences({ liveActivitiesEnabled: true }),

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 8, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore legacy environment opt-ins when enabling

When an upgraded device has a relay link whose liveActivitiesEnabled was set to false by an older mobile version, this path updates only the device registration. The relay still filters out activities for that environment in AgentActivityRows.listForUser, so the toggle can report success while no activities arrive until the link is re-enabled elsewhere. Preserve a reset or migration path for those legacy link preferences.

AGENTS.md reference: AGENTS.md:L75-L75

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: eb14ddb
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c43a89f5-41f5-4a07-a5e1-d385e4641d21
Commits

Reviewing files that changed from the base of the PR and between 30747bd and 64bc52a.

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

No actionable comments were generated in the recent review.

Walkthrough

The mobile Live Activity toggle now updates device registration preferences without relinking saved environments. Android registration configures notification preferences before push-token lookup and conditionally restores prior preferences after errors.

Changes: Live Activity preference flow

Layer / File(s) Summary
Direct device preference updates
apps/mobile/src/features/settings/SettingsNotificationsRouteScreen.tsx, apps/mobile/src/features/agent-awareness/liveActivityPreferences.ts, apps/mobile/src/features/agent-awareness/liveActivityPreferences.test.ts, apps/mobile/src/features/cloud/linkEnvironment.ts, apps/mobile/src/features/cloud/linkEnvironment.test.ts, apps/mobile/src/features/cloud/managedRelayState.ts
The settings screen updates the device registration preference when enabling or disabling Live Activity updates. It uses updating status in place of linking. The previous environment-linking workflow, related tests, and managed-relay refresh helper are removed.
Guarded Android preference restoration
apps/mobile/src/features/agent-awareness/remoteRegistration.ts, apps/mobile/src/features/agent-awareness/remoteRegistration.test.ts
Android notification preferences are configured before push-token lookup. Errors restore stored preferences only when the registration generation and configuration-write counter are still current. Tests cover relay and permission failures, plus a newer update following an older failed request.

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

Severity of issue fixed: Medium

Possibly related issues

  • Issue 31534 — Reports a mobile Live Activity toggle failure during environment linking. This change removes that relinking step from the toggle flow.
  • Issue 31753 — Reports the preference reverting after disabling. This change updates the device registration preference without relinking environments.

Possibly related PRs

  • pingdotgg/t3code#32469 — Both changes address mobile agent-awareness preference updates and registration sequencing.
  • pingdotgg/t3code#27432 — Both changes remove phone-side environment relinking and update the device preference directly.
  • pingdotgg/t3code#32592 — Both changes modify the mobile notification settings flow and Live Activity update operation.

Suggested reviewers: juliusmarminge, pixpmusic

Merge Risk: Minimal · previous review 30747

The Live Activity toggle now updates the device registration preference directly instead of relinking saved environments. No actionable merge-blocking risk was found, though the change was not verified on a physical device.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title is concise, uses the required conventional format, and clearly describes the main change: the mobile Live Activity toggle no longer re-links saved environments.
Description check Passed The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the failure, implementation, linked issue, test results, and known verification limits. It…
Linked Issues check Passed Issue [#27412] requires the mobile Live Activities toggle to work without obtaining a new environment link proof. The settings screen now updates only the device relay registration preference. It no l…
Out of Scope Changes check Passed The changes stay within issue [#27412]. The deleted link modules, tests, managed-relay refresh, and settings authentication plumbing remove the phone-side relinking that caused the failure. The settin…
Full details: Description check

Explanation

The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the failure, implementation, linked issue, test results, and known verification limits. It also states that physical-device testing and UI screenshots were not completed.

Full details: Linked Issues check

Explanation

Issue [#27412] requires the mobile Live Activities toggle to work without obtaining a new environment link proof. The settings screen now updates only the device relay registration preference. It no longer reads a Clerk token or calls the mobile environment-link flow. The removed flow included the phone-side link-proof request. The server loopback-only check remains unchanged because no server file changed. Android registration now applies activity configuration before the relay write and restores the stored configuration on failure. New tests cover relay failure, permission lookup failure, and stale concurrent registration. The reported typecheck and mobile test suite pass. The relay implementation is outside this repository, so end-to-end delivery cannot be independently verified here, but the required mobile code path is implemented.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue [#27412]. The deleted link modules, tests, managed-relay refresh, and settings authentication plumbing remove the phone-side relinking that caused the failure. The settings screen changes update the device preference directly. The Android registration ordering and rollback changes support the same toggle and include focused tests. The Effect typing adjustment supports the changed registration code on the current main branch. No unrelated feature or server security change is demonstrated.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: b3fdf2b
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d72f8312-f5ae-4a9c-928a-157c7781eecd
Commits

Reviewing files that changed from the base of the PR and between 799f229 and 30747bd.

Files selected for processing: 2

  • apps/mobile/src/features/agent-awareness/remoteRegistration.test.ts
  • apps/mobile/src/features/agent-awareness/remoteRegistration.ts

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 9, 2026
fix(mobile): keep Android live activity independent of alerts #24933
Merged
fix(mobile): stop notifications for disabled environments #32469
Closed
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/mobile-live-activ…
30747bd
…ity-relink

# Conflicts:
#	apps/mobile/src/features/agent-awareness/remoteRegistration.test.ts
@juliusmarminge GitCafe Production

juliusmarminge commented Nov 11, 2026

Copy link
Copy Markdown
Member

The automated pipeline stopped on this pull request and will not merge it:

the proof has no capture anyone can open:

  • Permanent blocker: T3 Connect is unavailable on this VM, preventing the required signed-in, already-linked-host starting state.
  • Base toggle rollback and the reported invalid managed endpoint origin error were not observed.
  • Head enable/disable persistence and absence of another environment link-proof request were not observed.
  • No captures exist and no ghdrop upload was attempted; no public evidence URLs are available.

It stays open for a person to finish or close.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ristoxy ristoxy mentioned this pull request Nov 12, 2026
[Bug]: iOS TestFlight 3.0.0 (198) receives Live Activities but no completion notifications #26678
Closed
2 tasks done
@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 13, 2026
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/mobile-live-activ…
64bc52a
…ity-relink
@juliusmarminge juliusmarminge added takeover:needs-julius Takeover done; route gate says Julius decides and removed takeover:in-progress A takeover lead is working on this PR labels Nov 13, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Nov 17, 2026
fix(connect): restrict relay configuration and token destinations #37823
Merged
@github-actions

github-actions Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.

See the conflict window.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 17, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Nov 19, 2026
fix(mobile): device registration and Live Activity updates stay in Effect #38913
Merged
@shivamhwp

shivamhwp commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Note

Claude Opus 5.5 responding on behalf of shivam

Thanks for the PR. Closing as fixed by #37823 (merged in a941ab5). Julius closed #27412 with it: enabling Live Activity Updates for an already-linked host now updates its preference with relay:write without requesting a new link proof, so the "Invalid managed endpoint origin" error no longer happens over LAN or tunnel.

If the toggle still fails on current main with an updated mobile app and server, reply here with the steps and it can be reopened.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shivamhwp shivamhwp closed this Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments
@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. size:L 100-499 changed lines (additions + deletions). takeover:needs-julius Takeover done; route gate says Julius decides vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: iOS Live Activities toggle always fails with "Invalid managed endpoint origin" (link-proof called over LAN/tunnel, host accepts loopback only)

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Deji-Techh @juliusmarminge @shivamhwp
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.