Skip to content

fix(cli): prevent hangs when paste markers span input chunks - #387

Merged
qorzj merged 1 commit into
mainfrom
fix/377-bracketed-paste
Oct 26, 2026
Merged

qorzj merged 1 commit into
mainfrom
fix/377-bracketed-paste

Conversation

@qorzj

@qorzj qorzj commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Pasting text could leave the prompt permanently waiting for the bracketed-paste end marker when that marker was split across terminal input events. Subsequent typing and Enter were then buffered instead of handled. A 1014-byte payload split at the 1024-byte boundary reproduces the failure.

Preserve partial start/end markers between input events and process each completed paste once. This also preserves input before a paste and consecutive pastes in one event. Standalone Esc remains responsive, and pending input is discarded when the handler is deactivated or unmounted.

Validation:

  • Added 7 regression tests covering all start/end marker split positions, the 1024-byte boundary, continued editing and submission, consecutive pastes, and Esc/lifecycle behavior.
  • All 347 CLI tests pass: npm run test --workspace @vegamo/deepcode-cli.
  • npm run check passes (type checking, lint, and formatting).
  • The fix has not yet been manually retested in VSCode's integrated terminal.

Closes #377

@qorzj
qorzj merged commit 47516a9 into main Oct 26, 2026
12 checks passed
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.

[Bug] Pasting large/single-line JSON hangs the UI (v0.4.3)

1 participant