mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-09 17:29:12 +00:00
* fix(pi-tui): make the viewport anchor follow above-viewport content shifts The anchor pins a buffer row index, but an above-viewport length change shifts the content living at every index below it. The pinned window then suddenly showed content further along (visible upward creep), and the rows that slid above the window top were lost: never committed to scrollback, which holds older bytes at those indices. During streaming, every above-viewport net shrink (a finished agent row collapsing, a merged step, a spinner line disappearing) permanently swallowed that many rows, and the blank area under the input box kept growing. doRender now scores two hypotheses for such frames — window stayed put vs window content shifted by the length delta — and when the shift explains the frame strictly better, moves the anchor with the content: a pure shift re-anchors with no painting at all (the screen already shows exactly that content), and a shift with local in-window changes (spinner/timer rows) repaints the window at the shifted anchor. Commit order stays continuous, so the exactly-once scrollback invariant is preserved: no loss, no duplication. Covered by e2e case07 (above-viewport shift), which fails on the previous revision; the stale-content unit test now asserts the follow-the-content window instead of the old swallowed-row behavior. * revert(pi-tui): restore upstream differential rendering behavior The fork's viewport/scrollback rendering patches (clamping the diff to the visible viewport, viewport re-anchoring on collapse, the pinned anchor with commit-on-advance, cursor visibility guarding, and the content-shift anchor follow) accumulated interacting edge cases faster than they could be stabilized: blank screens, duplicated scrollback spans, vanished rows, and a growing blank area under the input box. Revert src/tui.ts to the upstream 0.80.2 differential rendering behavior: a change above the viewport triggers a destructive full redraw again. Verified line-by-line against the upstream source — the only remaining divergences are the TypeScript strict-mode syntax adaptations and the narrow-terminal fixes (Container width clamping and overwide-line truncation replacing the upstream crash-and-throw), which are kept. Also remove the rendering-bug e2e ledger and the shrink test suite that specified the reverted behavior, restore the pre-fork rendering tests (the transient-content test asserts the upstream full-redraw behavior again), and drop the e2e glob from the test script. Editor input-history and paste-burst changes are untouched. Known trade-off, accepted for now: the original scroll-position yank during streaming (destructive redraws emitting ESC[3J) returns; the rendering rework will restart from this clean baseline. * chore: downgrade the web thinking-effort changeset to patch |
||
|---|---|---|
| .. | ||
| acp-adapter | ||
| agent-core | ||
| kaos | ||
| kimi-migration-legacy | ||
| kosong | ||
| migration-legacy | ||
| node-sdk | ||
| oauth | ||
| pi-tui | ||
| protocol | ||
| server | ||
| server-e2e | ||
| telemetry | ||