Repository navigation
prevent AI in-editor input from disappearing on rejection - #10206
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adjusts the frontend AI completion UIs to avoid losing the in-editor prompt when a user rejects an AI suggestion, enabling iterative prompt refinement instead of exiting the AI flow.
Changes:
- Update in-cell AI completion rejection to stop generation, clear the suggestion, and keep the prompt available for refinement.
- Update “Add cell with AI” flows to keep focus in the prompt after rejection, and refactor close handling into a shared helper.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/components/editor/ai/ai-completion-editor.tsx | Changes reject behavior to stop/clear completion and refocus the prompt instead of closing the AI editor. |
| frontend/src/components/editor/ai/add-cell-with-ai.tsx | Keeps prompt focused after rejection; refactors close logic; changes accept behavior to clear input instead of closing. |
Comments suppressed due to low confidence (1)
frontend/src/components/editor/ai/add-cell-with-ai.tsx:230
handleAcceptCompletionno longer callsonClose(), which changes the UX from “accept then close the Add Cell with AI panel” to leaving it open (and keeping any attachments state alive). If the intent is only to keep the prompt open on rejection, consider restoring the previous close-on-accept behavior (or update the PR description to call out this behavior change).
const handleAcceptCompletion = () => {
clearStagedCells();
onClose();
};
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
…m#10206) ## 📝 Summary <!-- If this PR closes any issues, list them here by number (e.g., Closes marimo-team#123). Detail the specific changes made in this pull request. Explain the problem addressed and how it was resolved. If applicable, provide before and after comparisons, screenshots, or any relevant details to help reviewers understand the changes easily. --> https://github.com/user-attachments/assets/d40f6d42-8d43-4f2e-95b2-338c799b923d Addresses marimo-team#9788 (comment) ## 📋 Pre-Review Checklist <!-- These checks need to be completed before a PR is reviewed --> - [ ] For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on [Discord](https://marimo.io/discord?ref=pr), or the community [discussions](https://github.com/marimo-team/marimo/discussions) (Please provide a link if applicable). - [x] Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it. - [x] Video or media evidence is provided for any visual changes (optional). <!-- PR is more likely to be merged if evidence is provided for changes made --> ## ✅ Merge Checklist - [x] I have read the [contributor guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md). - [ ] Documentation has been updated where applicable, including docstrings for API changes. - [ ] Tests have been added for the changes made.
📝 Summary
Screen.Recording.2026-07-17.at.5.23.21.PM.mov
Addresses #9788 (comment)
📋 Pre-Review Checklist
✅ Merge Checklist