Summary
In the chat TUI, new content (assistant stream, bash output, session switch, user submission) unconditionally scrolls the viewport to the bottom. There is no way to read earlier messages by scrolling up — every new token yanks the viewport back down. Other harnesses (OpenCode, Claude Code, Aider) expose a follow-tail toggle / scroll-lock; Mavis Code does not.
Steps to reproduce
- Install
@minimax-ai/code (verified on v0.5.2; upstream source reflects the same behavior in v0.4.12).
- Launch
mcode and start any conversation.
- Scroll up with
PageUp / mouse-wheel to read an earlier message.
- As soon as the assistant or bash flow emits new content, the viewport is yanked back to the bottom.
Expected
- A user who has scrolled up should remain where they are until they choose to return (e.g.
End, click on the bottom indicator, or a followTail: true toggle).
- Behavior parity with at least one other major TUI coding agent.
Actual
- The viewport is reset to the bottom on every content change, regardless of where the user is reading.
Root cause (from source)
followBottom() is unconditional — no isAtBottom() / userScrolled guard.
packages/tui/src/tui/shell/chat-layout.ts:142-144
followBottom(): void {
this.fullscreenBodyViewport.scrollToEnd();
}
Call sites that auto-trigger this:
Existing keybinds (for context)
packages/tui/src/tui/engine/keybindings.ts:208-209 already has top/bottom bindings, but they only jump manually — they don't toggle follow-mode.
"tui.altScreen.top": { defaultKeys: "home", description: "Scroll viewport to top" },
"tui.altScreen.bottom": { defaultKeys: "end", description: "Scroll viewport to bottom" },
Suggested fix (sketch — non-blocking)
- Track
isFollowing in ChatLayout (true while viewport is at/near bottom, false after the user scrolls up).
- Guard each call site so
followBottom() becomes a no-op when !isFollowing.
- Expose a config key (e.g.
tui.chat.followTail: "auto" | "always" | "off", default "auto") and a status-bar indicator showing current state.
End / tui.altScreen.bottom re-arms follow mode.
Happy to send a PR if maintainers agree on the design.
Environment
- Mavis Code:
@minimax-ai/code@0.5.2
- Upstream source inspected:
MiniMax-AI/minimax-code @ main (v0.4.12 source preview, behavior identical)
- OS: Android (Termux + proot-distro Debian 13) — but the issue reproduces on desktop terminals as well.
Severity
UX, not data-loss. Workaround: increase terminal scrollback buffer on the client side.
Summary
In the chat TUI, new content (assistant stream, bash output, session switch, user submission) unconditionally scrolls the viewport to the bottom. There is no way to read earlier messages by scrolling up — every new token yanks the viewport back down. Other harnesses (OpenCode, Claude Code, Aider) expose a follow-tail toggle / scroll-lock; Mavis Code does not.
Steps to reproduce
@minimax-ai/code(verified on v0.5.2; upstream source reflects the same behavior in v0.4.12).mcodeand start any conversation.PageUp/ mouse-wheel to read an earlier message.Expected
End, click on the bottom indicator, or afollowTail: truetoggle).Actual
Root cause (from source)
followBottom()is unconditional — noisAtBottom()/userScrolledguard.packages/tui/src/tui/shell/chat-layout.ts:142-144Call sites that auto-trigger this:
packages/tui/src/tui/app.ts:111-114— bash flow changepackages/tui/src/tui/app.ts:128-131— user submissionpackages/tui/src/tui/controller/session-flow.ts:146— session resetpackages/tui/src/tui/controller/session-flow.ts:218— session switchpackages/tui/src/tui/app-composition.ts:488— composition callbackExisting keybinds (for context)
packages/tui/src/tui/engine/keybindings.ts:208-209already has top/bottom bindings, but they only jump manually — they don't toggle follow-mode.Suggested fix (sketch — non-blocking)
isFollowinginChatLayout(truewhile viewport is at/near bottom,falseafter the user scrolls up).followBottom()becomes a no-op when!isFollowing.tui.chat.followTail: "auto" | "always" | "off", default"auto") and a status-bar indicator showing current state.End/tui.altScreen.bottomre-arms follow mode.Happy to send a PR if maintainers agree on the design.
Environment
@minimax-ai/code@0.5.2MiniMax-AI/minimax-code@main(v0.4.12 source preview, behavior identical)Severity
UX, not data-loss. Workaround: increase terminal scrollback buffer on the client side.