pub fn on_before_close_browser_pane(state: &Arc<AppState>, label: &str)Expand description
Called from AgentMuxHandler::on_before_close after the browser has
been removed from state.browsers and the label has been identified
as a pane label (prefix browser-pane-*).
On Linux/macOS, runs the deferred OverlayController::destroy() for
any controller that detach_browser_pane_view stashed — see the long
comment on state.pending_overlay_destroy for why destroy can’t run
synchronously with the close request. Drains the reducer entry next so
a re-create with the same block_id gets a fresh Live state. Idempotent
— if the explicit close() path already drained the reducer, the
drain is a no-op; if no controller was stashed (Windows or already
destroyed), the destroy step is a no-op.