fix(agent): fold large unchanged subtrees in the full-screen fallback
VA
1h ago+1306+1306+0123456789012345678901234567890123456789-63-63-01234567890123456789
- When an action changes most of the screen, the presenter sends the whole tree again, repeating subtrees the model already holds.
- The fallback now folds a subtree of 10 or more nodes to its root line with the node count and the revision it was last seen at, when every node in it reads as before with the same node ids.
- The first screen still goes out whole,
observeis untouched, and a truncated listing never folds. - A subtree holding the focused node stays listed, and a subtree that lost a node stays listed.
Folded line, from the new test:
#n2 navigation "Sidebar" (12 nodes inside, unchanged since revision b1)
Issue
Fixes #1788
Verified
Ran it locally: yes
packages/e2eunit tests for the presenter, the full unit suite, and the MCPrun_codeintegration suite withE2E_CHROMIUM_SANDBOX=0- The two new folding tests fail on main (no folding) and pass here
| main | this branch |
|---|---|
| 562 chars, 24 lines: the 12-node sidebar repeats in full | 427 chars, 14 lines: the sidebar folds to one line, a 24.0% cut on this 23-node fixture |