ZIm/crates
Finn Evers 2044426634
gpui: Improve displayed keybinds shown in macOS application menus (#28440)
Closes #28164

This PR adresses inproper keybinds being shown in MacOS application
menus. The issue arises because the keybinds shown in MacOS application
menus are unaware of keybind contexts (they are only ever updated [on a
keymap-change](6d1dd109f5/crates/zed/src/zed.rs (L1421))).
Thus, using the keybind that was added last in the keymap can result in
incorrect keybindings being shown quite frequently, as they might belong
to a different context not generally available (applies the same for the
default keymap as well as for user-keymaps).

For example, the linked issue arises because the keybind found last in
the iterator is
6d1dd109f5/assets/keymaps/vim.json (L759),
which is not even available in most contexts (and, additionally, the `e`
of `escape` is rendered here as a keybind which seems to be a seperate
issue).

Additionally, this would result in inconsistent behavior with some
Vim-keybinds. A vim-keybind would be used only when available but
otherwise the default binding would be shown (see `Undo` and `Redo` as
an example below), which seems inconsistent.

This PR fixes this by instead using the first keybind found in keymaps,
which is expected to be the keybind available in most contexts.
Additionally, this allows rendering some more keybinds for actions which
vim-keybind cannot be displayed (Find In Project for example) .This
seems to be more reasonable until [this related
comment](6d1dd109f5/crates/gpui/src/keymap.rs (L199-L204))
is resolved.

This includes a revert of #25878 as well. With this change, the change
made in #25878 becomes obsolete and would also regress the behavior back
to the state prior to that PR.

|  | `main` | This PR |
| --- | --- | --- |
| Edit-menu | <img width="220" alt="main_edit"
src="https://github.com/user-attachments/assets/9f793b64-80b6-4a5b-b7e5-628f0d552166"
/> | <img width="220" alt="PR_edit"
src="https://github.com/user-attachments/assets/bccb444c-7a49-41d5-9377-d90b1639a3ed"
/> |
| View-menu | <img width="214" alt="main_view"
src="https://github.com/user-attachments/assets/0e6a6632-df02-4883-9f5a-facb4d0263b5"
/> | <img width="214" alt="PR_view"
src="https://github.com/user-attachments/assets/14600ece-fcaa-447a-94ef-4fa350eca49c"
/> |


Release Notes:

- Improved keybinds displayed for actions in MacOS application menus.
2025-05-22 09:51:51 -04:00
..
activity_indicator Surface version to install in update status tooltip (#31179) 2025-05-22 12:37:18 +00:00
agent chore: Make terminal_view own the TerminalSlashCommand (#31070) 2025-05-21 09:27:54 +00:00
anthropic Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
askpass askpass: Workaround rust lang 69343 (#30774) 2025-05-16 05:04:36 -04:00
assets Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
assistant_context_editor chore: Make terminal_view own the TerminalSlashCommand (#31070) 2025-05-21 09:27:54 +00:00
assistant_settings language_models: Add tool use support for Mistral models (#29994) 2025-05-19 18:36:59 +02:00
assistant_slash_command chore: Make terminal_view own the TerminalSlashCommand (#31070) 2025-05-21 09:27:54 +00:00
assistant_slash_commands chore: Make terminal_view own the TerminalSlashCommand (#31070) 2025-05-21 09:27:54 +00:00
assistant_tool Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
assistant_tools agent: Improve Gemini support in the edit_file tool (#31116) 2025-05-22 12:01:43 +03:00
audio Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
auto_update Remove test-support feature from auto_update's gpui dep (#31147) 2025-05-22 03:32:29 +00:00
auto_update_helper Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
auto_update_ui Restyle notification close control (#30262) 2025-05-08 14:10:30 +00:00
aws_http_client Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
bedrock Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
breadcrumbs breadcrumbs: Update multibuffer to match singleton (#28267) 2025-04-07 20:26:55 +00:00
buffer_diff Fix diff recalculation hang (#28377) 2025-04-10 22:58:41 +00:00
call Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
channel Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
cli Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
client Fix socks proxy local DNS resolution not respected (#30619) 2025-05-21 14:55:39 +08:00
clock Add the ability to follow the agent as it makes edits (#29839) 2025-05-04 08:28:39 +00:00
collab debugger: Use DAP schema to configure daps (#30833) 2025-05-22 05:48:26 -04:00
collab_ui Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
collections Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
command_palette Simplify the SerializableItem::cleanup implementation (#29567) 2025-04-28 22:15:24 +00:00
command_palette_hooks Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
component component: Replace linkme with inventory (#30705) 2025-05-14 23:29:11 +02:00
context_server Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
copilot copilot: Fix rate limit due to Copilot-Vision-Request header (#30989) 2025-05-21 12:51:35 -04:00
credentials_provider Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
dap debugger beta: Fix panic that could occur when parsing an invalid dap schema (#31175) 2025-05-22 07:25:07 -04:00
dap_adapters debugger beta: Fix panic that could occur when parsing an invalid dap schema (#31175) 2025-05-22 07:25:07 -04:00
db Add end of service notifications (#30982) 2025-05-20 00:20:00 +00:00
debug_adapter_extension debugger beta: Fix dap_schema for DAP extensions (#31173) 2025-05-22 07:24:46 -04:00
debugger_tools Rename debug: commands to dev: (#30675) 2025-05-14 11:15:27 +02:00
debugger_ui Handle ~ in debugger launch modal (#31087) 2025-05-22 11:20:00 +00:00
deepseek Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
diagnostics component: Replace linkme with inventory (#30705) 2025-05-14 23:29:11 +02:00
docs_preprocessor Simplify docs preprocessing (#30947) 2025-05-19 08:16:14 -04:00
editor debugger: Add telemetry for new session experience (#31171) 2025-05-22 11:15:33 +00:00
eval chore: Make terminal_view own the TerminalSlashCommand (#31070) 2025-05-21 09:27:54 +00:00
extension debugger beta: Fix dap_schema for DAP extensions (#31173) 2025-05-22 07:24:46 -04:00
extension_api debugger: Use DAP schema to configure daps (#30833) 2025-05-22 05:48:26 -04:00
extension_cli Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
extension_host debugger beta: Fix dap_schema for DAP extensions (#31173) 2025-05-22 07:24:46 -04:00
extensions_ui Improve error message around failing to install dev extensions (#30711) 2025-05-14 17:22:17 +00:00
feature_flags Add a picker for jj bookmark list (#30883) 2025-05-17 16:42:45 +00:00
feedback feedback: Update issue template URL (#28790) 2025-04-15 21:36:30 -04:00
file_finder Add icons to the built-in picker for Open (#30893) 2025-05-21 13:07:22 +03:00
file_icons Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
fs Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
fsevent Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
fuzzy Fix out-of-bounds panic in fuzzy matcher with Unicode/multibyte characters (#30546) 2025-05-12 14:43:14 +00:00
git Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
git_hosting_providers Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
git_ui Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
go_to_line editor: Add minimap (#26893) 2025-05-07 23:11:09 +03:00
google_ai Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
gpui gpui: Improve displayed keybinds shown in macOS application menus (#28440) 2025-05-22 09:51:51 -04:00
gpui_macros ui_macros: Remove DerivePathStr macro (#30862) 2025-05-17 10:05:55 +00:00
gpui_tokio Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
html_to_markdown Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
http_client Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
http_client_tls Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
icons agent: Fix layout shift due to the "Generating" label (#30422) 2025-05-09 16:20:14 -03:00
image_viewer Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
indexed_docs Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
inline_completion Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
inline_completion_button Add end of service notifications (#30982) 2025-05-20 00:20:00 +00:00
install_cli Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
jj Add a picker for jj bookmark list (#30883) 2025-05-17 16:42:45 +00:00
jj_ui Add a picker for jj bookmark list (#30883) 2025-05-17 16:42:45 +00:00
journal VSCode Settings import (#29018) 2025-04-23 20:54:09 +00:00
language agent: Improve Gemini support in the edit_file tool (#31116) 2025-05-22 12:01:43 +03:00
language_extension debugger/extensions: Revert changes to extension store related to language config (#30225) 2025-05-08 14:01:39 +02:00
language_model Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
language_models Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
language_selector Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
language_tools Rename debug: commands to dev: (#30675) 2025-05-14 11:15:27 +02:00
languages debugger beta: Fix dap_schema for DAP extensions (#31173) 2025-05-22 07:24:46 -04:00
livekit_api Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
livekit_client Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
lmstudio Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
lsp Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
markdown markdown: Fix out of range panic in parser (#30510) 2025-05-11 15:08:37 +00:00
markdown_preview Canonicalize markdown link paths (#29119) 2025-05-21 12:57:51 -04:00
media Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
menu agent: Add new panel navigation dropdown (#29539) 2025-04-29 21:58:45 -03:00
migrator Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
mistral Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
multi_buffer editor: Trim indent guides at last non-empty line (#29482) 2025-05-12 17:04:46 +02:00
node_runtime Fix unzipping clangd and codelldb on Windows (#31080) 2025-05-21 21:17:14 +03:00
notifications component: Replace linkme with inventory (#30705) 2025-05-14 23:29:11 +02:00
ollama Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
open_ai Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
outline Highlight merge conflicts and provide for resolving them (#28065) 2025-04-23 12:38:46 -04:00
outline_panel chore: Bump Rust to 1.87 (#30739) 2025-05-15 22:28:52 +00:00
panel Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
paths Add a way to import ssh host names from the ssh config (#30926) 2025-05-18 20:34:47 +00:00
picker agent: Keyboard navigation improvements (#30274) 2025-05-09 13:52:06 +00:00
prettier Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
project debugger: Use DAP schema to configure daps (#30833) 2025-05-22 05:48:26 -04:00
project_panel Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
project_symbols Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
prompt_store Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
proto debugger: Use DAP schema to configure daps (#30833) 2025-05-22 05:48:26 -04:00
recent_projects Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
refineable Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
release_channel Fix handling of --system-specs argument so it happens before Application::new (#29240) 2025-04-22 21:32:32 +00:00
remote Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
remote_server Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
repl Add kernel detection for language support of runnable markdown cells (#29664) 2025-05-21 20:23:05 -07:00
reqwest_client Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
rich_text Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
rope extension_host: Turn on parallel compilation (#30942) 2025-05-19 18:06:33 +02:00
rpc Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
rules_library Reuse conversation cache when streaming edits (#30245) 2025-05-08 14:36:34 +02:00
schema_generator Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
search project search: Reduce clones and allocations (#31133) 2025-05-21 22:11:00 -04:00
semantic_index Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
semantic_version Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
session Avoid unnecessary DB writes (#29417) 2025-04-25 17:41:49 +03:00
settings Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
settings_ui Add searchable global tab switcher (#28047) 2025-04-28 09:21:27 +00:00
snippet Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
snippet_provider editor: Improve snippet completion to show key inline in completion and description as aside (#30603) 2025-05-13 05:28:59 +05:30
snippets_ui Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
sqlez Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
sqlez_macros Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
story gpui: Add a standard text example (#30747) 2025-05-16 17:35:44 +02:00
storybook Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
streaming_diff Introduce a new StreamingEditFileTool (#29733) 2025-05-01 17:37:43 +02:00
sum_tree Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
supermaven Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
supermaven_api Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
tab_switcher Add searchable global tab switcher (#28047) 2025-04-28 09:21:27 +00:00
task debugger: Use DAP schema to configure daps (#30833) 2025-05-22 05:48:26 -04:00
tasks_ui debugger: Add debug task picker to new session modal (#29702) 2025-05-02 08:38:29 +00:00
telemetry Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
telemetry_events Add new action to run agent eval (#29158) 2025-04-21 21:30:21 -07:00
terminal Reduce allocations (#30693) 2025-05-14 18:29:28 +02:00
terminal_view chore: Make terminal_view own the TerminalSlashCommand (#31070) 2025-05-21 09:27:54 +00:00
text Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
theme Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
theme_extension Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
theme_importer Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
theme_selector theme_selector: Don't select last theme when fuzzy searching (#28278) 2025-04-28 14:29:17 +00:00
time_format agent: Add date separators to Thread History (#29961) 2025-05-06 10:18:48 +00:00
title_bar title_bar: Fix config merging to respect priority (#30980) 2025-05-20 07:56:24 +00:00
toolchain_selector toolchain: Respect currently focused file when querying toolchains (#28875) 2025-04-16 19:05:57 +02:00
ui debugger: Add actions and keybindings for opening the thread and session menus (#31135) 2025-05-21 20:56:39 -04:00
ui_input component: Replace linkme with inventory (#30705) 2025-05-14 23:29:11 +02:00
ui_macros ui_macros: Remove DerivePathStr macro (#30862) 2025-05-17 10:05:55 +00:00
ui_prompt markdown: Don't retain MarkdownStyle in favor of using MarkdownElement directly (#28255) 2025-04-07 19:03:24 +00:00
util debugger: Use DAP schema to configure daps (#30833) 2025-05-22 05:48:26 -04:00
util_macros Fix license symlinks (#29758) 2025-05-01 19:24:14 +00:00
vim Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
vim_mode_setting VSCode Settings import (#29018) 2025-04-23 20:54:09 +00:00
web_search agent: Expose web search tool to beta users (#29273) 2025-04-23 15:30:20 +00:00
web_search_providers Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
welcome component: Replace linkme with inventory (#30705) 2025-05-14 23:29:11 +02:00
workspace Add excluded_files to pane::DeploySearch (#30699) 2025-05-21 13:03:39 +03:00
worktree Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
zed Rename 'Quit' to 'Quit Zed' in macOS menu (#31109) 2025-05-21 20:01:08 +00:00
zed_actions zed: Fix no way to open local folder from remote window (#30954) 2025-05-19 21:26:30 +05:30
zeta Meter edit predictions by acceptance in free plan (#30984) 2025-05-21 17:11:42 +00:00
zlog Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
zlog_settings VSCode Settings import (#29018) 2025-04-23 20:54:09 +00:00