Skip to main content

next_visible_member

Function next_visible_member 

Source
pub fn next_visible_member(
    remaining: &[String],
    removed_idx: usize,
    eligible: impl Fn(&String) -> bool,
) -> Option<String>
Expand description

Which tab becomes visible once the one at removed_idx of the ORIGINAL stack is gone: the nearest eligible member to its right, else the nearest to its left. remaining is the stack with it removed; eligible filters (e.g. “still exists”). The one rule every removal path uses — frontend removeMemberFromStack mirrors it (frontend/layout/lib/stackMembers.ts). SPEC_PANE_TABS_REDUCER_COMMANDS_2026_09_18.md §3.6.