Commit Graph
74 Commits
Author SHA1 Message Date
ZacharyZhang-NY 4cb7ff089e Wire topbar tab history navigation 2026-05-13 00:49:52 -04:00
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 9a2f9f2d74 Add hidden-on-hover sidebar mode
Domain ships HIDDEN_SIDEBAR_WIDTH_PX = 8 alongside the existing
collapsed/default tiers. ElyShell tracks sidebar_hover_expanded with
expand_hidden_sidebar / collapse_hidden_sidebar helpers; switching
back to a non-hidden width via the layout cards or core API resets
the flag automatically so the sidebar can never be both hidden and
expanded after a mode change.

Renderer:
- render_sidebar takes a sidebar_hidden flag and routes to a thin
  8 px clickable rail (hover bg + click expands) when the active
  space's width is at HIDDEN.
- While the rail is expanded, render_browser overlays a transparent
  backdrop + the full default-width sidebar absolutely positioned in
  the shell inset, so the main pane content never reflows.
- collapsed_sidebar_active still drives the COLLAPSED-tier compact
  sidebar; the hidden tier is opted out of that path.

Appearance form:
- Layout cards section gains the design's third "Hidden on hover"
  card with a 6 px sliver preview that mutates the active space to
  HIDDEN_SIDEBAR_WIDTH_PX. LayoutMode now derives id/width/preview
  from a small enum so adding a fourth mode would be one match arm.

The hover-expanded state never persists into the domain; once the
user switches modes or clicks the backdrop, it collapses cleanly.
2026-05-09 20:01:31 -04:00
ZacharyZhang-NY 3108f3265b Add translucency setting + apply to runtime panel alpha
Domain:
- AppearanceSettings gains translucency_pct (u8, 0..=100, default 40)
  with a clamping setter and serde round-trip coverage.
- DEFAULT_TRANSLUCENCY_PCT and MAX_TRANSLUCENCY_PCT exported for the
  shell.

Core:
- BrowserCore::set_translucency_pct delegates to the appearance struct;
  the existing reset_appearance covers the reset path.
- Integration test covers persistence into snapshot.appearance.

Render:
- chrome::sidebar::panel_bg(snapshot) replaces the static PANEL_BG
  constant, mapping the user's translucency_pct linearly into the alpha
  byte 0xff..0xb3. Sidebar (expanded + compact) and main pane consume
  the helper so changing the setting at runtime updates every glass
  surface in lock-step.

Form:
- Translucency row in chrome::appearance_form mirrors the design's
  static track + thumb visual driven by the persisted percentage, plus
  three preset chips (Solid 0 / Default 40 / Glassy 75) that mutate the
  setting through shell.set_translucency_pct.

