Skip to content

Send artifact error fix request directly instead of filling the input#2401

Open
gary149 wants to merge 2 commits into
mainfrom
claude/artifact-direct-message-send-ddflj4
Open

Send artifact error fix request directly instead of filling the input#2401
gary149 wants to merge 2 commits into
mainfrom
claude/artifact-direct-message-send-ddflj4

Conversation

@gary149

@gary149 gary149 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

The artifact panel's "ask to fix" button used to only prefill the chat
input, leaving the user to press send. The pending chat input store now
carries an optional submit flag, and the artifact panel sets it so the
error message is sent immediately. If submission is blocked (auth needed,
generation in flight), the text stays in the input as before. The
fullscreen preview and code block preview keep the prefill behavior.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01YXWhJSwjPnmtFisEwcbZ18

The artifact panel's "ask to fix" button used to only prefill the chat
input, leaving the user to press send. The pending chat input store now
carries an optional submit flag, and the artifact panel sets it so the
error message is sent immediately. If submission is blocked (auth needed,
generation in flight), the text stays in the input as before. The
fullscreen preview and code block preview keep the prefill behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YXWhJSwjPnmtFisEwcbZ18

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51b1677c60

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

draft = text;
// If handleSubmit bails (auth, generation in flight), the text stays
// in the input so nothing is lost
if (submit) handleSubmit();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prevent artifact auto-submit from sending pending files

When a user already has files attached in the composer, this new direct handleSubmit() path sends those existing attachments along with the generated error-fix prompt, because the normal submit flow consumes the current bound files state. Before this change the button only filled the input, so the user could notice/remove unrelated attachments before sending; with auto-submit this can accidentally upload files intended for a different message. Consider skipping auto-submit when files.length > 0 or submitting the artifact fix without carrying the current attachments.

Useful? React with 👍 / 👎.

draft = text;
// If handleSubmit bails (auth, generation in flight), the text stays
// in the input so nothing is lost
if (submit) handleSubmit();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate auto-submit for read-only conversations

This programmatic submit bypasses the UI controls that are disabled for isReadOnly, while handleSubmit() itself only checks auth, loading, and an empty draft. In a read-only conversation/model state, clicking the artifact “ask to fix” button now attempts to send/mutate even though the composer send button is disabled; keep the prefill-only behavior or add the same read-only guard before calling handleSubmit().

Useful? React with 👍 / 👎.

…hats

handleSubmit now bails in read-only conversations, matching the disabled
composer controls it can be reached around programmatically. The pending
chat input auto-send also falls back to prefill when files are staged in
the composer, so an error-fix prompt never sweeps along attachments the
user meant for another message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YXWhJSwjPnmtFisEwcbZ18
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