AstrBot icon indicating copy to clipboard operation
AstrBot copied to clipboard

[Bug]WebChat 使用enter选择指令导致Tooltip残留在Chat界面

Open CMKH1337 opened this issue 4 months ago • 1 comments

What happened / 发生了什么

在webchat界面使用/选择指令时,将鼠标放在任意一个指令上弹出Tooltip后用enter选择指令,tooltip依旧会留在chat界面

Image Image

Reproduce / 如何复现?

1.打开一个webchat对话 2.使用/调出指令选择 Image 3.将鼠标放在一个指令上等待tooltip出现 Image 4.使用enter选择指令 5.tooltip依旧保持在chatui上 Image

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

v4.26.5 windows一键包

OS

Windows

Logs / 报错日志

[2026-07-15 02:19:09.957 +0800] [shutdown] tray quit requested, stopping backend asynchronously [2026-07-15 02:19:09.965 +0800] [shutdown] backend stop finished, exiting desktop process [2026-07-15 02:19:09.968 +0800] [shutdown] exit request allowed to pass through after backend cleanup [2026-07-15 02:19:09.976 +0800] [shutdown] exit fallback cleanup skipped: backend cleanup already running [2026-07-15 02:19:12.131 +0800] [startup] desktop process starting [2026-07-15 02:19:12.134 +0800] [startup] desktop log path: C:\Users\Administrator.astrbot\logs\desktop.log [2026-07-15 02:19:16.606 +0800] [shutdown] Windows shutdown handler installed [2026-07-15 02:19:16.609 +0800] [startup] silent launch disabled, showing main window [2026-07-15 02:19:17.053 +0800] [runtime] page-load started: http://tauri.localhost/ [2026-07-15 02:19:17.291 +0800] [runtime] page-load finished: http://tauri.localhost/ [2026-07-15 02:19:18.003 +0800] [runtime] spawned backend: cmd=["\\?\C:\Users\Administrator\AppData\Local\AstrBot\backend\python\python.exe", "\\?\C:\Users\Administrator\AppData\Local\AstrBot\backend\launch_backend.py", "--webui-dir", "\\?\C:\Users\Administrator\AppData\Local\AstrBot\webui"], cwd=C:\Users\Administrator.astrbot [2026-07-15 02:19:23.495 +0800] [runtime] backend startup heartbeat is fresh while HTTP dashboard is not ready yet; waiting [2026-07-15 02:20:46.617 +0800] [runtime] backend TCP port is reachable but HTTP dashboard is not ready yet; waiting [2026-07-15 02:20:49.879 +0800] [runtime] page-load started: http://127.0.0.1:6185/ [2026-07-15 02:20:51.840 +0800] [runtime] page-load finished: http://127.0.0.1:6185/#/ [2026-07-15 02:27:24.615 +0800] [restart] tray requested backend restart [2026-07-15 02:27:24.871 +0800] [restart] backend restart requested [2026-07-15 02:27:24.906 +0800] [restart] skip graceful restart for packaged windows managed backend; using managed restart [2026-07-15 02:27:26.211 +0800] [runtime] taskkill graceful stop returned non-zero: pid=4128, status=ExitStatus(ExitStatus(128)) [2026-07-15 02:27:26.213 +0800] [runtime] taskkill graceful stop not successful; shorten graceful wait: pid=4128, status=ExitStatus(ExitStatus(128)), requested_wait_ms=10000, effective_wait_ms=350 [2026-07-15 02:27:26.935 +0800] [runtime] child graceful stop timed out, force-kill issued: pid=4128, graceful=Ok(ExitStatus(ExitStatus(128))), force=Ok(ExitStatus(ExitStatus(0))), followup_wait_ms=2200 [2026-07-15 02:27:27.098 +0800] [runtime] spawned backend: cmd=["\\?\C:\Users\Administrator\AppData\Local\AstrBot\backend\python\python.exe", "\\?\C:\Users\Administrator\AppData\Local\AstrBot\backend\launch_backend.py", "--webui-dir", "\\?\C:\Users\Administrator\AppData\Local\AstrBot\webui"], cwd=C:\Users\Administrator.astrbot [2026-07-15 02:27:28.742 +0800] [runtime] backend startup heartbeat is fresh while HTTP dashboard is not ready yet; waiting [2026-07-15 02:28:24.189 +0800] [runtime] backend TCP port is reachable but HTTP dashboard is not ready yet; waiting [2026-07-15 02:28:25.504 +0800] [runtime] page-load finished: http://127.0.0.1:6185/#/console [2026-07-15 02:28:25.659 +0800] [runtime] page-load finished: http://127.0.0.1:6185/#/console [2026-07-15 02:28:25.710 +0800] [restart] backend restarted from tray menu [2026-07-15 02:28:25.724 +0800] [runtime] page-load finished: http://127.0.0.1:6185/#/console [2026-07-15 02:28:25.802 +0800] [runtime] page-load finished: http://127.0.0.1:6185/#/console [2026-07-15 02:28:25.915 +0800] [runtime] page-load started: http://127.0.0.1:6185/?_r=1784053705773#/console [2026-07-15 02:28:26.326 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784053705773#/console [2026-07-15 02:48:11.456 +0800] [restart] tray requested backend restart [2026-07-15 02:48:11.873 +0800] [restart] backend restart requested [2026-07-15 02:48:12.034 +0800] [restart] skip graceful restart for packaged windows managed backend; using managed restart [2026-07-15 02:48:13.317 +0800] [runtime] taskkill graceful stop returned non-zero: pid=4312, status=ExitStatus(ExitStatus(128)) [2026-07-15 02:48:13.318 +0800] [runtime] taskkill graceful stop not successful; shorten graceful wait: pid=4312, status=ExitStatus(ExitStatus(128)), requested_wait_ms=10000, effective_wait_ms=350 [2026-07-15 02:48:13.987 +0800] [runtime] child graceful stop timed out, force-kill issued: pid=4312, graceful=Ok(ExitStatus(ExitStatus(128))), force=Ok(ExitStatus(ExitStatus(0))), followup_wait_ms=2200 [2026-07-15 02:48:14.157 +0800] [runtime] spawned backend: cmd=["\\?\C:\Users\Administrator\AppData\Local\AstrBot\backend\python\python.exe", "\\?\C:\Users\Administrator\AppData\Local\AstrBot\backend\launch_backend.py", "--webui-dir", "\\?\C:\Users\Administrator\AppData\Local\AstrBot\webui"], cwd=C:\Users\Administrator.astrbot [2026-07-15 02:48:15.805 +0800] [runtime] backend startup heartbeat is fresh while HTTP dashboard is not ready yet; waiting [2026-07-15 02:49:13.787 +0800] [runtime] backend TCP port is reachable but HTTP dashboard is not ready yet; waiting [2026-07-15 02:49:15.104 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784053705773#/console [2026-07-15 02:49:15.165 +0800] [restart] backend restarted from tray menu [2026-07-15 02:49:15.185 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784053705773#/console [2026-07-15 02:49:15.221 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784053705773#/console [2026-07-15 02:49:15.488 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784053705773#/console [2026-07-15 02:49:15.536 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784053705773#/console [2026-07-15 02:49:15.582 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784053705773#/console [2026-07-15 02:49:15.636 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784053705773#/console [2026-07-15 02:49:15.783 +0800] [runtime] page-load started: http://127.0.0.1:6185/?_r=1784054955626#/console [2026-07-15 02:49:16.521 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/console [2026-07-15 03:44:06.862 +0800] [restart] tray requested backend restart [2026-07-15 03:44:07.493 +0800] [restart] backend restart requested [2026-07-15 03:44:07.580 +0800] [restart] skip graceful restart for packaged windows managed backend; using managed restart [2026-07-15 03:44:08.269 +0800] [runtime] taskkill graceful stop returned non-zero: pid=3352, status=ExitStatus(ExitStatus(128)) [2026-07-15 03:44:08.270 +0800] [runtime] taskkill graceful stop not successful; shorten graceful wait: pid=3352, status=ExitStatus(ExitStatus(128)), requested_wait_ms=10000, effective_wait_ms=350 [2026-07-15 03:44:09.082 +0800] [runtime] child graceful stop timed out, force-kill issued: pid=3352, graceful=Ok(ExitStatus(ExitStatus(128))), force=Ok(ExitStatus(ExitStatus(0))), followup_wait_ms=2200 [2026-07-15 03:44:09.552 +0800] [runtime] spawned backend: cmd=["\\?\C:\Users\Administrator\AppData\Local\AstrBot\backend\python\python.exe", "\\?\C:\Users\Administrator\AppData\Local\AstrBot\backend\launch_backend.py", "--webui-dir", "\\?\C:\Users\Administrator\AppData\Local\AstrBot\webui"], cwd=C:\Users\Administrator.astrbot [2026-07-15 03:44:11.503 +0800] [runtime] backend startup heartbeat is fresh while HTTP dashboard is not ready yet; waiting [2026-07-15 03:45:21.601 +0800] [runtime] backend TCP port is reachable but HTTP dashboard is not ready yet; waiting [2026-07-15 03:45:22.205 +0800] [restart] backend restarted from tray menu [2026-07-15 03:45:22.697 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/config [2026-07-15 03:45:22.869 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/config [2026-07-15 03:45:22.913 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/config [2026-07-15 03:45:22.977 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/config [2026-07-15 03:45:23.013 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/config [2026-07-15 03:45:23.033 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/config [2026-07-15 03:45:23.061 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/config [2026-07-15 03:45:23.081 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/config [2026-07-15 03:45:23.111 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/config [2026-07-15 03:45:23.130 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784054955626#/config [2026-07-15 03:45:23.913 +0800] [runtime] page-load started: http://127.0.0.1:6185/?_r=1784058322967#/config [2026-07-15 03:45:24.946 +0800] [runtime] page-load finished: http://127.0.0.1:6185/?_r=1784058322967#/config 没找到webchat对应的日志随便上传了一个

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • [ ] Yes!

Code of Conduct

CMKH1337 avatar Jul 14 '26 20:07 CMKH1337

Hi @CMKH1337! I'm Dosu and I'm helping the AstrBotTeam team.

这个 bug 的根因在 CommandSuggestion.vue 中——tooltip 的显示/隐藏完全依赖鼠标事件(mouseenter / mouseleave),没有针对键盘操作的清理逻辑 [1]。

具体流程:

  1. 鼠标悬停在指令项上 → mouseenter 触发 tooltip.visible = true [2]
  2. 用户按 Enter 选择指令 → ChatInput.vue 中的 handleCommandSelect() 关闭了指令面板,但没有重置 tooltip 状态 [3]
  3. 由于面板是被程序隐藏的而非鼠标移出,mouseleave 事件不会触发 → tooltip 残留

加上 tooltip 使用了 Vue 的 Teleport 渲染到 document.body,它的 DOM 独立于指令面板存在,面板消失后 tooltip 元素依然留在页面上 [4]。

修复方向: 在 CommandSuggestion.vue 中暴露一个清理方法(如 resetTooltip),或在组件的 watch / onBeforeUnmount 中主动设置 tooltip.visible = false;同时在 ChatInput.vue 的 handleCommandSelect() 中调用该清理逻辑,确保键盘选择指令时 tooltip 也能正确关闭。

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 14 '26 20:07 dosubot[bot]