| … | … | @@ -512,24 +523,135 @@ const installShellEnvironment = ( | |
| 633 | + | ), | |
| 634 | + | ); | |
| 635 | + | } | |
| 636 | + | yield* Effect.forkIn(refresh, scope); | |
🟠 High shell/DesktopShellEnvironment.ts:636
When T3CODE_TELEMETRY_ENABLED=false is set only by the login shell, installIntoProcess returns before refresh discovers it, so AnalyticsService can initialize with telemetry enabled and continue sending analytics despite the opt-out. This variable is not cached, and the later environment update cannot change the configuration already captured by the service; resolve this privacy-sensitive setting before analytics starts or keep analytics disabled until discovery completes.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/desktop/src/shell/DesktopShellEnvironment.ts around line 636: |
| 2 | |
| 3 | When `T3CODE_TELEMETRY_ENABLED=false` is set only by the login shell, `installIntoProcess` returns before `refresh` discovers it, so `AnalyticsService` can initialize with telemetry enabled and continue sending analytics despite the opt-out. This variable is not cached, and the later environment update cannot change the configuration already captured by the service; resolve this privacy-sensitive setting before analytics starts or keep analytics disabled until discovery completes. |
Note
Generated by GPT 6.1 Sol
Confirmed and fixed in 3437923ec9. The desktop marks shell discovery as pending in the backend environment. Cached snapshots cannot clear that marker; only a successful fresh discovery can. Analytics drops events while discovery is pending and checks the discovered opt-out before recording or sending, so updating the environment no longer leaves a stale enabled decision behind. Startup remains nonblocking, and a failed shell probe keeps analytics disabled.
The regression test reproduced the issue before the fix by sending both a pre-discovery event and an opted-out event. With the fix only the explicitly enabled event is sent. vp run check:changed passes, including 91 tests. The update also merges the current origin/main cleanly.