//! Tab management operations for WindowState.
//!
//! This module contains methods for creating, closing, and switching between tabs,
//! managing split panes, and handling profile operations.
//!
//! Sub-modules:
//! - `lifecycle` — tab creation, closing, and navigation
//! - `tab_reopen` — session undo: reopen closed tab, tab-bar resize helper
//! - `tab_helpers` — tab duplication, query predicates, and close-confirmation gate
//! - `pane_ops` — split pane operations (split, navigate, resize, close panes)
//! - `profile_ops` — profile management (open, apply, auto-switch profiles)
/// Metadata captured when a tab is closed, used for session undo (reopen closed tab).
pub