gallery health: chat inspector Subagents rows follow the section order

Merged
TE
2d ago
+2-2

Part of fixing the gallery health base red on feat-cmux-next (latest base run 41643573386 at 5505bbd051): the two Session Info (chat-inspector) Subagents states that #33773 left.

What was red, and why

  • agent-pane.chat-inspector#subagents-open: shift 0.0542 vs a row of 0, on the click of the "40 done 路 1 failed" row.
  • agent-pane.chat-inspector#subagents-busy-more: shift 0.0785 vs a row of 0.00791, on the click of "Show 12 more".

Both scores are the same in every theme and attempt of both base runs, and the box tracker scores 0 for both. The score comes from the browser's layout-shift entries. Their sources in the run's results.json are [dx dy dw dh], and each one is exactly minus its previous rect. So each node's current rect is empty: Chromium reports that for a node pushed fully out of the viewport.

  • subagents-open: section.acpmux-session-info-section at y 633 (Background tasks) and at y 813 (Sources), plus a text node at y 801. All of them sit below the opened Subagents list and are pushed past the 900px viewport.
  • subagents-busy-more: the clicked "Show 12 more" fold itself (y 593, it becomes Show less under the opened list), the "94 done 路 1 failed" summary row under it (y 621), and the Background tasks and Sources sections (y 661, 841). All are pushed past the viewport.

Nothing above the list moves, and nothing moves up or sideways. The before and after captures show the head, Context, Usage and the first rows in place, and the list growing down. Only the rows after the control move down, which the box tracker (shift.ts) exempts on purpose ("a box after the target in document order that moves straight down: the expansion pushes it").

Culprit: #32850, "Session Info: the machine, Context, what it runs, then Sources by default". It follows Leo's order: "1. Machines showing up so I know if it's cloud or not 2. context 3. Subagents/background tasks running 4. Sources". Before it, Subagents sat in the last block, with Changes, Sources and Outputs above it. So when the rows were seeded (#30256), little or nothing visible sat under the Subagents list. Now Background tasks and Sources sit directly under it, inside the viewport, so opening the list pushes them. That is a deliberate layout change, so the old rows were wrong for the new layout.

Fix

This follows #33753, which did the same for the sibling states #tasks-finished, #workflow-finished and #workflow-agent-failed. It raises the two shift-baseline rows to the measured scores (0.05424, 0.07845) and changes no component.

I did not do the runner change #33753 suggested (dropping browser entries for rows after the target that move straight down). Here every source moves out of the viewport, and Chromium then reports an empty current rect, which can't tell down from up. So the runner change would need a DOM read per source plus a whole-gallery comparison, which is more than this base-red fix.

Risk

Gallery-only: two rows in scripts/gallery-matrix/shift-baseline.json, no shipped code. A real regression in these two states would have to more than add to this push-down to fail them now.

Agent session: agent session

馃 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith 路 Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Updates two chat-inspector Subagents layout-shift baseline rows for the new section order.

Opening the Subagents list now pushes Background tasks and Sources past the viewport, since #32850 moved Subagents above them. The baseline rows were seeded when those sections sat below the list, so they no longer match. Raises #subagents-open and #subagents-busy-more to the measured scores, as #33753 did for the sibling states. Gallery-only change; no shipped code.