Skip to content

[Bug]: Thread details side-tabs (Subagents/Lineage/Automations/Background Tasks) disappear once rows populate #15304

Description

@tarunravi

Area

apps/web

Steps to reproduce

  1. Open the app in a ~1400x800 window.
  2. Open a thread backed by a git worktree/repo.
  3. Run several subagents (or otherwise populate Subagents / Lineage / Automations / Background Tasks rows).
  4. Watch the right-side Thread details card: once the rows populate, the Subagents / Lineage / Automations / Background Tasks sections vanish.
  5. Inspect the card: dataset.density has flipped from full to compact.

Expected behavior

Populating Subagents / Lineage / Automations / Background Tasks rows should not remove those same sections. The card already renders inside a ScrollArea, so added content should scroll, not gate the sections out of existence.

Actual behavior

The four sections disappear exactly when they gain content. ThreadDetailsPanel gates all four on density === \"full\":

  • apps/web/src/components/chat/ThreadDetailsPanel.tsx:227 (Automations), :231 (Background Tasks), :239 (Subagents), :243 (Relationships/Lineage) — each {density === \"full\" && !props.draftId ? ... : null}
  • density comes from resolveThreadDetailsCardDensity(height, contentHeights) (apps/web/src/components/chat/threadDetailsCardLayout.ts:3-10), computed in ThreadDetailsCard.tsx:55; the measured content height grows when the rows populate, so full content no longer fits and density folds to compact — unmounting the rows that caused the growth.
  • Supporting context: measurement retains per-density heights (ThreadDetailsCard.tsx:86-91) and never re-expands within the same content; card placement also returns null (popover fallback) when width < 240 (threadDetailsCardLayout.ts:26) or height < 160 (threadDetailsCardLayout.ts:34).

Impact

Major degradation or frequent failure

Version or commit

origin/main @ 71dbaf1

Environment

macOS, web app (apps/web), any thread with subagents/automations/background tasks present.

Suggested fix direction

Drop the density === \"full\" conjunct from the four gates in ThreadDetailsPanel.tsx:227-247 (keep the existing !props.draftId check) and let the existing ScrollArea in ThreadDetailsCard.tsx:108 scroll the overflow, instead of unmounting sections precisely when they have content.

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Activity

  1. juliusmarminge commented on Oct 3, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Triage

    Thanks for the detailed report, @tarunravi! I can confirm this on main at 71dbaf1. The sections really are being folded away, not failing to mount.

    ThreadDetailsPanel only renders two of these blocks when density === "full" and the thread isn't a draft:

    • ThreadAutomationsPanel at apps/web/src/components/chat/ThreadDetailsPanel.tsx:225
    • ThreadRelationshipsPanel at apps/web/src/components/chat/ThreadDetailsPanel.tsx:229

    So there are two gates rather than four. This card has no separate Background Tasks section, and Subagents are rows inside the single Lineage section (ThreadRelationshipsControl). Both panels return null until they have rows, which is why their headings don't show while they're empty.

    ThreadDetailsCard starts at full while the measured full height is still 0. Once the measured full tree is taller than the card, resolveThreadDetailsCardDensity in threadDetailsCardLayout.ts steps down to compact. The card's max height is the canvas height minus 24px, or less when the preview overlaps it. Populated Lineage is capped (max-h-[13.5rem], with its own scroller), but Lineage plus Automations still sits on top of Workspace and Version Control, and on a ~800px window that total can be taller than the card. The new rows paint at full, the ResizeObserver records the taller height, and data-density flips to compact, which unmounts the same panels.

    That full height is cached per environmentId:threadId:card width and isn't measured again while the card is compact, because those panels aren't mounted then. A taller window or a wider card can bring full back. Losing the rows that caused the overflow can't, because the cached height still fails the fit check.

    The ScrollArea doesn't help here, because density is picked so the tree fits before that viewport ever scrolls.

    Likely fix area

    • One option is to keep Automations and Lineage mounted below full, let the existing card scroll, and remeasure when their rows change.
    • Removing every density === "full" check would reach further than this bug. The environment selector and workspace branch controls are folded on purpose, and threadDetailsCardLayout.test.ts covers that compact and essential folding.

    A maintainer will decide on the fix direction.

  2. added
    bugSomething is broken or behaving incorrectly.
    via-triageFiled through npx t3 triage
    on Oct 3, 2026
  3. fyzanshaik commented on Oct 3, 2026

    @fyzanshaik

    Opened PR #15348 for the Previous agents expansion trigger described here.

    Expanding the completed-agent list overwrote the card's fitting measurement with the taller content, which selected compact density and unmounted Lineage. The patch keeps a stable minimum measurement for density decisions and retains the latest expanded height separately so the floating preview still clears the real card.

    Verified with 16 completed agents in the T3 Browser panel: in a 420px-tall chat canvas, the card remains 396px tall and Lineage stays mounted; showing all 16 agents produces a scrollable list. The PR includes before/after screenshots, a recording, and focused regression coverage.

    This addresses expansion after the collapsed card has been measured. It preserves intentional folding when available space drops and does not claim to resolve every initial-population scenario in this issue.

  4. juliusmarminge commented on Oct 7, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    This should be fixed by #16635, which just merged to main. Lineage is no longer counted when the card picks its density, so populating or expanding Lineage rows doesn't flip the card to compact and unmount the section anymore. The expanded rows now use the existing scroll areas. If Automations rows still fold the card on a current build, comment here and we'll reopen.

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

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions