Skip to content

iPhone app lists cross-machine delegated tasks as top-level threads; desktop nests them under their parent #26854

Closed

Description

@EtanHey

What happened

With two linked Macs, the desktop app and the iPhone app list different threads and show different section counts for the same environments. For example, Working, Snoozed and Settled read 7 / 13 / 662 on the desktop and 5 / 13 / 677 on the phone. Tasks one Mac delegates to the other through Linked environments sit under their parent on the desktop (Lineage panel). On the phone they appear as ordinary top-level threads, mostly in Done or idle. The user saw the same thread (QA video: …, a task delegated from the M1 to the M4) under its parent on the desktop and as a standalone thread on the phone.

Diagnosis

The two clients decide which threads belong in the thread list differently:

  • Desktop: filterSidebarV2VisibleThreads (apps/web/src/components/Sidebar.logic.ts) hides a thread when isShownUnderParent(ref, lineage, delegatedUnderParent) is true. That covers native subagents and tasks a linked environment delegated, whose parent the client also lists (environmentThreadShells.delegatedUnderParentAtom).
  • Mobile: the thread list (apps/mobile/src/features/threads/threadListV2.ts, around line 268) hides only lineage.relationshipToParent === "subagent". The same check is used in CommandPalette.tsx and useLinkedPullRequestActions.ts. A cross-machine delegated task has delegatedFrom set but is not a subagent, so the phone lists it at top level.

So every cross-machine delegate is counted twice across the two clients: nested on the desktop, top-level on mobile.

Steps to reproduce

  1. Link machine A to machine B.
  2. From a thread on A, run delegate_task with target.environmentId = B and let it finish.
  3. Desktop: the child appears in the parent's Lineage panel, not in the sidebar.
  4. iPhone app: the child appears as its own row in the thread list, and section counts differ from the desktop's.

Version

0.1.4-nightly.20261028.3841 (desktop and server on both Macs). iOS app version unknown.

Environment

Two Macs on macOS 26 (Darwin 25.5.0, arm64), linked over Tailscale. iPhone running the T3 Code app.

Evidence

# apps/web/src/components/Sidebar.logic.ts
!isShownUnderParent({ environmentId, threadId }, thread.lineage, delegatedUnderParent)
# apps/mobile/src/features/threads/threadListV2.ts
if (thread.archivedAt !== null || thread.lineage.relationshipToParent === "subagent") return false;

Related issues

No existing issue covers how mobile classifies delegated tasks.

Suggested direction

Minimum fix (parity): use isShownUnderParent with delegatedUnderParent in the mobile thread list, command palette and section counts too, so both clients treat cross-machine delegates the way they treat subagents.

UI suggestions from the user (desktop Lineage panel):

  1. Give delegates their own drawer. Today, cross-machine delegates sit in a loose list right under the collapsible "Previous agents" drawer, as rows like M1… on Local's MacBook Pro · Done. Put them in a "Delegated threads" drawer of their own that folds the same way, and make the rows open the thread just as subagent rows do.
  2. Or merge them into the agents drawer. Treat a cross-machine delegate as a subagent that happens to run on another machine. It goes into the same "Previous agents" drawer as native subagents, of any provider family.
  3. Show a machine icon instead of the text. In either layout, swap the wide on <machine label> text for the environment's own icon (the per-environment icon setting, e.g. laptop, which the sidebar already uses to mark other-machine threads), placed next to the duration (2m) the way subagent rows show it. That keeps rows short and the title readable. Today the title gets cut to M1… or Ter….

Fix applied or workaround

None. This is display only, and no work is lost.

Filed by

Claude Code (claude-opus-5-5), triage session started from T3 Code Desktop

Activity

  1. juliusmarminge commented on Oct 29, 2026

    @juliusmarminge
    Member

    Checked on current main (dac8b11): the mobile app already nests these tasks under their parent. The fix landed in 594f1ce (#16719, 2026-10-27), the PR that added delegate_task to linked environments.

    The mobile home list does not read raw shells. It reads environmentThreadShells.navigationThreadShellsAtom (apps/mobile/src/features/home/HomeRouteScreen.tsx), which drops a thread when isShownUnderParent(ref, lineage, delegatedUnderParent) is true. That is the same predicate and the same delegatedUnderParentAtom the desktop sidebar uses. The relationshipToParent === "subagent" check in threadListV2.ts only sees threads that have already passed that filter.

    What I ran: a two-environment harness (parent on m1, task delegated to m4 with delegatedFrom set). I fed the shared navigation atom into the mobile buildThreadListV2Items, with three cases:

    Case Mobile list on main Unfiltered shells (an app build without https://git.cafe/pingdotgg/t3code/pulls/16719)
    parent active, task running parent only task listed at top level
    parent active, task settled parent only, settled 0 task listed, settled 1
    parent settled, task settled parent only, settled 1 task listed, settled 2

    The right-hand column is the behaviour you saw: an extra top-level row and inflated section counts. An iPhone build older than https://git.cafe/pingdotgg/t3code/pulls/16719 does not know delegatedFrom, so it lists every delegated task on its own. A mobile build from current main nests them, matching the desktop. Closing as fixed on main. If a mobile build that includes https://git.cafe/pingdotgg/t3code/pulls/16719 still lists them, please reopen with its version from Settings.

  2. seankoji commented on Oct 29, 2026

    @seankoji

    Desktop-only follow-up to the UI observations in this report. The closure above establishes mobile sidebar nesting; it does not address the completed remote rows in the desktop Lineage panel.

    Observed on 29 October 2026: the panel shows a running local agent, a collapsed “Previous agents” group with a count, then multiple completed cross-environment dispatches as separate “Done” rows below that group. The screenshot therefore shows completed remote dispatches outside the collapsed section, rather than inside it. Local server reports 0.1.4-nightly.20261029.3853; the desktop client build was not independently identified.

    Source inspection supports this distinction at 6d82a22:

    • Lines 450–463 partition local relationship rows by settled status and put them in the collapsed “Previous agents” group.
    • Lines 465–469 select every remote dispatch by the presence of remoteChild, without a status filter.
    • Lines 859–873 render those remote rows as a separate list after the groups, with no collapse or pagination control.

    Minimal reproduction to verify:

    1. From a parent thread, dispatch one task locally and another to a linked environment.
    2. Let both complete, then open the parent's Lineage panel.
    3. Collapse “Previous agents”.
    4. Compare whether the completed local row hides while the completed remote row remains visible underneath.

    Expected: completed remote dispatches have a clear, collapsible history grouping consistent with local completions, or their own explicitly labelled section. Actual screenshot/source: remote completions remain a loose list below the local-history drawer. This makes the drawer's scope and count misleading and clutters long multi-environment runs.

    This is a desktop grouping inconsistency, separate from the mobile navigation fix and from #26411's request to keep recent local completions visible. No task loss, incorrect completion status or provider failure is established. The screenshot is user-supplied; I did not run a fresh UI replay or inspect the installed frontend bundle. No app changes were made, and the original screenshot is withheld because its task titles contain private project context.

    Investigated with Codex gpt-6.1-sol, high effort, in T3 Code.

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