Fix MCP exec permission display metadata#2184
Open
GHX5T-SOL wants to merge 2 commits into
Open
Conversation
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/components/permissions/PermissionSelector.tsx:34-36
The `claudeCode` property in the `meta` type annotation is no longer accessed directly — `getMcpPermissionToolName` now handles that path. The type can be simplified to only what `meta` is still used for (`codeToolKind`).
```suggestion
const meta = toolCall._meta as
| { codeToolKind?: string }
| undefined;
```
Reviews (1): Last reviewed commit: "Fix MCP exec permission display metadata" | Re-trigger Greptile |
Comment on lines
34
to
36
| const meta = toolCall._meta as | ||
| | { codeToolKind?: string; claudeCode?: { toolName?: string } } | ||
| | undefined; |
Contributor
There was a problem hiding this comment.
The
claudeCode property in the meta type annotation is no longer accessed directly — getMcpPermissionToolName now handles that path. The type can be simplified to only what meta is still used for (codeToolKind).
Suggested change
| const meta = toolCall._meta as | |
| | { codeToolKind?: string; claudeCode?: { toolName?: string } } | |
| | undefined; | |
| const meta = toolCall._meta as | |
| | { codeToolKind?: string } | |
| | undefined; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/components/permissions/PermissionSelector.tsx
Line: 34-36
Comment:
The `claudeCode` property in the `meta` type annotation is no longer accessed directly — `getMcpPermissionToolName` now handles that path. The type can be simplified to only what `meta` is still used for (`codeToolKind`).
```suggestion
const meta = toolCall._meta as
| { codeToolKind?: string }
| undefined;
```
How can I resolve this? If you propose a fix, please make it concise.
Author
|
Addressed the Greptile type-cleanup note in Validation:
|
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
rawInputexecpermission cards rendering asposthog - Read execute-sql (MCP)instead of a genericexectitleFixes #2177.
Validation
pnpm install --frozen-lockfile --ignore-scriptspnpm build:depspnpm exec vitest run src/renderer/components/permissions/PermissionSelector.test.tsx src/renderer/features/posthog-mcp/utils/posthog-exec-display.test.tsfromapps/codepnpm exec vitest run src/adapters/claude/permissions/permission-handlers.test.tsfrompackages/agentpnpm exec biome check apps/code/src/renderer/components/permissions/McpPermission.tsx apps/code/src/renderer/components/permissions/PermissionSelector.tsx apps/code/src/renderer/components/permissions/PermissionSelector.test.tsx packages/agent/src/adapters/claude/permissions/permission-handlers.ts packages/agent/src/adapters/claude/permissions/permission-handlers.test.tspnpm --filter @posthog/code typecheckpnpm --filter @posthog/agent typecheckNo packaged app/manual UI smoke was run.