-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Bug Description
When using the V key to switch to Active or Ready view mode, epic expand/collapse stops working. The triangle indicator (▼/▶) toggles visually when clicking or pressing Space/arrow keys, but the tree doesn't actually expand or collapse - children remain visible regardless of the indicator state.
Steps to Reproduce
- Open Abacus in a repository with epics that have children
- Press V to switch to Active view (or press again for Ready view)
- Try to collapse an expanded epic using Space, Right arrow, or clicking the triangle
- Observe: Triangle changes from ▼ to ▶, but children remain visible
Expected Behavior
Children should hide when the epic is collapsed, matching the triangle indicator state.
Actual Behavior
Triangle toggles visually but children remain visible. The expand/collapse has no effect.
Environment
- Abacus version: 0.8.0
- OS: macOS (Darwin 24.6.0)
Root Cause Analysis
The bug is in internal/ui/state_expansion.go. The functions expandNodeForView() and collapseNodeForView() check m.filterText == "" to decide whether to track filter override state (filterForcedExpanded/filterCollapsed), but they ignore view mode filtering (m.viewMode != ViewModeAll).
When in Active/Ready view mode:
filterTextis empty, so the early return triggers- Filter override state is never set
shouldExpandFilteredNode()uses default behavior instead of user's explicit toggle
Fix
I have a fix ready in my fork that:
- Adds
isFilterActive()helper checking both text filter AND view mode - Uses this helper consistently in
expandNodeForView(),collapseNodeForView(),isNodeExpandedInView(), andrecalcVisibleRows() - Includes a regression test
TestViewModeExpandCollapse
Will submit a PR shortly.