Summary
In the TUI CYP context overlay, allow the user to fold/collapse subtrees to reduce visual noise in long branching conversations.
Design Notes (from rooms-refinement Tier 4)
collapsedIds signal tracks which node IDs are folded
getSubtreeIds helper filters those nodes out of visibleLines
- ~20 lines of logic, no OpenTUI involvement — pure state management
- Keybinding surface TBD: simple (
z to toggle) or vim-faithful (za/zM/zR/zo/zc)
- OpenTUI has no native folding concept, so this is entirely self-contained
Scope
TUI only — web CYP tree uses ReactFlow which has its own collapse story.
Summary
In the TUI CYP context overlay, allow the user to fold/collapse subtrees to reduce visual noise in long branching conversations.
Design Notes (from rooms-refinement Tier 4)
collapsedIdssignal tracks which node IDs are foldedgetSubtreeIdshelper filters those nodes out ofvisibleLineszto toggle) or vim-faithful (za/zM/zR/zo/zc)Scope
TUI only — web CYP tree uses ReactFlow which has its own collapse story.