t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: iOS: camera stays active after leaving Add environment screen

Open kairan opened this issue 1 month ago • 2 comments

Summary

On T3 Code (iOS, ALPHA), the camera used for the QR scanner on Add environment remains active after leaving that screen. The green iOS camera privacy indicator stays on on the main Threads screen, and Settings → Privacy reports Camera, a moment ago for T3 Code.

Expected

Camera access should stop when the Add environment flow is dismissed (back navigation or successful pairing), and no camera indicator should appear on unrelated screens.

Actual

After opening Add environment (QR scanner visible) and navigating back to Threads, the camera indicator remains on. This suggests the capture session is not torn down on unmount/blur.

Workaround: force-quit the app from the iOS app switcher. In-app navigation does not release the camera.

Reproduction

  1. Open T3 Code on iPhone.
  2. Go to Add environment (QR scanner area is shown).
  3. Navigate back to Threads without completing pairing (or after using manual entry).
  4. Observe the green camera dot in the status bar / Dynamic Island area.
  5. Open iOS Privacy controls — T3 Code still shows recent camera access.
  6. Force-quit the app — indicator clears.

Environment

  • App: T3 Code ALPHA (iOS)
  • Device: iPhone
  • Date observed: 2026-10-22

Screenshots

See comment below (redacted: pairing fields, environment names, thread list content).

Notes

Likely fix: stop/release camera in screen cleanup (useEffect return), navigation blur handler (useFocusEffect), or when the scanner component unmounts.

kairan avatar Oct 22 '26 20:10 kairan

Screenshots (redacted)

Sensitive fields are covered with opaque bars only (pairing address/code, camera preview, relay names, thread titles/repos). iOS privacy shot is cropped to the Privacidade → T3 Code → Câmara row.

Add environment

Threads screen — camera indicator

iOS Privacy indicator

kairan avatar Oct 22 '26 20:10 kairan

Closing as not reproducible: on an iPhone 14 Pro (iOS 27.0) the camera indicator cleared after leaving Add environment (back, swipe-down, and successful pairing). The "Camera, a moment ago" entry in Settings → Privacy is expected after any scan. If this still happens, please reopen with your iOS version and app build. Related idea: https://github.com/pingdotgg/t3code/discussions/23880

kairan avatar Oct 22 '26 22:10 kairan