Skip to content

feat(code): show more context for MCP permission requests#2071

Merged
adboio merged 1 commit into
mainfrom
05-06-feat_code_show_more_context_for_mcp_permission_requests
May 6, 2026
Merged

feat(code): show more context for MCP permission requests#2071
adboio merged 1 commit into
mainfrom
05-06-feat_code_show_more_context_for_mcp_permission_requests

Conversation

@adboio
Copy link
Copy Markdown
Contributor

@adboio adboio commented May 6, 2026

Problem

MCP permissions requests lack context - e.g. here i have no idea if i want to approve exec lol

Screenshot 2026-05-06 at 9.41.25 AM.png

Changes

adds more context to the MCP permission requests

Screenshot 2026-05-06 at 10.38.00 AM.png

How did you test this?

manually / storybook

Publish to changelog?

no

Copy link
Copy Markdown
Contributor Author

adboio commented May 6, 2026

@adboio adboio requested a review from a team May 6, 2026 17:42
@adboio adboio marked this pull request as ready for review May 6, 2026 17:42
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 6, 2026

Comments Outside Diff (1)

  1. apps/code/src/renderer/components/permissions/McpPermission.tsx, line 40 (link)

    P1 The posthogDisplay.input field is designed as "Args to show as the input preview" (per the JSDoc in posthog-exec-display.ts), but fullInput always uses formatInput(toolCall.rawInput) — which for a call execute-sql {"query":"select 1"} invocation shows the outer {"command":"call execute-sql {…}"} wrapper instead of the cleaner extracted {"query":"select 1"}. The PostHogExecDisplay.input value goes entirely unused.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/code/src/renderer/components/permissions/McpPermission.tsx
    Line: 40
    
    Comment:
    The `posthogDisplay.input` field is designed as "Args to show as the input preview" (per the JSDoc in `posthog-exec-display.ts`), but `fullInput` always uses `formatInput(toolCall.rawInput)` — which for a `call execute-sql {"query":"select 1"}` invocation shows the outer `{"command":"call execute-sql {…}"}` wrapper instead of the cleaner extracted `{"query":"select 1"}`. The `PostHogExecDisplay.input` value goes entirely unused.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix 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/McpPermission.tsx:40
The `posthogDisplay.input` field is designed as "Args to show as the input preview" (per the JSDoc in `posthog-exec-display.ts`), but `fullInput` always uses `formatInput(toolCall.rawInput)` — which for a `call execute-sql {"query":"select 1"}` invocation shows the outer `{"command":"call execute-sql {…}"}` wrapper instead of the cleaner extracted `{"query":"select 1"}`. The `PostHogExecDisplay.input` value goes entirely unused.

```suggestion
  const fullInput = posthogDisplay?.input ?? formatInput(toolCall.rawInput);
```

Reviews (1): Last reviewed commit: "feat(code): show more context for MCP pe..." | Re-trigger Greptile

@adboio adboio force-pushed the 05-06-feat_code_clean_up_plan_question_response_key_handling_and_validation branch 2 times, most recently from ea9b396 to c50028d Compare May 6, 2026 21:50
@adboio adboio force-pushed the 05-06-feat_code_show_more_context_for_mcp_permission_requests branch from 081d2f3 to 482c4e0 Compare May 6, 2026 21:50
@adboio adboio changed the base branch from 05-06-feat_code_clean_up_plan_question_response_key_handling_and_validation to graphite-base/2071 May 6, 2026 21:58
@adboio adboio force-pushed the 05-06-feat_code_show_more_context_for_mcp_permission_requests branch from 482c4e0 to 22ab022 Compare May 6, 2026 21:58
@adboio adboio force-pushed the graphite-base/2071 branch from c50028d to a93b05f Compare May 6, 2026 21:58
@graphite-app graphite-app Bot changed the base branch from graphite-base/2071 to main May 6, 2026 21:59
@adboio adboio force-pushed the 05-06-feat_code_show_more_context_for_mcp_permission_requests branch from 22ab022 to 03ddd55 Compare May 6, 2026 21:59
@adboio adboio merged commit e9b889a into main May 6, 2026
16 checks passed
Copy link
Copy Markdown
Contributor Author

adboio commented May 6, 2026

Merge activity

@adboio adboio deleted the 05-06-feat_code_show_more_context_for_mcp_permission_requests branch May 6, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants