fix: avoid WebUI ready banner when assets missing#8804
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a check to verify if WebUI static files are present before starting the dashboard, falling back to starting only the backend APIs and skipping the ready banner if they are missing. Corresponding unit tests were also added. Feedback on the changes highlights a critical issue: skipping the ready banner entirely when static files are missing prevents the initial generated credentials from being printed, permanently locking the user out. It is recommended to customize the banner to display backend API details and credentials even when frontend assets are missing.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
93e3552 to
77a26e5
Compare
77a26e5 to
26c71c1
Compare
Cyrene2026
left a comment
There was a problem hiding this comment.
我重新验证了一下:按照当前逻辑,只要 data/dist/index.html 存在,AstrBot 就会打印 WebUI is ready。
但我只是在 data/dist 里放了一个空的 index.html,没有 assets/,WebUI 仍然被判定为 ready。
这说明这里检查的并不是 WebUI 是否真的可用,而只是 index.html 是否存在。一个空文件都能通过,很显然,这里并不是真正检查 WebUI readiness check
有谁会这样做。。 |
Summary
Fixes #8795
Tests
Summary by Sourcery
Guard the WebUI startup flow against missing static assets and adjust logging and readiness output accordingly.
Bug Fixes:
Tests: