Skip to content

fix(tui): drop escapeless legacy mouse reports#1723

Merged
esengine merged 1 commit into
esengine:mainfrom
GTC2080:GTC/fix-1598-memory-leak
May 25, 2026
Merged

fix(tui): drop escapeless legacy mouse reports#1723
esengine merged 1 commit into
esengine:mainfrom
GTC2080:GTC/fix-1598-memory-leak

Conversation

@GTC2080

@GTC2080 GTC2080 commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Drop ESC-stripped legacy X10 mouse reports before they can reach the prompt input path.
  • Keep nearby printable text intact while consuming the five-byte legacy mouse packet.
  • Add regression coverage for the remaining 内存泄漏 #1598 flood shape.

Root cause

#1637 handled full ESC [ M ... legacy X10 reports, but Windows ConPTY can strip the leading ESC. In that form, [M... was still treated as printable prompt input, so repeated terminal mouse reports could keep growing composer state.

Tests

  • npm test -- --run tests/stdin-reader.test.ts tests/mouse-mode.test.ts
  • npx biome check src/cli/ui/stdin-reader.ts tests/stdin-reader.test.ts
  • npm run typecheck
  • npm run verify

Refs #1598

@GTC2080 GTC2080 mentioned this pull request May 25, 2026
@esengine esengine merged commit 5467670 into esengine:main May 25, 2026
4 checks passed
@GTC2080 GTC2080 deleted the GTC/fix-1598-memory-leak branch May 31, 2026 10:43
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