feat(dashboard): show plugin logs in installed plugin details - #9861
Open
wdcyxxycdw wants to merge 3 commits into
Open
feat(dashboard): show plugin logs in installed plugin details#9861wdcyxxycdw wants to merge 3 commits into
wdcyxxycdw wants to merge 3 commits into
Conversation
wdcyxxycdw
marked this pull request as ready for review
August 28, 2026 10:26
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="dashboard/src/components/shared/ConsoleDisplayer.vue" line_range="132-135" />
<code_context>
},
async mounted() {
await this.fetchLogHistory();
+ if (this.isUnmounted) {
+ return;
+ }
this.connectSSE();
document.addEventListener("fullscreenchange", this.handleFullscreenChange);
},
</code_context>
<issue_to_address>
**issue (bug_risk):** A history request started by `onopen` or a reconnect timer is not cancelled or rechecked after it resolves, so an unmounted console still processes the response and mutates `localLogCache` after teardown. The added `isUnmounted` checks only guard the initial `mounted` continuation and the reconnection path, not the asynchronous history method itself.
**Triggers:** When the component is unmounted while a history request is in flight.
**Suggested fix:** Check `isUnmounted` inside `fetchLogHistory` before processing the response, and avoid starting history fetches from `onopen` after teardown.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: dashboard/src/components/shared/ConsoleDisplayer.vue:135
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Summary
Add recent and live plugin-scoped logs to installed plugin detail pages.
#9850
Modifications / 改动点
Add structured plugin attribution to brokered logs.
Filter console history and live updates by plugin.
Show the existing console in installed plugin details with level filters, auto-scroll, and fullscreen controls by reusing.
Add localized UI text and backend test coverage.
This is NOT a breaking change. / 这不是一个破坏性变更。
Scope
astrbot.plugin.<plugin_name>loggers.Screenshots or Test Results / 运行截图或测试结果
Automated verification
uvx --from ruff==0.15.2 ruff format --check .— 501 files already formatted.uvx --from ruff==0.15.2 ruff check .— passed.uv run pytest -q tests/unit/test_api_logger.py— 8 passed.node --test dashboard/tests/*.test.mjs— 39 passed.pnpm --dir dashboard typecheck— passed.pnpm --dir dashboard build— passed.UI evidence
Checklist / 检查清单
Summary by Sourcery
Show live and recent logs for installed plugins directly in their detail pages.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests: