Skip to content

Conversation

uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Oct 6, 2025

Description

Fix subsequent chunk pasting of lesser than 50 characters to prevent bypassing the rapid input detection. Otherwise, they would get inserted into the text buffer directly.

resolves CON-4140

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

Fix CLI paste detection to buffer fast small chunks (<50 chars) during rapid input, so users can’t bypass paste accumulation. Typed characters after a brief pause still insert immediately. Resolves Linear CON-4140.

  • Bug Fixes
    • Accumulate small chunks during rapid input when they arrive within 50ms; reset the 200ms finalize timer on each chunk.
    • Treat small inputs as typing when the gap is ≥50ms, inserting them immediately without mixing into the paste.
    • Added tests to verify both behaviors.

@uinstinct uinstinct requested a review from a team as a code owner October 6, 2025 17:26
@uinstinct uinstinct requested review from Patrick-Erichsen and removed request for a team October 6, 2025 17:26
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 6, 2025
@tingwai tingwai requested review from tingwai and removed request for Patrick-Erichsen October 6, 2025 17:36
Copy link
Collaborator

@tingwai tingwai left a comment

Choose a reason for hiding this comment

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

Just tested on Ghostty, iTerm and macOS Terminal, thanks for the fix!

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Oct 6, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 6, 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.

No issues found across 2 files

@tingwai tingwai merged commit feb92c7 into continuedev:main Oct 6, 2025
70 of 72 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 6, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2025
@uinstinct uinstinct deleted the cli-paste-chars branch October 6, 2025 18:33
@sestinj
Copy link
Contributor

sestinj commented Oct 8, 2025

🎉 This PR is included in version 1.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 12, 2025

🎉 This PR is included in version 1.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.2.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.

3 participants