Skip to content

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

Closed as not planned

Description

@bompus

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 8d199b4 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 8d199b4
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).

Activity

  1. bompus commented on Oct 13, 2026

    @bompus
    ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions