Commit Graph
93 Commits
Author SHA1 Message Date
ZacharyZhang-NY b87f9ae2d4 refactor(privacy): drop the diagnostics reporting toggle until a reporter exists 2026-07-10 11:38:47 -04:00
ZacharyZhang-NY 07cd598f75 refactor(settings): remove the Updates page until an updater exists 2026-07-10 11:34:26 -04:00
ZacharyZhang-NY 2f346abaea fix(auth): revoke desktop sessions safely 2026-07-10 08:57:00 -04:00
ZacharyZhang-NY 94afa23a69 fix(auth): store bearer tokens in native credentials 2026-07-10 07:57:44 -04:00
ZacharyZhang-NY 83badaea81 fix(servo): bound live protocol metadata 2026-07-09 23:32:17 -04:00
ZacharyZhang-NY a6e3aeaf46 fix(navigation): classify HTTP schemes case-insensitively 2026-07-09 23:08:15 -04:00
ZacharyZhang-NY b422ac1631 fix(permissions): make profile snapshots authoritative 2026-07-09 21:56:36 -04:00
ZacharyZhang-NYandClaude Opus 4.8 585cb25fe3 fix(domain): drop unwrap/panic from command tests for clippy gate
The workspace lints deny `clippy::unwrap_used` and `clippy::panic`, but
`command.rs`'s two unit tests used `.unwrap()` and `panic!`, so
`cargo clippy --workspace --all-targets -- -D warnings` (a CI gate)
failed on them. Convert both to the crate's Result-returning test
convention: `CommandIntent::parse(...)?` instead of `.unwrap()`, and a
`return Err(...)` in the let-else instead of `panic!`. Same assertions;
`DomainError` is `thiserror::Error`, so `?` flows into `Box<dyn Error>`.

Workspace clippy --all-targets now reports 0 errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 13:56:35 -04:00
ZacharyZhang-NY d076dad356 Fix shell regressions and reset Servo embedding direction 2026-05-16 11:23:41 -04:00
ZacharyZhang-NY 80729083eb feat(sync): include history in snapshots 2026-05-16 07:03:59 -04:00
ZacharyZhang-NY 5409c02394 feat(sync): include profiles in snapshots 2026-05-16 06:31:52 -04:00
ZacharyZhang-NY 323271fc1f feat(sync): include reading list in snapshots 2026-05-16 06:17:38 -04:00
ZacharyZhang-NY b2b3d5deca feat(sync): include notes in snapshots 2026-05-16 06:07:44 -04:00
ZacharyZhang-NY bfdc97d7fd feat(sync): preserve spaces in snapshots 2026-05-16 05:42:17 -04:00
ZacharyZhang-NY d05d31ed22 feat(sync): include open tabs in snapshots 2026-05-16 03:44:07 -04:00
ZacharyZhang-NY 40ab6b4874 feat(sync): round trip cloud snapshots 2026-05-16 00:01:28 -04:00
ZacharyZhang-NY 1c72622db8 Resolve favicons through Google's s2 service
Pointing the renderer at the site's own `/favicon.ico` was producing
GPUI image-cache errors on every other tab — notion.com redirected
across origins, sites shipped multi-image `image/x-icon` blobs the
PNG/WebP decoder couldn't read, hosts 404'd. Each one logged a noisy
`ERROR gpui::asset_cache: Failed to load asset` line.

Switch `UrlText::favicon_url` to
`https://www.google.com/s2/favicons?domain=<host>&sz=64`. Google's
endpoint normalises every response to PNG, follows redirects on its
side, and serves a `_/` globe glyph for sites without a favicon at
all — same URL shape every browser dev-tools panel already shows
for "favicon" so the fetch is uniformly succeeding.
2026-05-15 21:59:30 -04:00
ZacharyZhang-NY 467dcb1f87 Reflect real sync state on the Sync settings page
`SyncConnectionState` was a one-variant enum (`SignedOut`), so the
Sync page rendered "Local-only · sign-in coming soon" even after the
bearer token landed on disk and the upload thread completed. The
state machine now mirrors the actual lifecycle.

What lands:
- `SyncConnectionState` gains `SignedIn`, `AwaitingDeviceApproval`,
  `SyncReady { last_synced_at_secs }`, `SyncError { message }`.
  `SyncObjectState::Synced` joins the per-object enum so individual
  rows can advertise "Synced" once a successful upload lands.
- `BrowserCore` stores the current `SyncConnectionState` and exposes
  `set_sync_connection_state`. `sync_status` now propagates the live
  state into the snapshot the UI reads.
- `ElyShell::probe_initial_sync_state` inspects
  `<profile_data>/sync/bearer.token` synchronously at construction
  so the first render of the sync page is honest about whether the
  user is signed in.
- A `std::sync::mpsc` channel ferries upload outcomes from the
  off-thread worker back to the shell; the existing 8 ms tick
  drains it and stamps `core.set_sync_connection_state` with the
  freshest result. The UI now shows "Signed in · awaiting first
  sync", "Synced · last upload Xm ago", "Sync error · …", and the
  worker-special "Signed in · waiting for device approval" when the
  server returns `device_not_approved`.
2026-05-15 19:58:42 -04:00
ZacharyZhang-NY 3d2c3ed1bf Propagate page title and favicon into the active tab
Servo already publishes the live page title in every `LiveFrameReport`
but the renderer was dropping it on the floor — tabs that navigated
away from `ely://new-tab` kept showing "New Tab" forever, and there
was no favicon visible anywhere in the sidebar.

Add `BrowserCore::set_tab_title` and switch `set_tab_favicon_key` to
return `Ok(true)` only when the value actually changed; both methods
mirror the new value into the matching history entry so the History
page stays in lockstep. Derive the canonical `/favicon.ico` URL from
the loaded URL on `UrlText` and store it as the tab's `favicon_key`.

In the surface layer, every Ready frame now emits a
`WebSurfacePageMetadata` change alongside any `WebSurfaceUrlChange`,
and the controller applies title + favicon URL together. Render the
sidebar tab row's favicon via GPUI's HTTP image loader (falling
through to the URL-derived glyph for `ely://` pages, file URLs, and
hosts without a /favicon.ico endpoint).
2026-05-15 16:53:32 -04:00
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