fn end_if( state: &AppState, pane: &str, id: Option<&str>, reason: &str, say_why: bool, how: How, ) -> bool