Qt-removal R7.5e: Collapse All / Expand All#154
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 callset_collapsed(bool)on each. The SPA has no equivalent — the per-node primitive existed (SceneNode.is_collapsed, thesetChatCollapsedintent, real collapse buttons on ChatNodeView/ConversationNodeView/HtmlNodeView), but no bulk operation.Change
backend/canvas.py:SceneDocument.set_all_conversational_collapsed(collapsed: bool)— restricted tokind in ("chat", "conversation", "html"). Frame/container nodes are deliberately excluded: theiris_collapseddrives derived geometry via_recompute_group_bounds, which the bulk setter never calls, so including them would desyncis_collapsedfromgroup_width/group_height.collapseAllNodes/expandAllNodes, each performing one document mutation followed by exactly onepublish_scene()call — matching the existingorganize_nodeshandler'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 ownbool(scene._all_conversational_nodes())predicate.Test plan
isCollapsed: true; manually collapsed the frame, ran "Expand All Nodes", and confirmed the frame stayed collapsed while the three conversational nodes expanded