Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee97a260f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ); | ||
| options.allowedTools = [ | ||
| ...(options.allowedTools ?? []), | ||
| ...session.mcpServers.map((server) => `mcp__${server.name}`), |
There was a problem hiding this comment.
Allow the fully qualified Claude MCP tool
For every Claude session with feedback enabled, the exposed tool is named mcp__obsidian-copilot__send_feedback, but this allow entry is only mcp__obsidian-copilot and therefore matches nothing. The Claude Agent SDK permission docs require either the complete MCP tool name or a pattern after mcp__<server>__; consequently the call falls through to PermissionBridge.canUseTool() and displays the ordinary permission card, contradicting this feature's no-prompt behavior. Use the exact tool name or mcp__${server.name}__*.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed; this code now lives in #3593. Claude Code permission rules treat a server-level mcp__<server> entry as matching every tool on that server ("mcp__puppeteer matches any tool provided by the puppeteer server"). In the end-to-end trigger runs, the harness rejected every unrelated permission prompt, and Claude still raised the card. That could not happen if send_feedback had hit a prompt.
| let message: JsonRpcRequest; | ||
| try { | ||
| message = JSON.parse(await readBody(request)) as JsonRpcRequest; |
There was a problem hiding this comment.
Validate parsed JSON-RPC values before property access
If an authenticated MCP client sends syntactically valid JSON whose root is null, this cast succeeds and the subsequent message.id access throws. Because the HTTP server invokes handleHttpRequest() with void and no rejection handler, the request is left without a response and the rejection becomes unhandled in the plugin process. Validate that the parsed value is a non-null object before accessing it and return a JSON-RPC invalid-request error for malformed message shapes.
Useful? React with 👍 / 👎.
| canCaptureTarget: () => app.workspace.getLeavesOfType(CHAT_AGENT_VIEWTYPE).length > 0, | ||
| resolveCaptureTarget: () => { | ||
| const leaf = app.workspace.getLeavesOfType(CHAT_AGENT_VIEWTYPE)[0]; | ||
| if (!leaf) return null; |
There was a problem hiding this comment.
Capture the chat that opened the feedback report
When more than one Agent Chat leaf is open, including a popout, pressing Review & report on one card still resolves the screenshot target as the first leaf returned by getLeavesOfType(). Because feedback reports preselect the screenshot, preparing and uploading from chat B can therefore send a screenshot of unrelated chat A, including its private note or prompt content, while the attachment list merely says “Screenshot of the Agent Mode pane.” Pass the originating leaf or element from the card instead of selecting an arbitrary global leaf.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed. Review & report passes its own button as origin, and openReportIssueModal (#3594) captures the Agent leaf that contains that button instead of the first leaf. Covered in FeedbackCard.test.tsx, AgentChatMessages.test.tsx and ReportIssueModal.test.tsx.
End-to-end trigger test: when the card appears, and when it does notBuild
No false positives in 27 no-complaint chats. Complaints were caught 4/4 on Claude and 3/3 on Codex. OpenCode with In Codex P2 the card appears mid-turn, then Codex in Safe mode asks permission to run the miyo-search script; that unrelated prompt is where the recording ends. The card did not wait for the turn. Claude: N1, N2, N3, then P1 and P2 each raise a card feedback-e2e-claude.mp4Codex: N1, N2, N3, then P1 and P2 each raise a card feedback-e2e-codex.mp4OpenCode: N1, N2, N3, P1 raises a card, P2 does not feedback-e2e-opencode.mp4 |
Trigger test after rewording the prompt pointer (99766a9)The previous run showed OpenCode (
Same scenarios, same build content, each in a fresh chat:
Still no false positives (0 cards in 24 no-complaint chats). Claude and Codex catch every complaint. OpenCode with In both Codex P2 runs the card appears first, then Codex keeps going: once it asks the user where the note lives, once it asks to run a shell command. The test runner rejects unrelated shell-permission prompts so a scenario cannot hang. Claude: N1, N2, N3, P1 card, P2 card (the recording stops once the P2 card is on screen; the reply after it lists other local vault paths) feedback-e2e-v3b-claude.mp4Codex: N1, N2, N3, P1 card, P2 card feedback-e2e-v3-codex.mp4OpenCode: N1, N2, N3, P1 card, P2 card feedback-e2e-v3-opencode.mp4 |
99766a9 to
abfc3fa
Compare
abfc3fa to
22e6c74
Compare
d3becd0 to
b39b5b6
Compare
b39b5b6 to
24c2e67
Compare
Agents get a plugin-owned send_feedback MCP tool, served over loopback HTTP with a per-session token, that drafts a report card in the chat. Review & report opens the existing Report an issue flow prefilled; nothing is sent until the user uploads. One card per session, and an Advanced setting turns it off. Relates to Brevilabs/obsidian-copilot-private#672 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Master's file-edit policy left the full prompt at 2999 bytes, and the send_feedback pointer adds 287, so the compact-prompt guard moves to 3300. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The report's screenshot is now the whole window the user was working in, so the card no longer hands its button over to pick a pane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e with it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24c2e67 to
ed57843
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed5784324d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| subscribeToSettingsChange((prev, next) => { | ||
| if (prev.agentMode.offerFeedbackCards !== next.agentMode.offerFeedbackCards) { | ||
| refreshSystemPromptAffected(); | ||
| } |
There was a problem hiding this comment.
Restart Claude sessions when enabling feedback cards
When a Claude chat was created while feedback cards were disabled, enabling this setting does not activate the feature for that chat. This callback only refreshes descriptors with restartOnSystemPromptChange, while the Claude descriptor sets that flag to false; ClaudeSdkBackendProcess also snapshots both systemPromptAppend and mcpServers when the session opens. The enabled setting therefore has no effect until the user creates or reopens a Claude chat, so this change should explicitly refresh or replace Claude sessions when the setting is enabled.
Useful? React with 👍 / 👎.
Relates to Brevilabs/obsidian-copilot-private#672
Why
When an Agent Chat turn goes wrong, the user usually says so in the chat ("What the fuck? I mean, commit and push. Why do you switch to a different language?"), and that complaint is the best bug report we will ever get: what happened, the user's own words, and how to reproduce it. Today it goes nowhere. Sending it to us means finding Advanced → Report an issue and rewriting the failure from memory, and the agent cannot help because Agent Chat gives agents no Copilot-owned tools.
What
Every Agent Chat backend (Claude, Codex, OpenCode) can now raise a feedback card when the user complains or the agent notices its own mistake. The agent drafts the report; nothing is sent until the user uploads it.
Non goal
/feedbackcommand.Screenshot
Card under a turn that also changed a note, below that turn's files-changed card (component gallery):
Card raised by Claude after the complaint from the issue:
Review & report opens the existing dialog with the draft filled in and every attachment ticked:
After upload, the card shows the report ID:
Risk
High
Review: inspect the
offerFeedbackCardssettings subscriber increateAgentSessionManagerinsrc/agentMode/index.ts;connectFeedbackServerand its calls increateSessionandresumeSessionFromHistoryinsrc/agentMode/session/AgentSessionManager.ts;offerFeedback,dismissFeedbackOfferandmarkFeedbackReportedinsrc/agentMode/session/AgentSession.ts;findFeedbackCardIndexinsrc/agentMode/ui/FeedbackCard.tsx; and thefeedbackCardwiring insrc/agentMode/ui/AgentChatMessages.tsx, line by line. Review the new prompt text:COPILOT_FEEDBACK_POINTERinsrc/agentMode/backends/shared/agentSystemPrompt.ts. Then run Verification steps 2-7.Verification
Reply only with the word: hej. Then nothing else., thenWhat the fuck? Why do you answer in Swedish? I asked you in English. This is the third time Copilot switches language on me.A card appears under the second reply, quoting the complaint verbatim, with no permission prompt. Repeat in a Codex chat and an OpenCode chat.Evidence:line naming the backend, model and session; every attachment is ticked. Edit the text, prepare and upload. Your browser opens the prefilled GitHub issue (do not submit it), and the card shows Report sent with the report ID. The bundle's screenshot is of the Obsidian window showing the chat and its card, without the dialog.Ugh, my essay draft is terrible, help me tighten the intro.No card appears.