Repository navigation
fix(opencode): show actions for wildcard permission resources - #20
Closed
AndreiShenets wants to merge 4 commits into
Closed
AndreiShenets wants to merge 4 commits into
AndreiShenets wants to merge 4 commits into
Conversation
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.
Summary
OpenCode approval prompts can show wildcard resources instead of a useful action name. When any resource contains
*, show the actual permission action instead, keeping the existing one-line presentation.Only the OpenCode V2 adapter and its existing replay tests change. This also covers patterns such as
git status *and/folder/*, including mixed resource lists. Commands and paths without*, approval decisions, and native permission scopes are unchanged. Web, desktop, and mobile use the existing shared approval prompt.Related upstream UI fix: anomalyco/opencode#60548.
Evidence
*,git status *, or a mixed list containing/second/*instead of the action.After: all seven focused cases pass, including mixed resource lists, unchanged literal command/path prompts, and the empty-resource fallback.
execute. The final prompt shows onlygithub_create_issue, with no JSON or extra scope line. No paid model or real GitHub operation was run. Image attachment pending: the Browser profile is signed out of GitHub.vp run check:changed: format, lint, both knip checks, generated GraphQL, and affected-package typechecks pass. Tests: 183 pass, two fail on Windows attachment path separators. Both failures were reproduced with the adapter restored byte-for-byte to the base version; they are outside this change.vp test run apps/server/src/orchestration-v2/Adapters/OpenCode2AdapterV2.test.ts -t "shows a .* permission prompt"— 7 passed, including anexecute-sourced MCP permission showing the nested action rather thanexecute.git diff --checkpasses.Merge Danger
Door: two-way
Blast Radius: OpenCode
Display-only adapter formatting; no UI, schema, persistence migration, or authorization changes. No upstream contribution or merge is requested in this PR.
Opus 5.5 reviewed the updated
contains("*")behavior and tests: no material findings on either standards or requirements. Earlier feedback was addressed withexecutecoverage and test-label/fixture cleanup.Created with GPT-6.1 Sol in OpenCode.