Skip to content

Fix ACP permission dialog keyboard shortcuts not working - #58365

Merged
dinocosta merged 4 commits into
zed-industries:mainfrom
wazer24:fix-acp-permission-shortcuts
Jun 11, 2026
Merged

Fix ACP permission dialog keyboard shortcuts not working#58365
dinocosta merged 4 commits into
zed-industries:mainfrom
wazer24:fix-acp-permission-shortcuts

Conversation

@wazer24

@wazer24 wazer24 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Add keyboard shortcut for macOS, in the ACP Permission dialog, for "Always Allow", following what is available in both Linux and Windows.

Self-Review Checklist

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #57546

Release Notes:

  • Added missing AllowAlways keybinding on macOS (cmd-alt-y).

@cla-bot

cla-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @wazer24 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jun 2, 2026
@cla-bot

cla-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @wazer24 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@wazer24

wazer24 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

'@cla-bot check'.

@cla-bot

cla-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @wazer24 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot

cla-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@wazer24

wazer24 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

'@cla-bot check'.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 2, 2026
@cla-bot

cla-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

2 similar comments
@cla-bot

cla-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@cla-bot

cla-bot Bot commented Jun 3, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@dinocosta dinocosta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @wazer24 ! Thank you for taking the time to contribute to Zed 🙂

Before reviewing these changes, I'd just like to double-check that you've actually be able to reproduce the issue reported in #57546 , as it seems I'm unable to reproduce it using the latest stable release (1.4.4).

Lastly, there's some formatting changes to assets/keymaps/default-windows.json that should be cleaned up, as they're not related to the issue being solved.

Thanks!

@dinocosta dinocosta self-assigned this Jun 3, 2026
@dinocosta dinocosta added the area:ai/acp Feedback for Zed's Agent Client Protocol label Jun 3, 2026
@wazer24
wazer24 force-pushed the fix-acp-permission-shortcuts branch from d723f75 to 79435a6 Compare June 4, 2026 09:37
@wazer24

wazer24 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Hey @wazer24 ! Thank you for taking the time to contribute to Zed 🙂

Before reviewing these changes, I'd just like to double-check that you've actually be able to reproduce the issue reported in #57546 , as it seems I'm unable to reproduce it using the latest stable release (1.4.4).

Lastly, there's some formatting changes to assets/keymaps/default-windows.json that should be cleaned up, as they're not related to the issue being solved.

Thanks!

Hi @dinocosta, thanks for the review! I've cleaned up the formatting changes — the diff now only contains the actual keybinding additions (13 lines across 3 files).

Regarding reproducibility: I looked at the GPUI dispatch code and you're right that bindings in the parent AcpThread context should also match when focus is in AcpThread > Editor, since the context stack includes the full path from root to focused node. So the shortcuts may indeed work on 1.4.4.

However, this PR still adds value:

It follows the existing pattern — other bindings like scroll actions are explicitly declared in both AcpThread and AcpThread > Editor contexts.
It adds the missing AllowAlways binding on macOS (cmd-alt-y), which was completely absent.
Thanks!

@wazer24
wazer24 requested a review from dinocosta June 4, 2026 12:05
wazer24 and others added 2 commits June 5, 2026 13:53
The bindings being added for the `AcpThread > Editor` context already
exist on the `AcpThread` context, so it'd be redundant to add these.
@dinocosta

Copy link
Copy Markdown
Member

Hey @wazer24 ! Thank you for taking the time to contribute to Zed 🙂
Before reviewing these changes, I'd just like to double-check that you've actually be able to reproduce the issue reported in #57546 , as it seems I'm unable to reproduce it using the latest stable release (1.4.4).
Lastly, there's some formatting changes to assets/keymaps/default-windows.json that should be cleaned up, as they're not related to the issue being solved.
Thanks!

Hi @dinocosta, thanks for the review! I've cleaned up the formatting changes — the diff now only contains the actual keybinding additions (13 lines across 3 files).

Regarding reproducibility: I looked at the GPUI dispatch code and you're right that bindings in the parent AcpThread context should also match when focus is in AcpThread > Editor, since the context stack includes the full path from root to focused node. So the shortcuts may indeed work on 1.4.4.

However, this PR still adds value:

It follows the existing pattern — other bindings like scroll actions are explicitly declared in both AcpThread and AcpThread > Editor contexts. It adds the missing AllowAlways binding on macOS (cmd-alt-y), which was completely absent. Thanks!

I believe that, for the scroll actions, we need that duplication in AcpThread and AcpThread > Editor because some of the bindings also exist in just the Editor context. For example, shift-pageup is bound to editor::SelectPageUp on the plain Editor context and, if we didn't bind it in AcpThread > Editor, to agent::ScrollOutputToPreviousMessage, then editor::SelectPageUp would be dispatched instead.

As such, I've gone ahead and removed the duplicate permissions-related actions being added and kept the addition ot macOS' default keymap. Thank you for taking another look! 🙂

@dinocosta
dinocosta added this pull request to the merge queue Jun 11, 2026
Merged via the queue into zed-industries:main with commit d130d03 Jun 11, 2026
36 checks passed
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…ies#58365)

## Summary

Add keyboard shortcut for macOS, in the ACP Permission dialog, for
"Always Allow", following what is available in both Linux and Windows.

### Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Release Notes:

- Added missing `AllowAlways` keybinding on macOS (`cmd-alt-y`).

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…ies#58365)

## Summary

Add keyboard shortcut for macOS, in the ACP Permission dialog, for
"Always Allow", following what is available in both Linux and Windows.

### Self-Review Checklist

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Release Notes:

- Added missing `AllowAlways` keybinding on macOS (`cmd-alt-y`).

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai/acp Feedback for Zed's Agent Client Protocol cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACP permission prompt: keyboard shortcuts non-functional, 'Allow once' missing shortcut

2 participants