Commit Graph
18 Commits
Author SHA1 Message Date
ZacharyZhang-NY f8e05604ed Navigate the active tab in place instead of spawning a new tab
Root cause of "settings opens new tab for every click": every
internal navigation went through `open_internal_tab → open_url →
core.open_tab(url)`, and `open_tab` unconditionally inserts a new
`BrowserTab`. So three settings sub-page clicks left four tabs in
the sidebar, which is the screenshot the user keeps sending.

Real browsers navigate the active tab in place for in-app links and
spawn new tabs only on `+ New Tab` (or Cmd-click). Wire it through:

* `BrowserTab::set_url(url)` mutates the tab's URL and bumps
  `last_active_at`. Title stays put — the page renderer can refresh
  it from the new URL.
* `BrowserCore::navigate_active_tab(url)` finds the active tab,
  calls `set_url`, marks it Ready, records the history entry, and
  bumps activity. Returns `TabNotFound` if there's no active tab.
* `ElyShell::navigate_active_tab` calls the core method and falls
  back to `open_tab` if there's no active tab to navigate. The
  shell's `open_internal_tab` (used by settings nav, home pills,
  sidebar Settings + Profile rows, command-overlay routes, etc.)
  now routes through this in-place path.
* `open_url` keeps the explicit "spawn a new tab" semantics for
  `+ New Tab` and the deep-link router.

Settings, plugin marketplace, history, profile picker — every
sidebar nav now stays in one tab.

cargo test --workspace: 440 passed, 0 failed.
2026-05-09 22:42:25 -04:00
ZacharyZhang-NY 3903004ede Surface unread counts on sidebar launcher rows
The design's Slack/Linear/Gmail rows show numeric badges (12, 3) that
real apps publish in their tab title prefix — "(12) Slack | …",
"(3) Inbox — Linear", "(99+) Gmail". Add a pure parser
ely_domain::parse_title_unread_count that recognises the leading
"(N)" pattern and surfaces it through BrowserTab::unread_count(); the
sidebar launcher row renders a glass pill badge whenever the count
is non-zero, capped at "99+" for very high counts.

No domain field, no fabrication: the badge appears only when a real
website publishes its own unread count via the title. Tests cover
canonical formats, non-prefixed titles, leading whitespace, and
non-numeric / overflow inputs.
2026-05-09 19:25:31 -04:00
ZacharyZhang-NY 1faa7423c1 Add Servo page zoom support 2026-05-09 12:32:44 -04:00
ZacharyZhang-NY 3c380e1455 Add sleeping tab recovery 2026-05-08 10:23:58 -04:00
ZacharyZhang-NY 1ec3bfcc3d Add crashed tab recovery 2026-05-08 10:14:00 -04:00
ZacharyZhang-NY adf5b27207 Add tab group sidebar support 2026-05-08 07:16:17 -04:00
ZacharyZhang-NY e62d64874f Track tab favicon keys 2026-05-08 05:53:02 -04:00
ZacharyZhang-NY 668557773b Track tab sort keys 2026-05-08 05:47:50 -04:00
ZacharyZhang-NY aed3a4154e Track tab sync participation 2026-05-08 05:13:20 -04:00
ZacharyZhang-NY 06c37f89b0 Track tab opener relationships 2026-05-08 05:07:19 -04:00
ZacharyZhang-NY 7f479ff9e1 Add idle tab auto archive policy 2026-05-08 02:27:29 -04:00
ZacharyZhang-NY 23b108c8dd Add split view panes 2026-05-08 01:47:19 -04:00
ZacharyZhang-NY b558b1d979 Move active tabs between spaces 2026-05-07 20:34:38 -04:00
ZacharyZhang-NY 42d33ac06c Track archived tab state transitions 2026-05-07 20:09:42 -04:00
ZacharyZhang-NY 82df2b4502 Add pinned tab controls 2026-05-07 19:47:27 -04:00
ZacharyZhang-NY ba312e5b85 Add favorite tab controls 2026-05-07 19:33:50 -04:00
ZacharyZhang-NY e9ef92c41b Insert new tabs below active tab 2026-05-07 18:53:24 -04:00
ZacharyZhang-NY d9a27f3dc4 Initialize Rust GPUI browser shell 2026-05-07 18:27:15 -04:00