fix(agent-panel): recover prompt submits failures - #10818
Merged
Light2Dark merged 1 commit intoSep 15, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
Contributor
|
@mscolnick I have started the AI code review. It will take a few minutes to complete. |
Contributor
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="frontend/src/components/chat/acp/agent-panel.tsx">
<violation number="1" location="frontend/src/components/chat/acp/agent-panel.tsx:907">
P2: When an unnamed notebook consumes a queued `pendingPrompt.submit`, this check returns after the effect has already cleared `pendingAiPromptAtom`, so the prompt is lost. Validate queued prompts before clearing them or restore the pending prompt on this failure.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
|
||
| let absoluteFilename: string; | ||
| try { | ||
| absoluteFilename = getAbsoluteFilename(); |
Contributor
There was a problem hiding this comment.
P2: When an unnamed notebook consumes a queued pendingPrompt.submit, this check returns after the effect has already cleared pendingAiPromptAtom, so the prompt is lost. Validate queued prompts before clearing them or restore the pending prompt on this failure.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At frontend/src/components/chat/acp/agent-panel.tsx, line 907:
<comment>When an unnamed notebook consumes a queued `pendingPrompt.submit`, this check returns after the effect has already cleared `pendingAiPromptAtom`, so the prompt is lost. Validate queued prompts before clearing them or restore the pending prompt on this failure.</comment>
<file context>
@@ -902,6 +902,18 @@ const AgentPanel: React.FC = () => {
+ let absoluteFilename: string;
+ try {
+ absoluteFilename = getAbsoluteFilename();
+ } catch {
+ toast({
</file context>
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
Fix two failure paths in the acp agent panel prompt-submission handler:
try/catch/finallyso preparation failures also release loading state.These failure paths were encountered while embedding acp-based cell. This change fixes the shared handler for both composer submissions and queued prompts; it adds no downstream-specific behavior, dependencies, or configuration.
📋 Pre-Review Checklist
✅ Merge Checklist