pub async fn tab_open(
backend: &TabBackend,
registry: &Registry,
browser_name: &str,
name: Option<&str>,
url: Option<&str>,
) -> Result<TabRow>Expand description
Open a named tab (get-or-create), navigating if url differs from the
existing tab’s last_url. Returns the up-to-date row.
Behaviour:
name = None: always create a fresh tab; assign a cute name.name = Some(n):- if row
(browser, n)exists and itstarget_idis alive → navigate-on-mismatch and return. - if row exists but
target_idis stale → close (best-effort), delete row, fall through to create. - if no row → create.
- if row
url = None: defaults toabout:blank.
On create, if daemon_created rows ≥ HARD_CAP, close the LRU
first (Target.closeTarget + tab_delete) to free a slot.