diff --git a/.agents/skills/gen-changesets/SKILL.md b/.agents/skills/gen-changesets/SKILL.md index 71df61bfb..33d31d439 100644 --- a/.agents/skills/gen-changesets/SKILL.md +++ b/.agents/skills/gen-changesets/SKILL.md @@ -17,6 +17,7 @@ All other `@moonshot-ai/*` packages are treated as internal packages, including 2. **List packages that were actually changed.** Source code, build config, package metadata, and other changes that affect a package's output or behavior need a changeset entry for that package. 3. **Do not list unchanged internal packages.** For example, if `packages/node-sdk` was not changed, do not list `@moonshot-ai/kimi-code-sdk` just because another internal package changed. The SDK follows the same rule as other internal packages: list it only when it was actually changed. 4. **Internal package source changes that enter the CLI bundle must manually list the CLI.** `@moonshot-ai/kimi-code` inline-bundles `@moonshot-ai/*` source, but those internal packages are devDependencies from the CLI's perspective, so changesets will not automatically propagate bumps. If a change enters the CLI output, also list `@moonshot-ai/kimi-code`. + - **Web app (`@moonshot-ai/kimi-web`) changes always enter the CLI bundle.** `@moonshot-ai/kimi-web` is ignored by changesets (see `.changeset/config.json`), so it will not be bumped automatically. However, the CLI serves the web app from `dist-web`, so any source change in `apps/kimi-web` must list **both** `@moonshot-ai/kimi-web` and `@moonshot-ai/kimi-code` in the changeset. Otherwise `pkg.pr.new` and release builds will ship a stale web bundle. 5. **Docs-only and tests-only changes usually do not need a changeset.** README, internal docs, and `test/` changes that do not enter package output do not trigger a CLI bump. 6. `@moonshot-ai/vis` / `vis-server` / `vis-web` are ignored by changesets and should not be handled. @@ -97,6 +98,17 @@ Only SDK source changed, and the CLI does not use it: Clarify session status typing for internal SDK callers. ``` +Web app source changed (must also bump the CLI so the bundled web bundle is rebuilt): + +```markdown +--- +"@moonshot-ai/kimi-web": patch +"@moonshot-ai/kimi-code": patch +--- + +Fix the web chat not scrolling to the bottom after sending a message. +``` + ## Red Flags - You are about to write `major` without asking the user. diff --git a/.changeset/files-to-chat-auto-scroll.md b/.changeset/files-to-chat-auto-scroll.md new file mode 100644 index 000000000..3206dacc8 --- /dev/null +++ b/.changeset/files-to-chat-auto-scroll.md @@ -0,0 +1,6 @@ +--- +"@moonshot-ai/kimi-web": patch +"@moonshot-ai/kimi-code": patch +--- + +Fix the main chat not scrolling to the bottom when returning to the chat tab from the files tab. diff --git a/.changeset/send-message-auto-scroll.md b/.changeset/send-message-auto-scroll.md new file mode 100644 index 000000000..9bfbb8777 --- /dev/null +++ b/.changeset/send-message-auto-scroll.md @@ -0,0 +1,6 @@ +--- +"@moonshot-ai/kimi-web": patch +"@moonshot-ai/kimi-code": patch +--- + +Reset the scroll tracking baseline after the user sends a message to prevent stale scroll positions from breaking auto-scroll in production builds. diff --git a/.changeset/session-switch-auto-scroll.md b/.changeset/session-switch-auto-scroll.md new file mode 100644 index 000000000..7fa993ec7 --- /dev/null +++ b/.changeset/session-switch-auto-scroll.md @@ -0,0 +1,6 @@ +--- +"@moonshot-ai/kimi-web": patch +"@moonshot-ai/kimi-code": patch +--- + +Fix the main chat not scrolling to the bottom when switching to a shorter session. diff --git a/.changeset/side-chat-auto-scroll.md b/.changeset/side-chat-auto-scroll.md new file mode 100644 index 000000000..7816dc3b1 --- /dev/null +++ b/.changeset/side-chat-auto-scroll.md @@ -0,0 +1,6 @@ +--- +"@moonshot-ai/kimi-web": patch +"@moonshot-ai/kimi-code": patch +--- + +Fix the side-chat panel not scrolling to the bottom after sending a message or while streaming a response. diff --git a/apps/kimi-web/src/components/ConversationPane.vue b/apps/kimi-web/src/components/ConversationPane.vue index 960eaeda4..018078dee 100644 --- a/apps/kimi-web/src/components/ConversationPane.vue +++ b/apps/kimi-web/src/components/ConversationPane.vue @@ -799,6 +799,11 @@ watch( filesShowPreview.value = false; selectedFile.value = null; following.value = true; + // Reset the scroll tracking baseline so the browser clamping scroll event + // that fires when the new (usually shorter) session renders is not mistaken + // for a user upward scroll, which would flip following back off before the + // stable-follow loop can pin the view to the bottom. + lastScrollTop = 0; await nextTick(); scheduleStableFollow(); updateTocViewport(); diff --git a/apps/kimi-web/src/components/SideChatPanel.vue b/apps/kimi-web/src/components/SideChatPanel.vue index 1714c73a6..accb75c67 100644 --- a/apps/kimi-web/src/components/SideChatPanel.vue +++ b/apps/kimi-web/src/components/SideChatPanel.vue @@ -4,12 +4,12 @@ only show the messages exchanged here — a focused Q&A on the side. Reuses ChatPane for the transcript; its panel-open emits are no-ops here. -->