feat(tree): Expand all / Collapse all for the space page tree #23
Reference in New Issue
Block a user
Delete Branch "feat/tree-expand-collapse-all-agent227"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Space page tree gets Expand all / Collapse all (full-stack). Based on the agent227 implementation with three cleanups borrowed from the sibling impl (extracted tree-walk helpers into tree/utils, reused SidebarPageDto instead of a duplicate DTO, typed the client fetch) plus a menu close-behavior fix: Expand all now closes the menu, consistent with Collapse all.
- extract collectAllIds / collectBranchIds into tree/utils and use them in space-tree.tsx instead of inline closures - drop the duplicate SidebarPageTreeDto, reuse the existing SidebarPageDto for the /pages/tree endpoint - type the getSpaceTree client call as api.post<{ items: IPage[] }> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Expand all kept the menu open (closeMenuOnClick={false}) while Collapse all closed it. Make both close on click for consistent behavior, and drop the now-pointless in-menu isExpanding loading state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>