Skip to content

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Oct 15, 2025

Description

When clicking on the send enter button in the chat input, it prevents sending the input because isStreaming is true in the inner MainEditorProvider's ref. This PR fixes it.

closes #8203

resolves CON-4375

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

before.mp4
after.mp4

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Fixes the chat input send button and Enter shortcuts not working after a streamed response by using a stable onEnter handler instead of a ref. Resolves CON-4375.

  • Bug Fixes
    • Replaced onEnterRef with onEnter across editorConfig and TipTapEditor.
    • Hooked toolbar and keyboard shortcuts (Enter, Mod-Enter, Alt-Enter) to onEnter.
    • Updated main editor context to use onEnter and added isStreaming to dependencies to avoid stale state.

@uinstinct uinstinct requested a review from a team as a code owner October 15, 2025 07:02
@uinstinct uinstinct requested review from sestinj and removed request for a team October 15, 2025 07:02
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 15, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="gui/src/components/mainInput/TipTapEditor/utils/editorConfig.ts">

<violation number="1" location="gui/src/components/mainInput/TipTapEditor/utils/editorConfig.ts:349">
Converting `onEnter` to a plain closure freezes `isStreaming`/edit state at their initial values, so Enter remains disabled after a stream completes; please keep a ref-based updater so the handler sees live state.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Oct 17, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 17, 2025
@sestinj sestinj merged commit ae0af67 into continuedev:main Oct 17, 2025
55 of 57 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 17, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2025
@sestinj
Copy link
Contributor

sestinj commented Oct 17, 2025

🎉 This PR is included in version 1.26.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 17, 2025

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@uinstinct uinstinct deleted the enter-ref-click branch October 20, 2025 05:15
@sestinj
Copy link
Contributor

sestinj commented Oct 21, 2025

🎉 This PR is included in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 22, 2025

🎉 This PR is included in version 1.30.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer released size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Sometimes enter button is unresponsive

2 participants