diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-02 02:45:20 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-02 02:45:20 +0300 |
| commit | cc88b3b8e5bb9f7d9f23ed6ae85a52fd7b5b9ed6 (patch) | |
| tree | 4d37c760099070f1a1488b61c7b7271875aafef8 /src/client/shell/mouse.rs | |
| parent | 18e69891dca486d669a584facd80644bb51f54a2 (diff) | |
feat: add stable client endpoint compatibility (#3509)
* feat: add stable client endpoint compatibility
* fix: keep portable-pty patch checks composable
* ci: run maintenance checks in pull requests
* fix: reject endpoint errors from terminal clients
* feat: keep compatible servers running across updates
Diffstat (limited to 'src/client/shell/mouse.rs')
| -rw-r--r-- | src/client/shell/mouse.rs | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/client/shell/mouse.rs b/src/client/shell/mouse.rs index 437ec4ed..612319e2 100644 --- a/src/client/shell/mouse.rs +++ b/src/client/shell/mouse.rs @@ -78,14 +78,20 @@ impl ClientShellState { self.pane_scroll_targets .insert(pane_id.clone(), offset_from_bottom); self.pane_scroll_in_flight.insert(pane_id.clone(), serial); - self.push_endpoint_method_with_kind( + if !self.push_endpoint_method_with_kind( crate::api::schema::Method::PaneScroll(crate::api::schema::PaneScrollParams { pane_id: pane_id.clone(), offset_from_bottom: offset_from_bottom as u64, }), - PendingEndpointKind::PaneScroll { pane_id, serial }, + PendingEndpointKind::PaneScroll { + pane_id: pane_id.clone(), + serial, + }, outcome, - ); + ) { + self.pane_scroll_targets.remove(&pane_id); + self.pane_scroll_in_flight.remove(&pane_id); + } } pub(super) fn complete_pane_scroll( @@ -120,10 +126,9 @@ impl ClientShellState { Some("endpoint returned an unexpected pane-scroll result".to_owned()); true } - Err(error) => { + Err(_) => { self.pane_scroll_queued.remove(&pane_id); self.pane_scroll_targets.remove(&pane_id); - self.endpoint_error = Some(error.message); true } }; @@ -893,6 +898,14 @@ impl ClientShellState { return; } } + if self.visible_endpoint_notice.is_some() + && mouse.kind == MouseEventKind::Down(MouseButton::Left) + && super::contains(self.hits.notification_toast, point) + { + self.visible_endpoint_notice = None; + outcome.repaint = true; + return; + } if self.overlay.is_none() && self.mode == ClientShellMode::Terminal && self |
