Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Mobile worktree setup card and "Working for" label re-render every second while their thread screen is hidden #18160

Closedbompus(GitHub profile, opens in a new tab) opened this issue 1 comment

Area: apps/mobile

Steps to reproduce

  1. On mobile, open a thread whose worktree setup is running, or that is working.
  2. Push another route over the thread screen (Files, Review or Terminal). The thread route stays mounted underneath.
  3. Leave it there with the app in the foreground.

Expected behavior A hidden screen does no per-second work. #15397 made the working timer and the subagent bar stop ticking while their screen is hidden, using useVisibleSecondClock.

Actual behavior worktree-setup-card.tsx still runs its own setInterval clock (useSetupClock, used by the setup card and the "Working for" header above it), so the hidden thread screen re-renders once a second until the app goes to the background. On main at 8d199b4f7b this is visible in the source (useSetupClock, line 186 onward). I have not measured it on a device. #15397 reported 60 renders per minute down to 0 for the two timers it covered.

Impact: Minor bug or occasional failure Version or commit: main at 8d199b4f7b Environment: apps/mobile, not run on a device Workaround: None needed for use; it costs battery and CPU while a thread is hidden.

Proposed fix: PR #17701 replaces the local clock with the existing useVisibleSecondClock (+5/−19 lines, one file).

  1. Superseded by #18922, which has the same report filed through the triage form. Tracked there; PR #17701 now links it.

Sign in to join this conversation.