Strict UX rule preserved: alpha never drops below 0xb3 so panels stay
readable without backdrop blur (which GPUI 0.2.2 doesn't expose).
2026-05-09 19:39:11 -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 3856c2ea70 Resolve clippy warnings introduced this round
- AppearanceSettings derives Default instead of carrying a manual impl
  that's identical to the derived one.
- topbar::render_lock_or_search collapses the duplicated Search arms
  into a single fallback so clippy stops flagging identical blocks.
- command_overlay row helpers bundle id/title/hint/keys into a small
  CommandRowContent struct so render_row, render_row_with_glyph, and
  render_row_inner stay under the 7-arg threshold without losing any
  call-site clarity.
2026-05-09 19:08:19 -04:00
ZacharyZhang-NY 71088bccb0 Add AppearanceSettings to ely_domain
Introduces a small persistent appearance contract: WallpaperTheme
(Dawn/Violet/Mint/Slate), ThemeMode (System/Light/Dark), reduce_motion.
Defaults to Dawn + System + motion-on. Field accessors and setters live
on the struct so the core can mutate without exposing internals; serde
support uses kebab-case so the on-disk form matches the design CSS
naming.

Tests cover defaults, mutation independence, and a JSON round-trip with
the kebab-case names. serde_json is added as a dev-dependency only —
the production crate does not depend on it.
2026-05-09 18:46:58 -04:00
ZacharyZhang-NY 189b9b8b89 Add current page download pipeline 2026-05-09 12:54:24 -04:00
ZacharyZhang-NY 1faa7423c1 Add Servo page zoom support 2026-05-09 12:32:44 -04:00
ZacharyZhang-NY a8d2688020 Record local diagnostics events 2026-05-09 06:12:05 -04:00
ZacharyZhang-NY 4e85f31dac Add diagnostics privacy controls 2026-05-09 04:47:45 -04:00
ZacharyZhang-NY e30fce9213 Add update policy controls 2026-05-09 04:13:41 -04:00
ZacharyZhang-NY 79d9646ab8 Pass site permission grants to sidecar snapshots 2026-05-09 00:01:14 -04:00
ZacharyZhang-NY 4ed1666ece Scope Servo permissions by profile origin 2026-05-08 23:47:05 -04:00
ZacharyZhang-NY 8334fcbd6e Wire sidecar profile data isolation 2026-05-08 22:10:10 -04:00
ZacharyZhang-NY 8e450496e0 Lock private profile sync state 2026-05-08 20:19:09 -04:00
ZacharyZhang-NY b4355d0f82 Add bookmark thumbnail metadata 2026-05-08 11:47:38 -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 6bf1b674ac Pause sync for private profiles 2026-05-08 09:32:57 -04:00
ZacharyZhang-NY 43ab4be548 Add sidebar collapse shortcut 2026-05-08 08:36:58 -04:00
ZacharyZhang-NY 24338e0f71 Swap active split panes 2026-05-08 08:11:49 -04:00
ZacharyZhang-NY 1186509e26 Duplicate active split panes 2026-05-08 08:03:15 -04:00
ZacharyZhang-NY 4ed8ed9401 Add split layout axis commands 2026-05-08 07:48:43 -04:00
ZacharyZhang-NY adf5b27207 Add tab group sidebar support 2026-05-08 07:16:17 -04:00
ZacharyZhang-NY 7e68857eb8 Add page notes panel 2026-05-08 06:53:31 -04:00
ZacharyZhang-NY bae3c7789f Add reading list progress percent 2026-05-08 06:43:38 -04:00
ZacharyZhang-NY e13557814d Add reading list progress actions 2026-05-08 06:23:21 -04:00
ZacharyZhang-NY 26d0e4346c Add bookmark metadata updates 2026-05-08 06:03:43 -04:00
ZacharyZhang-NY a236e6a53b Track history favicon keys 2026-05-08 05:58:05 -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 bce489c119 Track space sort keys 2026-05-08 05:40:46 -04:00
ZacharyZhang-NY 820054ff23 Track space sidebar width 2026-05-08 05:35:32 -04:00
ZacharyZhang-NY d7eded97f0 Track space timestamps 2026-05-08 05:29:26 -04:00
ZacharyZhang-NY d45dced4a7 Bind spaces to default profiles 2026-05-08 05:21:42 -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 5215c924ca Track history source tabs 2026-05-08 04:57:09 -04:00
ZacharyZhang-NY 6aee36cb66 Track history visit counts 2026-05-08 04:43:59 -04:00
ZacharyZhang-NY 71750114a6 Add domain history clear confirmation 2026-05-08 04:21:02 -04:00
ZacharyZhang-NY ada0a82da8 Add profile sync policy controls 2026-05-08 03:44:36 -04:00
ZacharyZhang-NY 38a847c27e Add sync object pause controls 2026-05-08 03:39:18 -04:00
ZacharyZhang-NY 569851eae9 Add favorite limit settings 2026-05-08 03:31:41 -04:00
ZacharyZhang-NY 6ba7fd611c Add privacy history settings 2026-05-08 03:19:43 -04:00
ZacharyZhang-NY 4bdbf5e0c5 Add general new tab settings 2026-05-08 03:13:37 -04:00
ZacharyZhang-NY 6750f60d52 Add search engine settings 2026-05-08 03:04:33 -04:00
ZacharyZhang-NY 7f479ff9e1 Add idle tab auto archive policy 2026-05-08 02:27:29 -04:00
ZacharyZhang-NY 0da8a3531b Add saved split view rows 2026-05-08 01:52:39 -04:00
ZacharyZhang-NY 23b108c8dd Add split view panes 2026-05-08 01:47:19 -04:00