MoonshotAI / MoonshotAI/kimi-cli

Web UI: assistant messages re-render as one-fragment-per-line after tab switch/reload for non-Kimi (OpenAI-compatible) providers

Open
#2,607 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

Describe the bug
In the web UI, assistant messages in sessions using a custom OpenAI-compatible provider render correctly while streaming, but after any remount (browser tab switch and back, page reload, or reopening the session) they re-render as one stream delta per line — a narrow vertical strip. The same session renders correctly with Kimi providers.

Version
Kimi Code CLI 0.36.1 (web UI), macOS. Also present on 0.29.1; persists after upgrading.

To Reproduce

  1. Configure a custom OpenAI-compatible provider (tested: Aliyun DashScope, model qwen3.8-max)
  2. Start a web UI session with that model and get a reply
  3. While streaming / right after: reply renders correctly (full-width markdown)
  4. Switch to another browser tab and back (or reload / reopen the session)
  5. The reply re-renders as one delta fragment per line in a narrow vertical column; stays broken forever after

Expected behavior
Streamed text deltas are coalesced into a single markdown message block on replay, exactly as with Kimi providers.

Actual behavior
Each streamed text part renders as an independent block/line on replay.

Evidence / root-cause hint

  • Session wire.jsonl stores the reply as many tiny text parts (some as short as 3 chars) for BOTH Kimi and custom providers — data is intact; concatenating the parts yields the full text.
  • The live streaming path coalesces deltas in memory for all providers; the replay path (tab-return remount, reload, history) re-renders from stored parts without coalescing for non-Kimi providers.
  • TUI/terminal rendering is unaffected.
  • Not fixed by page refresh or by upgrading 0.29.1 → 0.36.1.

Screenshots of both states (correct live render, broken replay) available on request.

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

Start by inspecting the session wire.jsonl data and tracing the web UI replay path used after a tab switch, reload, or session reopen. Compare it with the live streaming path, focusing on how stored text parts are rendered for custom OpenAI-compatible providers. Done means replay coalesces the parts into one markdown message block without changing terminal rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.