[Bug]: interactive TUI fullscreen: mouse-wheel scroll is a no-op while the transcript is following the tail
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/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ệ
- typescript
Hướng nghiên cứu
Đọc packages/tui/src/tui/engine/components/scroll-view.ts và theo dõi scrollBy khi followingEnd là true; sau đó kiểm tra định tuyến con lăn chuột trong packages/tui/src/tui/engine/tui-alt-screen.ts quanh routeWheel. Tái hiện ở chế độ toàn màn hình với một bản ghi dài, trước tiên khi nó đang ghim ở cuối, rồi sau khi cuộn lên. Hoàn tất khi thao tác cuộn xuống di chuyển bản ghi khỏi trạng thái được ghim và tiếp tục hoạt động trong khi truyền dữ liệu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Product or interface
CLI - interactive TUI
Version
0.6.5
Platform
Linux
OS version and architecture
Debian 12
Issue area
UI / UX
Desktop log upload ID (optional)
No response
Steps to reproduce
-
Run the interactive TUI in fullscreen mode:
mcode --tui-mode fullscreen
(or switch into fullscreen at runtime, if already running in regular mode). -
Run inside a terminal that reports mouse input — e.g. Termius, Windows
Terminal, iTerm2. Do NOT disable mouse reporting. -
Produce a transcript taller than the viewport. Either send a few messages,
or start a turn and let the assistant stream output until the transcript
overflows. -
Leave the viewport pinned to the bottom. This is the default state: the
transcript is created withfollow: 'end', so as long as you have NOT
scrolled up,followingEndis true. -
Scroll DOWN with the mouse wheel. Repeat several notches.
-
For contrast, scroll UP once (this works), then scroll DOWN again
(this also works). -
For contrast again, start a streaming turn and try scrolling down while
tokens are arriving.
Expected and actual behavior
EXPECTED
Scrolling down with the mouse wheel moves the transcript viewport toward the
tail, and scrolling up moves it back through the history — at the same
granularity the terminal is configured for, with acceleration.
ACTUAL
While the transcript is in the follow-tail state (the default), downward
mouse-wheel input produces no movement at all. No error, no partial repaint,
no visual feedback whatsoever — the wheel simply appears dead.
Upward wheel input works, and downward wheel input also works once the
viewport has been scrolled up at least once. So the failure is specific to
the follow-tail state, not to the wheel in general.
While output is streaming, the dead state reappears, because the viewport is
re-pinned to the tail on every layout pass.
WHY IT LOOKS INTERMITTENT
The wheel is only ignored when followingEnd happens to be true. Any upward
scroll clears it; any layout pass during streaming sets it again. So the same
gesture works or does nothing depending on invisible state the user cannot
observe.
ROOT-CAUSE HYPOTHESIS (from reading the source, not yet instrumented)
packages/tui/src/tui/engine/components/scroll-view.ts:150
scrollBy(lines: number): number {
...
const start = this.followingEnd ? maxScrollTop : this.currentScrollTop;
const next = Math.max(0, Math.min(maxScrollTop, start + requested));
const moved = next - start;
...
return requested - moved;
}
When followingEnd is true the scroll start position is forced to
maxScrollTop, so a downward wheel yields moved === 0, and the function
returns the full requested amount as "unconsumed".
packages/tui/src/tui/engine/tui-alt-screen.ts:731-743 (routeWheel) then
discards that remainder:
for (const scrollView of getScrollViewsAt(layout, x, y)) {
remaining = scrollView.scrollBy(remaining);
if (remaining === 0 || scrollView.overscroll === "contain") break;
}
The transcript viewport is created with follow: 'end' and
overscroll: 'contain':
packages/tui/src/tui/features/transcript/panel.ts:125-129
packages/tui/src/tui/shell/chat-layout.ts:152-158
followingEnd is only ever cleared by an upward scroll
(scroll-view.ts:155). Downward wheel input is never treated as a user
override of the follow-tail state — so it can never move the viewport.
In other words, the sticky/follow state is modelled as authoritative over
user input, rather than as a render default that user input overrides.
SECONDARY OBSERVATIONS (separate from the dead-scroll bug)
a) Wheel granularity is hardcoded to one line.
packages/tui/src/tui/engine/tui-alt-screen.ts:249
this.wheelScrollLines = Math.max(1, Math.floor(options.wheelScrollLines ?? 1));
`wheelScrollLines` is declared in `TuiAltScreenOptions` but no caller in
this repository ever passes it, and there is no CLI flag or environment
variable for it. xterm.js-derived terminals (Termius, Windows Terminal,
iTerm2) emit one wheel event per notch, so the wheel moves exactly one
line per notch with no acceleration. Even when the wheel does work, a
transcript of several hundred lines is effectively unscrollable by wheel.
b) There is no escape hatch to disable mouse reporting.
Once the fullscreen renderer enables mouse tracking, the terminal stops
doing its own scrollback and every wheel event is delivered to the TUI.
`TuiAltScreenOptions.mouse` exists
(packages/tui/src/tui/engine/tui-alt-screen.ts:173) but is not wired to
any CLI flag or environment variable. For comparison, Claude Code exposes
`CLAUDE_CODE_DISABLE_MOUSE` and additionally auto-disables fullscreen
under `tmux -CC` because "mouse wheel is dead" there.
SUGGESTED FIX DIRECTION (no patch attached)
-
Treat wheel input as a user override. Clear the follow-tail flag before
applying a wheel delta, instead of using it to choose the scroll start
position. This is the minimal change and removes the dead state entirely. -
Longer term, separate the two concepts the way ink's
ScrollBoxdoes:
keepscrollTopas the real position andstickyToEndas a render-time
default. Any explicit user scroll clearsstickyToEnd
(el.stickyScroll = false; el.scrollAnchor = undefined;) before moving. -
Wire
wheelScrollLinesto a setting, and add momentum/accumulation so
fast flicks produce intermediate frames instead of 1:1 line stepping. -
Expose an environment variable or flag to disable mouse reporting, and
consider auto-disabling it under multiplexers, so users can fall back to
native terminal scrollback.
Redacted error summary
None. No error is emitted; the input is consumed and the resulting scroll
delta is discarded internally.
Screenshots
A short screen recording is more useful than a still here, since the failure
is "nothing happens":
- Start in fullscreen TUI with a transcript taller than the viewport.
- Scroll DOWN without scrolling up first -> no movement.
- Scroll UP once, then scroll DOWN -> movement resumes.
Attach the recording to this field (not to the code-formatted field above).
Before submitting
- I have searched existing issues.
- I have included my version and removed sensitive information.
- Ngôn ngữ chính
- TypeScript
- Star
- 2k
- Fork
- 254
- Merge trung bình
- 7 giờ 40 phút
- Pull request đã merge (30 ngày)
- 148
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
-
bug cli documentation needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
MiniMax-AI/minimax-code#299 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug cli needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#128 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug desktop
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MiniMax-AI/minimax-code#87 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug desktop needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
MiniMax-AI/minimax-code#80 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug desktop needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#66 ·
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ự
-
./collections should export setUmbracoVersion and setAllowFilePathUploads for in-process consumersĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
umbraco/Umbraco-CMS-MCP-Dev#563 ·
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 65/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 76/100
-
afk-ok area:data-quality importer size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
enorm-labs/event-junkie#3166 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
alunduil/projects-v2-sync#21 ·