MoonshotAI / MoonshotAI/kimi-code

TUI scroll position resets to top after approving a tool permission prompt

Open
#2,296 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

What version of Kimi Code is running?

0.29.2

Which open platform/subscription were you using?

Kimi Code (OAuth)

Which model were you using?

K3-256K

What platform is your computer?

Linux (kernel 6.6.119, ChromeOS Crostini container)

What issue are you seeing?

In a long session, whenever a tool permission (approval) prompt appears and I confirm/approve it, the transcript view jumps all the way back to the very top of the conversation, instead of keeping the position I was reading or following new output at the bottom.

What steps can reproduce the bug?
  1. Have a session long enough to exceed the terminal viewport.
  2. Scroll up to read earlier messages.
  3. The agent requests a tool approval; the permission prompt appears.
  4. Select an option to approve.
  5. After the prompt closes and the UI re-renders, the view is reset to the top of the transcript.
What is the expected behavior?

After the permission prompt closes, the scroll position should be preserved (stay where I was reading), or at least follow new output at the bottom — never reset to the very top.

Additional information

Possibly related to #1487 and #981 (streaming-triggered jumps to top), but the trigger here is specifically the approval dialog close/re-render, not streaming output. Reproducible consistently on every approval.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in a long session on the TUI by scrolling up, approving a tool permission prompt, and observing the transcript after the prompt closes. Trace the approval-dialog close and resulting UI re-render to identify why the scroll position resets; done means the prior position is preserved, or new output remains visible at the bottom instead of jumping to the top.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.