AstrBot icon indicating copy to clipboard operation
AstrBot copied to clipboard

WebChat超长会话在升级后不显示在新版UI对话记录中

Open sigma-sum-node opened this issue 4 months ago • 8 comments

问题描述

从旧版升级至最新版后,WebChat超长会话不在新版WebUI的"对话记录"中显示。

环境

  • AstrBot:最新版(2026-07-30升级)
  • 部署:Windows本地直装
  • 平台:WebChat
  • 会话ID:8774101a-53a5-4e65-8eb4-bf1fcdb7ce51
  • 会话时长:2026-06-12 至 2026-07-30(近两个月)
  • 消息数:16,078条

现象

  1. 数据未丢失——platform_message_history表中有完整的20,599条消息
  2. 新版UI的对话记录页面看不到该会话
  3. webchat_threads表为空(0条记录)
  4. 已尝试:重置migration_done_webchat_session_1迁移旗 + 手动在conversations表中注册会话。重启后仍未显示

推测

新版UI的conversations索引未覆盖超长WebChat会话(两个月以上)。类似问题在旧版本中已有报告(#3722、#8232)。

sigma-sum-node avatar Jul 30 '26 17:07 sigma-sum-node

Hi @sigma-sum-node! I'm Dosu and I'm helping the AstrBotTeam team.

经过代码调查,这个现象实际上是设计行为,而非 Bug。

核心原因

新版 UI 的「对话记录」页面在请求会话列表时,前端明确设置了 exclude_platforms = 'webchat',将所有 WebChat 会话排除在外 [1]。后端 list_conversations 接口会根据此参数过滤掉 WebChat 平台的对话 [2]。因此无论消息数量多少,WebChat 会话都不会出现在「对话记录」中。

关于你观察到的现象

  • webchat_threads 表为空 — 这是正常的。该表仅用于用户主动创建的「分支对话」(Side Threads),不参与主会话的迁移或展示 [3]。
  • migration_done_webchat_session_1 迁移 — 该迁移只负责从 platform_message_history 创建 PlatformSession 元数据记录,不迁移会话内容本身,也没有消息数量或时间范围的限制 [4]。
  • 数据完整 — 你的 20,599 条消息在 platform_message_history 中是安全的,不存在数据丢失。

WebChat 对话的查看方式

WebChat 的对话历史是通过 ChatUI 页面本身来查看和继续的,而非通过「对话记录」页面。这是新版 UI 对 WebChat 与其他平台(QQ/Telegram 等)的区分设计。

如果你确实需要在「对话记录」中看到 WebChat 会话,可以考虑向项目提出 feature request,或者手动修改前端代码移除 exclude_platforms 过滤。

To reply, just mention @dosu.


Share context across your team and agents. Try Dosu.

Leave Feedback Learn about AstrBot with Dosu Add Dosu to your team

dosubot[bot] avatar Jul 30 '26 17:07 dosubot[bot]

你好,请问你的 windows直装 是什么意思?

Soulter avatar Aug 01 '26 11:08 Soulter

我也遇到了这个问题,不知道开发组大佬后续会不会考虑加个过滤开关

Branwen07 avatar Aug 02 '26 08:08 Branwen07

@soulter 回答你的问题:Windows直装是指直接在Windows上安装AstrBot运行(非Docker),数据在 C:\Users\82739\.astrbot\data\。

补充背景——我们有一个WebChat会话从6月12日跑到现在,约16000条消息。数据在platform_message_history表里完好(20599条),但新版UI的"对话记录"页面因为exclude_platforms='webchat'完全不显示它。

@Branwen07 同意——希望开发组考虑加个过滤开关或者把WebChat纳入默认显示。对我们这种长期用WebChat做主对话窗口的用户来说,看不到历史会话意味着升级后无法从UI回溯任何对话,只能直接查数据库。

不是要求紧急修复——只是希望这个设计决策能被重新评估,或者至少有个配置项。

sigma-sum-node avatar Aug 03 '26 00:08 sigma-sum-node

@sigma-sum-node @Branwen07 你们好,我也遇到了同样的问题,一开始还以为数据丢失了,让agent跑了一圈之后确认了数据没问题 我提交了一个在webui提供“切换是否显示webchat对话”的pr #9910 ,但是现在astrbot还有四百多个pr所以我感觉可能得等好久。。倒也不是抱怨啦soulter大佬还有别的大佬都辛苦辛苦orz 说回这个问题,我(和D老师)简单写了一个复制4.28.0-beta1部分代码,然后能够显示(仅)webchat平台消息记录的astrbot插件,提供一个假装自己是官方webui的插件pages(x 目前主动兼容astrbot 4.25.7和4.28.0-beta1版本 可以到这里下载:https://github.com/heerxingen/astrbot-plugin-webchat-viewer 我也传到了插件市场但是目前在审核(https://cloud.astrbot.app/plugin/heerxingen/astrbot_plugin_webchat_viewer)

heerxingen avatar Sep 04 '26 15:09 heerxingen

@sigma-sum-node @Branwen07 你们好,我也遇到了同样的问题,一开始还以为数据丢失了,让agent跑了一圈之后确认了数据没问题 我提交了一个在webui提供“切换是否显示webchat对话”的pr #9910 ,但是现在astrbot还有四百多个pr所以我感觉可能得等好久。。倒也不是抱怨啦soulter大佬还有别的大佬都辛苦辛苦orz 说回这个问题,我(和D老师)简单写了一个复制4.28.0-beta1部分代码,然后能够显示(仅)webchat平台消息记录的astrbot插件,提供一个假装自己是官方webui的插件pages(x 目前主动兼容astrbot 4.25.7和4.28.0-beta1版本 可以到这里下载:https://github.com/heerxingen/astrbot-plugin-webchat-viewer 我也传到了插件市场但是目前在审核(https://cloud.astrbot.app/plugin/heerxingen/astrbot_plugin_webchat_viewer)

好的,我将严肃使用

Branwen07 avatar Sep 25 '26 04:09 Branwen07

Received and noted.

On Fri, Sep 25, 2026 at 5:26 AM Branwen07 @.***> wrote:

Branwen07 left a comment (AstrBotDevs/AstrBot#9474) https://github.com/AstrBotDevs/AstrBot/issues/9474#issuecomment-5826705511

@sigma-sum-node https://github.com/sigma-sum-node @Branwen07 https://github.com/Branwen07 你们好,我也遇到了同样的问题,一开始还以为数据丢失了,让agent跑了一圈之后确认了数据没问题 我提交了一个在webui提供“切换是否显示webchat对话”的pr #9910 https://github.com/AstrBotDevs/AstrBot/pull/9910 ,但是现在astrbot还有四百多个pr所以我感觉可能得等好久。。倒也不是抱怨啦soulter大佬还有别的大佬都辛苦辛苦orz 说回这个问题,我(和D老师)简单写了一个复制4.28.0-beta1部分代码,然后能够显示(仅)webchat平台消息记录的astrbot插件,提供一个假装自己是官方webui的插件pages(x 目前主动兼容astrbot 4.25.7和4.28.0-beta1版本 可以到这里下载: https://github.com/heerxingen/astrbot-plugin-webchat-viewer 我也传到了插件市场但是目前在审核( https://cloud.astrbot.app/plugin/heerxingen/astrbot_plugin_webchat_viewer)

好的,我将严肃使用

— Reply to this email directly, view it on GitHub https://github.com/AstrBotDevs/AstrBot/issues/9474?email_source=notifications&email_token=CI5EO67UZ7TB5H3TN52X4CL5QXXWVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOBSGY3TANJVGEY2M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-5826705511, or unsubscribe https://github.com/notifications/unsubscribe-auth/CI5EO6Y65PX43N4XYK4DPKD5QXXWVAVCNFSNUABFKJSXA33TNF2G64TZHM2TONJYGY2TENBQHNEXG43VMU5TKMBSGIZTIOJUGUY2C5QC . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/CI5EO647RKSB7YSGZBTKFC35QXXWVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOBSGY3TANJVGEY2M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSVGM33PORSXEX3JN5ZQ and Android https://github.com/notifications/mobile/android/CI5EO6YWCIOOY7JMDADI6FT5QXXWVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOBSGY3TANJVGEY2M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ. Download it today! You are receiving this because you are subscribed to this thread.Message ID: <AstrBotDevs/AstrBot/issues/9474/5826705511 @.*** com>

boua8745s12 avatar Sep 25 '26 04:09 boua8745s12

其实我的PR已经被合并了!更新到最新Astrbot版本就可以了😋 ---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2026年09月25日 12:26 | | 收件人 | AstrBotDevs/AstrBot @.> | | 抄送人 | Sekken @.>, Manual @.> | | 主题 | Re: [AstrBotDevs/AstrBot] WebChat超长会话在升级后不显示在新版UI对话记录中 (Issue #9474) | Branwen07 left a comment (AstrBotDevs/AstrBot#9474)

@@.*** 你们好,我也遇到了同样的问题,一开始还以为数据丢失了,让agent跑了一圈之后确认了数据没问题 我提交了一个在webui提供“切换是否显示webchat对话”的pr #9910 ,但是现在astrbot还有四百多个pr所以我感觉可能得等好久。。倒也不是抱怨啦soulter大佬还有别的大佬都辛苦辛苦orz 说回这个问题,我(和D老师)简单写了一个复制4.28.0-beta1部分代码,然后能够显示(仅)webchat平台消息记录的astrbot插件,提供一个假装自己是官方webui的插件pages(x 目前主动兼容astrbot 4.25.7和4.28.0-beta1版本 可以到这里下载:https://github.com/heerxingen/astrbot-plugin-webchat-viewer 我也传到了插件市场但是目前在审核(https://cloud.astrbot.app/plugin/heerxingen/astrbot_plugin_webchat_viewer)

好的,我将严肃使用

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

heerxingen avatar Sep 25 '26 05:09 heerxingen