Repository navigation
perf(agent-pane): skip 300 hidden row elements in folded running tray (SW-04) - #29250
Conversation
|
Found 10 test failures on Blacksmith runners: Failures
|
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Gallery before/after for
States
Pick other states with a Passes: CI passes on CI passes on Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base 2809196; does not block Shipped in:
|
|
Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over. Carrying all five authored commits in #29794 together with the tray alignment and folding fixes, preserving the hidden-row and sibling-index regression coverage. |
Resolve the conflict in webviews/src/agent-session/acpmux/subagents/SubagentTray.tsx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review (claude opus, correctness first): SHIP at 87cc164 Read the full diff against feat-cmux-next. |
…ion Info Base turned workflows on by default (#30192), so a running workflow leaves the tray; stopped building rows in a folded tray (#29250); and renamed the Session Info aside (#29921). The App tests turn workflows off as the workflowLabs push would, open the tray for their chats, and read aside.acpmux-session-info. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-63b9964940c20354b639
#27886) (#29777) * fix(agent-pane): show workflow progress in tray and inspector Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): refresh workflow progress rows Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): refine workflow progress row layout Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): order agent row trailing columns Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): restore fixed agent status track Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): refresh only changed progress rows Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): update only changed progress rows Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): keep inspector rows memoized Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): subscribe each workflow row to live progress Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): update only changed workflow progress Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): scope progress updates to changed rows Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): use row progress context Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): publish keyed progress from the event fold Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): key bridge progress by agent versions Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): preserve unversioned bridge progress updates Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): key bridge progress by versions Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): retain full snapshot compatibility without scanning direct events Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * Revert "fix(agent-pane): retain full snapshot compatibility without scanning direct events" This reverts commit 420a013. Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): preserve bridge updates without versions Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): restore workflow progress after base merge Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): publish only changed progress values Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * test(agent-pane): model keyed bridge progress updates Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): reset bridge progress per session Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): keep compatibility progress snapshots live Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): preserve producer generations and narrow controls Agent-Session: https://cmux.com/deeplink/agent?id=aid-f518dd20e1523aa0398c * fix(agent-pane): retain versioned bridge progress and satisfy web checks Agent-Session: https://cmux.com/deeplink/agent?id=aid-bb9506d641d2e48855d5 * test(agent-pane): cover late root retirement in keyed UI lists Agent-Session: https://cmux.com/deeplink/agent?id=aid-bb9506d641d2e48855d5 * fix(agent-pane): retire phantom root progress with its worker identity Agent-Session: https://cmux.com/deeplink/agent?id=aid-bb9506d641d2e48855d5 * test(agent-pane): require inspector card to follow keyed progress Agent-Session: https://cmux.com/deeplink/agent?id=aid-bb9506d641d2e48855d5 * fix(agent-pane): keep inspector hover progress subscribed Agent-Session: https://cmux.com/deeplink/agent?id=aid-bb9506d641d2e48855d5 * fix(agent-pane): align tray header with status and duration columns Agent-Session: https://cmux.com/deeplink/agent?id=aid-bb9506d641d2e48855d5 * fix(agent-pane): wrap workflow counts within narrow rows Agent-Session: https://cmux.com/deeplink/agent?id=aid-bb9506d641d2e48855d5 * fix(agent-pane): keep tray fill under stop hover Agent-Session: https://cmux.com/deeplink/agent?id=aid-8944087bebabdd95b89c * fix(agent-pane): reconcile progress row props after base merge Agent-Session: https://cmux.com/deeplink/agent?id=aid-8944087bebabdd95b89c * fix(agent-pane): subscribe tray rows to live progress Agent-Session: https://cmux.com/deeplink/agent?id=aid-8944087bebabdd95b89c * test(agent-pane): workflow progress tests follow base's tray and Session Info Base turned workflows on by default (#30192), so a running workflow leaves the tray; stopped building rows in a folded tray (#29250); and renamed the Session Info aside (#29921). The App tests turn workflows off as the workflowLabs push would, open the tray for their chats, and read aside.acpmux-session-info. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-63b9964940c20354b639 --------- Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
SW-04: closed running tray stops building hundreds of invisible row elements
The default agent-pane
SubagentTraystarts folded when more than three agents/commands are running. Its render nevertheless unconditionally maps every live and completed item throughline(item)into React<li>children before the return statement. The returned JSX already gates the fold body usinguseFold(...).present. At 300 active agents, a fully collapsed tray builds 300AgentLinetrees on every render (including its elapsed-time header tick), discarding those trees because the fold body is absent.Change: construct
cardsonly whilefold.presentis true. This exact existing hook stays true while a close animation is playing, so open/close animation and focus semantics are preserved. Once it has finished closing, no hidden row creation. Header count, oldest elapsed time, stop semantics, arrival identity tracking, View all and full open tray are unchanged. The sharedAgentsPill.nestAgentshelper also now appends to indexed sibling groups instead of cloning the prior array for every sibling, preserving order and the existing fallback for cyclic parent links.Regression:
webviews/test/subagent-tray.test.tsxcovers 300 siblings and a historical parent cycle, plus adds 300 agents with observable name reads. Before opening, the collapsed tray must have zeroAgentLineDOM rows and zero name reads during row construction; expanding must show all 300 and read their names. This tests the render cost that DOM-count-only coverage missed (the old implementation also had zero mounted rows but created 300 hidden element trees).Source:
feat-cmux-next@38550c7743b27f346ae45b75fbd72cbda80af737; branchsw04-skip-collapsed-tray-rows, head01a768bbfdd335dc2cd30c3869aee865b8b1316b. Three files changed (tray, shared pill nesting helper, focused tray tests). No daemon, Chief or wire contracts changed. A separate active #27886 owns workflow progress and is not modified.Validation: source-only from this chat; new webview test was committed but the repository
bunsuite has not been executed here. Gate oncd webviews && bun test test/subagent-tray.test.tsx,bun run check, and a narrow Mac live tray open/close capture if needed.Performance
ef23bb758f5d739c562c2785Harness:
webviews/test/sw04-bench.test.tsx(uncommitted bench; before = feat-cmux-next's code, after = this PR's, same process), run on the fleet Linux pool viacmux-ci test, jobef23bb758f5d739c562c2785, source4f1a46121bd7. No new timer, observer or animation loop; the fold keeps its existing cleanup.Capture
No capture: the closed tray is visually the same header; open/close motion and results are unchanged. The user-visible difference is lower invisible work, to be validated under a signed NEXT build.
Related SW-04 results and other narrow PRs: HQ #5599.
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Stops the folded
SubagentTrayfrom building hundreds of invisible row elements on every render. Previously the tray mapped every live and completed agent throughline(item)into<li>children regardless of fold state, so 300 collapsed agents constructed 300AgentLinetrees per header tick and discarded them. Rows are now built only whilefold.presentis true, which stays true during close animation so open/close motion and focus behavior are preserved.The shared
AgentsPill.nestAgentshelper now appends to indexed sibling groups instead of cloning the prior array for every sibling, preserving order and the fallback for cyclic parent links.Written for commit 87cc164. Summary will update on new commits.