fix(mobile): 只在消息 key 变化时续 mVCP 安静窗 - #3264
Merged
Merged
Conversation
#3192 合入后,流式更新仍会反复换 items 引用并续上 120ms 安静窗, 发送后的贴底校验会在整轮生成期间一直等待。改为只认行身份变化。 Signed-off-by: Dash <dashhuang@gmail.com>
|
| Filename | Overview |
|---|---|
| apps/mobile/src/session/MessageRenderer.tsx | 将 mVCP settle effect 改为依赖稳定的消息 key 签名,流式内容更新不再反复续期。 |
| apps/mobile/src/session/messageScroll.ts | 新增以有序 key 列表生成稳定签名的纯函数。 |
| apps/mobile/src/tests/messageScroll.test.ts | 覆盖 key 不变时签名稳定以及新增 key 时签名变化。 |
| apps/mobile/src/tests/messageListVirtualization.test.ts | 增加源码契约断言,确保安静窗依赖 key 签名而非临时数组引用。 |
Reviews (1): Last reviewed commit: "fix(mobile): 只在消息 key 变化时续 mVCP 安静窗" | Re-trigger Greptile
Contributor
|
命中 UI 路径(apps/mobile/src/session/MessageRenderer.tsx / apps/mobile/src/session/messageScroll.ts)但 description 未附界面效果证据——建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面(```html 代码块、.html 附件或在线预览链接),便于确认界面符合 DESIGN.md 设计规范 |
MagicLizi
approved these changes
Aug 22, 2026
MagicLizi
left a comment
Contributor
There was a problem hiding this comment.
审查通过:无 P0/P1。只在消息 key 签名变化时续 mVCP 安静窗,范围与描述一致,不触发冷更。
Contributor
|
合了。流式刷新时列表引用一直在变、key 没变却反复续安静窗,这下贴底判断不会被吊住了。 |
This was referenced Aug 22, 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.
这次改了什么
摘要
#3192 合入后,发送后的贴底校验仍可能在整轮流式输出期间跟不住。原因是 120ms mVCP 安静窗绑在
items数组引用上:流式每个字都会换新数组,窗被一直续上,校验只 wait 直到 2.5s 预算耗尽。这次改为只在消息 key 真变(追加 / 换行 / 重排)时续窗。高度变化仍走原来的
handleContentSize。变更类型
fix缺陷修复范围
mobileMessageListKeysSignature,以及 MessageRenderer 安静窗只依赖 key 签名UI 变化
不涉及:无布局、样式或文案变化;只修正发送后贴底校验的等待条件。
怎么验证的
自动验证
手工验证
未做真机。建议发送后马上进入长流式(>3s),确认列表仍跟在最新消息。
未执行的验证
真机 / 模拟器发送后贴底目检未跑。
风险
风险分类
影响与回滚
提交前检查
git commit -s,见 DCO)