fix: defer dashboard setup until startup - #9879
Merged
Merged
Conversation
10 tasks
Komorebiehco
pushed a commit
to Komorebiehco/AstrBot
that referenced
this pull request
Sep 1, 2026
* fix: defer dashboard setup until startup * refactor(migration): remove logging statements from webchat session migration
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.
Motivation
Running
astrbot initchecked and prepared WebUI assets, which imported the core configuration too early. This could generate the initial Dashboard password during initialization, so it was no longer available forastrbot runto print on first startup.Modifications / 改动点
Defer Dashboard asset preparation from
astrbot inittoastrbot run.Keep initial Dashboard password generation and output in the first startup flow.
Replace the plain missing-WebUI response with a minimal bilingual recovery page.
Explain the automatic download/restart flow and the separate manual installation steps.
Use the Dashboard primary color for links and buttons, without box shadows.
Add regression coverage for CLI initialization and the Dashboard fallback page.
This is NOT a breaking change. / 这不是一个破坏性变更。
Screenshots or Test Results / 运行截图或测试结果
Verification steps:
Results:
astrbot init -ydoes not create the core config, while the first successfulastrbot runprints the initial username and password.Checklist / 检查清单
requirements.txtandpyproject.toml. / 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到requirements.txt和pyproject.toml文件相应位置。Summary by Sourcery
Defer Dashboard setup to startup so the initial credentials remain available for first-run output and provide actionable guidance when WebUI assets are unavailable.
Bug Fixes:
Enhancements:
Tests:
Chores: