From 6cab19ce01f94cd837b5e88544df7cde62e516e3 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Sat, 8 Aug 2026 04:50:14 +0800 Subject: [PATCH] fix(menu): put SSH in the menu bar, and stop offering Full Screen twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SSH is one of the reasons to pick tty7 and it had no entry in the menu bar at all — the only routes were ⌘P and Settings, both of which you have to already know about. Manage Profiles and Reconnect now sit in File beside the other things that open a pane; Remote Files and Port Forwarding sit in View beside the other panel toggles. Same labels as the command palette, so there is still one name per thing. AppKit adds its own "Enter Full Screen" to the bottom of any menu named View, so ours sat directly above it: the same command listed twice under two different shortcuts. Ours is gone; ⌘↵ still works and is listed on the Keybindings page. Drops the AppMenuEnterFullscreen key with it. --- src/ui/i18n/en.rs | 1 - src/ui/i18n/ja.rs | 1 - src/ui/i18n/mod.rs | 2 -- src/ui/i18n/zh.rs | 1 - src/ui/theme.rs | 16 ++++++++++++++-- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/ui/i18n/en.rs b/src/ui/i18n/en.rs index f8767753..2313f006 100644 --- a/src/ui/i18n/en.rs +++ b/src/ui/i18n/en.rs @@ -1241,7 +1241,6 @@ pub fn translate_en(key: L10nKey) -> &'static str { L10nKey::AppMenuFocusPreviousPane => "Focus Previous Pane", L10nKey::AppMenuZoomPane => "Zoom Pane", L10nKey::AppMenuClearScrollback => "Clear Scrollback", - L10nKey::AppMenuEnterFullscreen => "Enter Full Screen", L10nKey::AppMenuDocumentation => "tty7 Documentation", L10nKey::AppMenuKeyboardShortcuts => "Keyboard Shortcuts", L10nKey::AppMenuJoinDiscord => "Join the Discord", diff --git a/src/ui/i18n/ja.rs b/src/ui/i18n/ja.rs index 2641042d..460dcf0b 100644 --- a/src/ui/i18n/ja.rs +++ b/src/ui/i18n/ja.rs @@ -1284,7 +1284,6 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> { L10nKey::AppMenuFocusPreviousPane => "前のペインにフォーカス", L10nKey::AppMenuZoomPane => "ペインを拡大", L10nKey::AppMenuClearScrollback => "スクロールバックをクリア", - L10nKey::AppMenuEnterFullscreen => "全画面表示", L10nKey::AppMenuDocumentation => "tty7 ドキュメント", L10nKey::AppMenuKeyboardShortcuts => "キーボードショートカット", L10nKey::AppMenuJoinDiscord => "Discord に参加", diff --git a/src/ui/i18n/mod.rs b/src/ui/i18n/mod.rs index add96591..5cc4b7e6 100644 --- a/src/ui/i18n/mod.rs +++ b/src/ui/i18n/mod.rs @@ -718,7 +718,6 @@ pub enum L10nKey { AppMenuFocusPreviousPane, AppMenuZoomPane, AppMenuClearScrollback, - AppMenuEnterFullscreen, AppMenuDocumentation, AppMenuKeyboardShortcuts, AppMenuJoinDiscord, @@ -1734,7 +1733,6 @@ mod tests { L10nKey::AppMenuFocusPreviousPane, L10nKey::AppMenuZoomPane, L10nKey::AppMenuClearScrollback, - L10nKey::AppMenuEnterFullscreen, L10nKey::AppMenuDocumentation, L10nKey::AppMenuKeyboardShortcuts, L10nKey::AppMenuJoinDiscord, diff --git a/src/ui/i18n/zh.rs b/src/ui/i18n/zh.rs index cd02070f..eff6da6d 100644 --- a/src/ui/i18n/zh.rs +++ b/src/ui/i18n/zh.rs @@ -1184,7 +1184,6 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> { L10nKey::AppMenuFocusPreviousPane => "聚焦上一个窗格", L10nKey::AppMenuZoomPane => "缩放窗格", L10nKey::AppMenuClearScrollback => "清除 scrollback", - L10nKey::AppMenuEnterFullscreen => "进入全屏", L10nKey::AppMenuDocumentation => "tty7 文档", L10nKey::AppMenuKeyboardShortcuts => "键盘快捷键", L10nKey::AppMenuJoinDiscord => "加入 Discord", diff --git a/src/ui/theme.rs b/src/ui/theme.rs index 18bf7c06..67292946 100644 --- a/src/ui/theme.rs +++ b/src/ui/theme.rs @@ -40,6 +40,13 @@ pub(crate) fn set_menus(cx: &mut App) { MenuItem::action(t(L10nKey::AppMenuNewWorkspace), NewWorkspace), MenuItem::action(t(L10nKey::AppMenuNewWorktreeTab), NewWorktreeTab), MenuItem::separator(), + // SSH is one of the reasons to pick tty7 and it had no entry in the + // menu bar at all — the only routes were ⌘P and Settings, both of + // which you have to already know about. Same labels as the palette, + // so there is still one name per thing. + MenuItem::action(t(L10nKey::CmdSshManageProfiles), OpenSshProfiles), + MenuItem::action(t(L10nKey::CmdSshReconnect), RestartSshSession), + MenuItem::separator(), MenuItem::action(t(L10nKey::AppMenuSplitRight), SplitRight), MenuItem::action(t(L10nKey::AppMenuSplitDown), SplitDown), MenuItem::separator(), @@ -86,13 +93,18 @@ pub(crate) fn set_menus(cx: &mut App) { MenuItem::action(t(L10nKey::AppMenuCodePanel), ToggleCodePanel), MenuItem::action(t(L10nKey::AppMenuTabBarPosition), ToggleTabSidebar), MenuItem::separator(), + MenuItem::action(t(L10nKey::CmdSshRemoteFiles), ToggleSftp), + MenuItem::action(t(L10nKey::CmdSshPortForwarding), ShowSshForwards), + MenuItem::separator(), MenuItem::action(t(L10nKey::AppMenuFocusNextPane), FocusNextPane), MenuItem::action(t(L10nKey::AppMenuFocusPreviousPane), FocusPrevPane), MenuItem::action(t(L10nKey::AppMenuZoomPane), ToggleMaximizePane), MenuItem::separator(), MenuItem::action(t(L10nKey::AppMenuClearScrollback), ClearScrollback), - MenuItem::separator(), - MenuItem::action(t(L10nKey::AppMenuEnterFullscreen), ToggleFullscreen), + // No "Enter Full Screen" here: AppKit puts its own at the bottom of + // any menu named View, so ours sat directly above it — the same + // command twice, under two different shortcuts. ⌘↵ still works and + // is listed on the Keybindings page. ]), Menu::new(t(L10nKey::AppMenuWindow)).items(window_menu_items(cx)), Menu::new(t(L10nKey::AppMenuHelp)).items([