feat(browser): tabs (multiple embedded documents)

feat(browser): tabs (multiple embedded documents)

#406 in DioxusLabs/blitz — merged 2026-04-28

Summary

Implements the following features from the Browser UI backlog (#363):

  • Tabs
  • Status bar
  • Menu item to clear HTTP cache

It also refactors the Browser UI into multiple files.

Out-of-scope items deliberately deferred for follow-ups:

  • drag-to-reorder tabs
  • target=_blank → new tab
  • keyboard shortcuts (Ctrl+T/W/Tab),
  • pre-warmed hidden viewport (layout hidden tabs with correct viewport)
  • pinning / right-click menu / thumbnails, session persistence.

Implementation details:

  • One <web-view> per tab, rendered with display: none on inactive tabs so style resolution and asset fetching continue in the background while paint is skipped.
  • Per-tab Tab struct: history, DocumentLoader, document, node_handle, html_source, title. Each tab loads independently; closing a tab drops its loader and cancels in-flight fetches.
  • Tab strip with click-to-switch, "+" new-tab, "×" close (hidden when only one tab remains). Rounded upper corners, seamless join with the urlbar.
  • Live tab titles via find_title_node() cached into a per-tab Signal at load time (falls back to URL).
  • Window title reactively follows the active tab's title via the chrome's <title> element.
  • Back/forward buttons render disabled (dim, click is a no-op) when there's no history in that direction.
  • All chrome handlers (back/forward/refresh/home/menu/URL bar) operate on the active tab read at call time.

Last updated 2026-05-14