fix(less-computer): 升级 @shadcn/react 到 0.2.1,修复聊天框不自动滚到底 - #1070
Merged
Merged
Conversation
0.2.0 的 MessageScroller 在流式输出期间有竞态:自动滚动后约 180ms 的 状态复核若恰好落在新内容已提交、ResizeObserver 尚未触发的间隙,会把 跟随底部误判为用户滚走,此后不再跟随。上游 shadcn-ui/ui#11106 已修, 随 0.2.1 发布;0.2.1 在现有 ^0.2.0 范围内,接口与 peer 依赖不变。 Fixes Open-Less#1010
H-Chris233
approved these changes
Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
Fixes #1010。
Less Computer 聊天框在 agent 连续输出时会停止跟随到底部,之后每条新输出都要手动拖滚动条。根因在依赖
@shadcn/react@0.2.0的 MessageScroller:自动滚动后约 180ms 会复核一次滚动状态,如果这次复核恰好落在「新内容已提交、ResizeObserver 还没触发」的间隙,就会把「跟随底部」误判成「用户滚走了」,此后不再跟随。上游已在 shadcn-ui/ui#11106 修复("no longer releases follow-output … when content growth outruns the frame-coalesced resize handler"),随 0.2.1 发布。本 PR 只把依赖升到 0.2.1。修复 / 新增 / 改进
@shadcn/react0.2.0 → 0.2.1(package.json下限与package-lock.json同步)。0.2.1 还包含上游 #11085(ResizeObserver 循环报错)和 #11100(新锚点在流式期间保持在阅读线)。兼容
^0.2.0范围内,导出接口与 peer 依赖不变;QaPanel 用的同一个组件也会一并受益。测试计划
npm ci && npm run buildcheck-hotkey-injection.mjs、pin-persistence-security-contract.test.mjs(需编译 Rust 主 crate,本机缺完整 Xcode 的 Metal 工具链)外的 81 项?window=less-computer,420×540)里用临时钩子注入 Less Computer 事件(工具行 / 文本 delta 交替,间隔扫过 150–210ms,模拟 Claude Code 后端的工具停顿),headless Chromium 与 WebKit 各跑多轮,看最后一条输出是否在视口内: