[Bug]: TUI word wrap, LaTeX parsing, and bracketed paste can run without a bound
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 1/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
Hướng nghiên cứu
The linked fix branch already contains changes for wordWrapLine, LaTeX parsing, and paste limits in StdinBuffer, Input, and Editor, with focused tests under packages/tui/test/unit/. Read the commits from 203278f through b1bfc9a and compare them with 3c21163; the issue says the targeted Vitest run passes 21 tests. Work is already under way, and the report says external pull requests are not accepted.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Three interactive TUI paths can run without a bound and take down the client. External pull requests are not accepted from this account. The fix branch is linked below.
Searched existing issues first. #32 is a LaTeX display question, and #491 is a clipboard-paste contribution question. Neither is this recursion or buffer bound.
Product or interface
CLI - interactive TUI. Source build.
Version
Source main at 3c21163 (chore(sdk-python): release 0.1.1). Node.js v24.19.0. pnpm 9.12.0.
Platform
Windows 11 Pro, build 26200.
Issue area
UI / UX.
Steps to reproduce
On 3c21163:
- Word wrap: render a line that contains one wide grapheme, such as a CJK character or an emoji, with
wordWrapLinewhen the terminal content width is 1 column. - LaTeX: call
renderLatexwith a few hundred unmatched{characters, or with environments nested a few hundred levels deep. - Paste: send a bracketed-paste start (
ESC [200~) and keep sending data with no end marker until the buffer passes 1 MiB. The same buffer exists inStdinBuffer,Input, andEditor.
Expected and actual behavior
- Expected: a single wide grapheme is emitted as its own visual chunk; LaTeX deeper than a small fixed depth is treated as unsupported; an oversized or unterminated paste is dropped and the input path accepts later keystrokes.
- Actual:
wordWrapLinerecurses on that same grapheme until the stack overflows;renderLatexrecurses once per nested group or environment until the stack overflows; the paste buffer grows for as long as the end marker is absent.
Branch
https://github.com/Coff0xc/minimax-code/tree/fix/code-defects
Head b1bfc9a. Commits from 203278f through b1bfc9a, based on 3c21163.
wordWrapLinerecurses only when a segment contains more than one grapheme.- LaTeX parsing shares a depth of 64 across nested braces and nested environment parsers.
StdinBuffer,Input, andEditordrop a bracketed paste larger than 1 MiB and leave paste mode.
Validation
Windows, Node.js v24.19.0, Vitest 4.1.11, on the committed sources:
npx --yes [email protected] exec vitest run --config vitest.oss.config.mjs packages/tui/test/unit/tui-word-wrap-wide-grapheme.test.ts packages/tui/test/unit/tui-latex-parse-depth.test.ts packages/tui/test/unit/tui-terminal-text-paste.test.ts
21 passed: word wrap 5, LaTeX depth 3, paste 13.
NOT RUN: pnpm verify, and Linux or macOS CI. The paste cap was exercised with synthetic input, not a physical terminal paste.
Checklist
- I have searched existing issues.
- I have included the version and removed sensitive information.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 315
- Merge trung bình
- 3 giờ 54 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MiniMax-AI/minimax-code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#639 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
MiniMax-AI/minimax-code#636 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#615 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
MiniMax-AI/minimax-code#556 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#507 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của MiniMax-AI/minimax-code
Issue tương tự
-
area:api bug good first issue priority:high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Doezer/Questarr#1486 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Sergey-Bar/Penny#245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mihazs/lazysh#3377 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Approve the Cloudflare agent plugin for harness sessionsCó thể đã có người làm @joshtsch đã nhận hôm nay. Đang mởenhancement ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày