Conversation
This was referenced Jan 9, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request implements support for concurrent/multiple pending permissions, changing from a single current_permission state to a pending_permissions queue. The feature introduces a new permission_window module that manages a queue of permissions and displays them with numbered keybindings (e.g., a1, a2 for multiple permissions).
Key Changes
- Refactored state management from single
current_permissiontopending_permissionsarray - Added new
permission_window.luamodule to manage permission queue and keymaps - Updated rendering logic to display all pending permissions as a system message
- Modified API functions to accept optional permission parameter for targeted responses
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/opencode/ui/permission_window.lua | New module implementing permission queue management and display |
| lua/opencode/state.lua | Changed from single permission to permissions array |
| lua/opencode/ui/renderer.lua | Updated to append permissions display and handle queue |
| lua/opencode/ui/formatter.lua | Removed old permission formatting, added new display logic |
| lua/opencode/api.lua | Updated API functions to accept optional permission parameter |
| lua/opencode/core.lua | Updated to work with permission queue |
| lua/opencode/keymap.lua | Removed old permission keymap toggle function |
| lua/opencode/event_manager.lua | Updated type annotations for permission events |
| tests/unit/hooks_spec.lua | Updated tests for new permission model |
| tests/unit/keymap_spec.lua | Removed obsolete permission keymap tests |
| tests/data/*.json | Updated test expectations for new permission display format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… queue and window
- Fix permission detection to check array length instead of nil comparison - Refactor permission keymap setup to be more robust and context-aware - Improve permission display with clearer action ordering and labels - Fix permission cleanup to properly remove keymaps when queue is empty - Update test expectations for new permission display format
0fae1c5 to
f4ef435
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.