Skip to content

Qt-removal R7.5e: Collapse All / Expand All#154

Merged
dovvnloading merged 1 commit into
mainfrom
qt-removal/r7-5e-collapse-expand-all
Jul 26, 2026
Merged

Qt-removal R7.5e: Collapse All / Expand All#154
dovvnloading merged 1 commit into
mainfrom
qt-removal/r7-5e-collapse-expand-all

Conversation

@dovvnloading

Copy link
Copy Markdown
Owner

Fifth R7.5 parity sub-increment, after R7.5a (#147), R7.5b (#148/#149/#150), R7.5c (#151), and R7.5d (#152/#153).

Problem

Legacy exposes "Collapse All Nodes"/"Expand All Nodes" commands (graphlink_window_navigation.py:12-13,31-39) that iterate only chat/conversation/html_view nodes and call set_collapsed(bool) on each. The SPA has no equivalent — the per-node primitive existed (SceneNode.is_collapsed, the setChatCollapsed intent, real collapse buttons on ChatNodeView/ConversationNodeView/HtmlNodeView), but no bulk operation.

Change

  • backend/canvas.py: SceneDocument.set_all_conversational_collapsed(collapsed: bool) — restricted to kind in ("chat", "conversation", "html"). Frame/container nodes are deliberately excluded: their is_collapsed drives derived geometry via _recompute_group_bounds, which the bulk setter never calls, so including them would desync is_collapsed from group_width/group_height.
  • Two new intents, collapseAllNodes/expandAllNodes, each performing one document mutation followed by exactly one publish_scene() call — matching the existing organize_nodes handler's shape, never one publish per node.
  • web_ui/src/app/canvas/sceneStore.ts: two thin fire-and-forget methods sending the new intents.
  • web_ui/src/app/chrome/commands.ts: two command-palette entries with legacy's exact names ("Collapse All Nodes"/"Expand All Nodes") and aliases (fold all/unfold all), gated on scene content rather than selection — matching legacy's own bool(scene._all_conversational_nodes()) predicate.

Test plan

  • 885 backend tests (5 new) — kind-scoping correctness, frame-not-clobbered-by-expand-all, both intents' single-publish behavior, empty-scene safety
  • 1208 frontend tests (4 new), 0 lint errors, typecheck/build clean
  • Burn-down gate unchanged at 152/84/68
  • Adversarial review of the diff — no defects found
  • Live-verified against a real backend: seeded a 5-node scene (chat/conversation/html wrapped in a frame, plus an unwrapped code node), ran "Collapse All Nodes" via the real command palette and confirmed only chat/conversation/html flipped to isCollapsed: true; manually collapsed the frame, ran "Expand All Nodes", and confirmed the frame stayed collapsed while the three conversational nodes expanded

Ports legacy's "Collapse All Nodes"/"Expand All Nodes" commands
(graphlink_window_navigation.py:12-13,31-39), which iterate only
chat/conversation/html_view nodes and call set_collapsed(bool) on each.

The per-node primitive already existed: SceneNode.is_collapsed, the
generic set_chat_collapsed setter, its setChatCollapsed intent, and
real per-node collapse buttons on ChatNodeView/ConversationNodeView/
HtmlNodeView. This adds only the bulk operation: a new
SceneDocument.set_all_conversational_collapsed(collapsed) restricted to
chat/conversation/html kinds, two intents (collapseAllNodes/
expandAllNodes) each doing one document mutation plus exactly one
publish_scene(), and two command-palette entries with legacy's exact
names and aliases, gated on scene content rather than selection.

Frame/container nodes are deliberately excluded: their is_collapsed
drives derived geometry via _recompute_group_bounds, which the bulk
setter never calls, so including them would desync is_collapsed from
group_width/height.

885 backend / 1208 frontend tests pass, typecheck/lint/build clean,
burn-down gate unchanged at 152/84/68.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dovvnloading
dovvnloading merged commit 4ccb9ca into main Jul 26, 2026
2 checks passed
@dovvnloading
dovvnloading deleted the qt-removal/r7-5e-collapse-expand-all branch July 26, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant