From 53c75368ec845fecbef9e1b2babab0e603424448 Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Tue, 12 May 2026 21:48:19 +0800 Subject: [PATCH] fix(shell): web dispatcher handles FocusMcpPort MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Native press dispatcher learned FocusMcpPort in the previous commit but the web shell's parallel match was left without that arm — a click on the port field on web would silently fall through to no-op. Add the same focus + seed-draft flow on the web side so cross-platform behaviour stays identical. --- crates/openpencil-shell-web/src/widget_host/press.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/openpencil-shell-web/src/widget_host/press.rs b/crates/openpencil-shell-web/src/widget_host/press.rs index 9196714cb..ff9ad97c6 100644 --- a/crates/openpencil-shell-web/src/widget_host/press.rs +++ b/crates/openpencil-shell-web/src/widget_host/press.rs @@ -477,6 +477,10 @@ impl WidgetHost { AgentSettingsHit::ToggleImagesAdvanced => { self.document.ui.agent_settings.images_advanced_open ^= true; } + AgentSettingsHit::FocusMcpPort => { + self.document.ui.agent_settings.focus = Some(openpencil_shell_core::document::SettingsFocus::McpPort); + self.document.ui.settings_input_draft = self.document.ui.agent_settings.mcp_server.port.to_string(); + } AgentSettingsHit::AddProvider | AgentSettingsHit::AddAcpAgent | AgentSettingsHit::TestImageSearch | AgentSettingsHit::AddGenConfig | AgentSettingsHit::Inside => {} } true