Repository navigation
[Bug] 超大历史会话点「加载更早」后对话区空白,且同一渲染进程内**所有**会话随后都无法显示对话(dsh-client-ui-chat 空指针)
#9798
164658479sun-ux
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
摘要
在历史很大的会话里点「加载更早」(
chat.loadOlder)会触发@deepseek-ai/dsh-client-ui-chat内的一处空指针解引用:抛出的
TypeError: Cannot read properties of null (reading 'kind')会同时击穿:conversation.view槽位条目 → 当前会话对话区空白;[session-controller] event feed subscriber failed)→ 该订阅失效,之后打开任何会话都渲染不出对话。只有整页重载(
Ctrl+R/ 重启应用)才能恢复。属于渲染进程内一次崩溃污染全局,用户感知为"整个应用废了"。环境
0.2.0-rc.2(Windows x64 安装包版)dsh 0.2.0-rc.2@deepseek-ai/dsh-client-ui-chat0.2.0-rc.210.0.26200session.v4.jsonl.zstd),全工作区最大;同工作区其它会话 ≤ 1.94 MB复现步骤
chat.loadOlder)。期望行为
实际行为
conversation.view槽位抛错 → 对话区空白;同一异常还打在会话事件订阅回调里 → 订阅失效 → 全应用对话区空白,直到重载。根因
<安装目录>/resources/app.asar → /dsh/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js(0.2.0-rc.2,该 bundle 565,053 字节):location.turn.end存在、但data为 null 时,null.reason直接抛TypeError。可选链只保护了end,没保护data(以及后面的reason)。这类 turn 出现在旧版本持久化下来的历史轮次里——这也解释了为什么只有体量最大、跨版本最久的会话能稳定触发。版本核对(上游尚未修复)
dsh-client-ui-chat@0.2.0-rc.2location.turn.end?.data.reason.kind@deepseek-ai/dsh-client-ui-chat@0.2.1-alpha.3(当前alphatag 最新)"interrupted"分支)即:
latest/next/alpha三个 tag 上都不含修复。建议修复
建议同批自查同文件内所有
?.之后紧跟不可空字段链的写法(?.data.reason、?.x.y),它们都会在同类历史数据上以同样方式崩溃。证据(渲染进程内探针实测)
在渲染页面内注入探针,拦截
window.onerror/unhandledrejection/console.error并记录 DOM 变更计数与快照,结果写入localStorage,再由宿主侧从 Chromium LevelDB 读回:时间线
去重后只有 3 类报错,全部同源
崩溃前一刻的 DOM 快照(说明页面本身健康,只是被这一个异常打穿)
{"readyState":"complete","bootReady":true,"bodyChildren":7, "root":{"children":1,"h":822,"w":1280},"mainNodes":4218, "scrollables":[{"h":706,"sh":6612,"kids":2,"cls":"Dc7zOa_scrollBody"}], "markers":{"loadEarlier":true,"errorText":false}}(对话区滚动容器
clientHeight=706 / scrollHeight=6612,即历史正常渲染中;loadEarlier按钮在位;没有出现任何错误兜底文案。)已排除的方向
ui-chat的符号。影响面
end.data === null"的会话,只要用户点「加载更早」就会中招;当前规避方式(供其它用户参考)
Ctrl+R(或重启应用)恢复;dsh --profile desktop --resume <session-id>All reactions