[Bug]: TUI word wrap, LaTeX parsing, and bracketed paste can run without a bound
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 1/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- node.js, typescript
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 2.3k
- Forks
- 315
- Merge moyen
- 3 h 54 min
- PR mergées (30 j)
- 9
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de MiniMax-AI/minimax-code
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
MiniMax-AI/minimax-code#639 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
MiniMax-AI/minimax-code#636 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
MiniMax-AI/minimax-code#615 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
MiniMax-AI/minimax-code#556 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
MiniMax-AI/minimax-code#507 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de MiniMax-AI/minimax-code
Issues similaires
-
Blocklist addition requestOuverteblocklist addition
Difficulté 1/5 Moins d'une heure Accessibilité débutants 76/100
MetaMask/eth-phishing-detect#319194 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
continuedev/continue#13533 · 1 commentaire ·
Les mainteneurs répondent en général sous 6 jours
-
bug codex:automation
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
genfeedai/genfeed.ai#12060 ·
Les mainteneurs répondent en général sous 1 jour
-
bounty good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
fitzss/valun-open#15 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour