# fix\(mobile\): stop clipping expanded tool groups · PR \#10212 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/10212)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: t3code/mobile-work-group-expand-sizing

Target branch: t3code/mobile-subagent-spawn-batches

Head commit: 65b1b9c5da6b279ef7c67615112f455b0ed7d82c

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/10212)

[Commits](https://git.cafe/pingdotgg/t3code/pull/10212/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/10212/diffs?format=markdown)

## Description

---

Stacked on #10211.

## Problem

Opening a row's details inside an expanded tool group left an unpainted band the size of the growth (88 points for a five-line command output). Layout was correct everywhere — LegendList's sizes, the outer row's measured height, and accessibility frames all matched — but the pixels for everything past the group's old bottom edge were missing until the group was collapsed and reopened.

The group's scroll-edge fades come from `@expo/ui`'s `MaskedView`, which hosts the list inside a SwiftUI `.mask` via `RNHostView`. That host keeps the bounds it had when the mask was built, so a resize clips the tail. #9359 worked around the first symptom by forcing the list's height; this is the second.

Confirmed by elimination on the simulator: removing layout animations, the inner `ScrollView`, `selectable`, `absoluteFill`, and `maintainVisibleContentPosition` each left the band in place; swapping `MaskedView` for a plain clipped `View` removed it.

## Fix

- Render the group in a plain `overflow: hidden` view and draw the fades as two screen-colored SVG gradients over the edges, each fading in only while content continues past that edge (same scroll-offset math, inverted from "cover" to "fade"). The screen color comes from `ThreadFeed`, which already reads the theme.
- Read the group's content size from LegendList's `totalSize` signal instead of the native `onContentSizeChange`, so the outer row resizes in the same commit as the row measurement that changed it.

`ShimmeringWorkContent` still uses `MaskedView`; its mask never resizes.

## Verification

- `tsc --noEmit` for `apps/mobile`, targeted lint and format.
- iPhone 17 Pro simulator, same seeded group on `main` and this branch. The blank band after expanding the `ffmpeg` row: 88 points → 0. Fades verified on a 12-call group: bottom fade present at offset 0, top fade present when scrolled to the end, both painted in the screen color.
- 14 consecutive expand/collapse cycles across home → thread → group → row with the process pinned: no crash.

![Before: an 88-point blank band under the expanded row. After: the rows below paint in place.](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/d3e4b128daabc92e/stack-pair-expanded.png)

Recording of the expand/collapse, before on the left:

https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f0dfbe332a6d42b8/stack-pair-expand.mp4

Implemented by Claude Fable 5 in the Claude Code harness.


<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. -->
> [!NOTE]
> ### Fix clipped expanded tool groups and settle workflow coordinator members in thread activity
> - Replaces the `MaskedView` composite mask in `ThreadWorkGroupList` with a clipped container and separate animated `EdgeFade` overlays that fade only at edges with remaining content, using the current screen theme color
> - Propagates the Uniwind theme screen color through `ThreadFeed` and `ThreadWorkLog` so edge fades match the background
> - Updates `isAgentInternalActivity` to retain task lifecycle rows with a task identifier and agent kind for batch processing instead of filtering them as internal
> - In `agentSpawnRow`, a terminal workflow coordinator now settles members that lack their own end event or remain in progress; explicitly reported member statuses are preserved
> - Maps idle task status to completed in `toDerivedWorkLogEntry` when no other lifecycle status is present
> - Adds tests for bypassed workflow members and idle Codex children folding into coordinator batch rows
> - Risk: `ThreadWorkGroupList` now uses a ref callback subscribing to LegendList total-size updates instead of the native content-size callback; verify scroll fade visibility and content-height bookkeeping remain correct under rapid resize and theme switches
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 65b1b9c.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->
