From c772e8ee463a863a69a8818a4c507e0ef217f753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Fri, 10 Jul 2026 16:56:50 -0400 Subject: [PATCH] feat(splits): activate the split-pane reload button --- agents.md | 9 ++++++++ crates/ely_app/src/shell/chrome/split_pane.rs | 22 ++++++++++++------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/agents.md b/agents.md index 505ddc7..18ff708 100644 --- a/agents.md +++ b/agents.md @@ -82,6 +82,15 @@ Real and verified: - Site permissions: the per-site UI offers only the 5 features Servo actually enforces (`SitePermissionFeature::enforced()`), guarded against drift by `ely_servo_host`'s `enforced_features_match_the_servo_mapping`. +- Reload: Cmd/Ctrl+R (and the File menu) reload the active tab — a discrete + `Reload` sidecar command reaches `servo::WebView::reload()`, recovering + crashed/discarded tabs. Verified end-to-end against a local counter server + (LOAD 1 → LOAD 2). The webview loading state reconciles through + redirects/pushState (`awaiting_url_change`), and `run_dev.sh` resolves the + macOS Metal toolchain so `cargo run`'s shader-build failure is fixed. +- Cross-platform: download Open/Reveal use per-OS launchers (macOS `open`, + Windows `cmd start`/`explorer /select`, Linux `xdg-open`); the command + overlay closes on Escape. Deferred deliberately (do NOT fake; ship with their subsystem): - Updates settings page — returns with a real updater. diff --git a/crates/ely_app/src/shell/chrome/split_pane.rs b/crates/ely_app/src/shell/chrome/split_pane.rs index dd93f37..9424a2a 100644 --- a/crates/ely_app/src/shell/chrome/split_pane.rs +++ b/crates/ely_app/src/shell/chrome/split_pane.rs @@ -57,16 +57,22 @@ pub(crate) fn render_split_pane_header( .into_any_element() } -/// Reload affordance on each split-pane header. Real page reload isn't -/// exposed through `BrowserCore` yet — `refresh_tab` is `pub(super)` -/// and only flips the discard state. Render the glyph in the disabled -/// `INK_5` color and skip cursor + on_click rather than ship a button -/// that pretends to reload by re-selecting the tab. Wire a real -/// reload action when one lands. -fn render_reload_glyph(_tab_id: TabId, _cx: &mut Context) -> AnyElement { +/// Reload affordance on each split-pane header: select the pane's tab so it +/// becomes active, then reload it in place (the same select-then-act shape +/// the close glyph uses). +fn render_reload_glyph(reload_tab_id: TabId, cx: &mut Context) -> AnyElement { + let id = format!("split-pane-reload-{}", reload_tab_id.as_str()); div() - .text_color(rgb(colors::ink_5())) + .id(SharedString::from(id)) + .text_color(rgb(colors::ink_4())) .text_size(px(11.0)) + .cursor_pointer() + .hover(|style| style.text_color(rgb(colors::ink()))) + .on_click(cx.listener(move |shell, _, window, cx| { + shell.select_tab(&reload_tab_id, window, cx); + shell.reload_active_tab(window, cx); + cx.stop_propagation(); + })) .child(IconName::Redo2) .into_any_element() }