Skip to content

fix(dashboard): update aiocqhttp tutorial links to new docs path#7038

Merged
Soulter merged 1 commit intoAstrBotDevs:masterfrom
idiotsj:codex/fix-onebot-doc-link
Mar 27, 2026
Merged

fix(dashboard): update aiocqhttp tutorial links to new docs path#7038
Soulter merged 1 commit intoAstrBotDevs:masterfrom
idiotsj:codex/fix-onebot-doc-link

Conversation

@idiotsj
Copy link
Copy Markdown
Contributor

@idiotsj idiotsj commented Mar 27, 2026

Summary

Fix OneBot (aiocqhttp) tutorial links in Dashboard that still point to the old napcat path.

  • Update dashboard/src/utils/platformUtils.js
    • aiocqhttp tutorial URL: .../platform/aiocqhttp/napcat.html -> .../platform/aiocqhttp.html
  • Update dashboard/src/components/platform/AddNewPlatform.vue
    • Security warning "learn more" URL: .../deploy/platform/aiocqhttp/napcat.html#... -> .../platform/aiocqhttp.html

Why

The docs page has been migrated to:

The old links can lead to wrong pages / stale routes.

Related Issue

Closes #7037

Test

  • Verified by code search that no old aiocqhttp/napcat.html or deploy/platform/aiocqhttp links remain in repo.

Summary by Sourcery

Update dashboard links to point OneBot (aiocqhttp) users to the new documentation URL.

Bug Fixes:

  • Correct aiocqhttp tutorial link in the platform tutorial mapping to use the new docs path.
  • Update the aiocqhttp security warning "learn more" link to the current documentation page.

@auto-assign auto-assign Bot requested review from Raven95676 and Soulter March 27, 2026 03:11
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 27, 2026
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • For the updated security warning link in AddNewPlatform.vue, consider including an anchor to the specific security section on aiocqhttp.html (if one exists) so users land directly on the relevant guidance rather than the top of the page.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- For the updated security warning link in `AddNewPlatform.vue`, consider including an anchor to the specific security section on `aiocqhttp.html` (if one exists) so users land directly on the relevant guidance rather than the top of the page.

## Individual Comments

### Comment 1
<location path="dashboard/src/components/platform/AddNewPlatform.vue" line_range="261-263" />
<code_context>
         <p>{{ tm('dialog.securityWarning.aiocqhttpTokenMissing') }}</p>
         <span><a
-            href="https://docs.astrbot.app/deploy/platform/aiocqhttp/napcat.html#%E9%99%84%E5%BD%95-%E5%A2%9E%E5%BC%BA%E8%BF%9E%E6%8E%A5%E5%AE%89%E5%85%A8%E6%80%A7"
+            href="https://docs.astrbot.app/platform/aiocqhttp.html"
             target="_blank">{{ tm('dialog.securityWarning.learnMore') }}</a></span>
       </v-card-text>
</code_context>
<issue_to_address>
**🚨 suggestion (security):** Consider adding rel="noopener noreferrer" for security when using target="_blank".

This prevents the new tab from accessing `window.opener` and potentially manipulating or redirecting the original page.

```suggestion
        <span><a
            href="https://docs.astrbot.app/platform/aiocqhttp.html"
            target="_blank"
            rel="noopener noreferrer">{{ tm('dialog.securityWarning.learnMore') }}</a></span>
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines 261 to 263
<span><a
href="https://docs.astrbot.app/deploy/platform/aiocqhttp/napcat.html#%E9%99%84%E5%BD%95-%E5%A2%9E%E5%BC%BA%E8%BF%9E%E6%8E%A5%E5%AE%89%E5%85%A8%E6%80%A7"
href="https://docs.astrbot.app/platform/aiocqhttp.html"
target="_blank">{{ tm('dialog.securityWarning.learnMore') }}</a></span>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 suggestion (security): Consider adding rel="noopener noreferrer" for security when using target="_blank".

This prevents the new tab from accessing window.opener and potentially manipulating or redirecting the original page.

Suggested change
<span><a
href="https://docs.astrbot.app/deploy/platform/aiocqhttp/napcat.html#%E9%99%84%E5%BD%95-%E5%A2%9E%E5%BC%BA%E8%BF%9E%E6%8E%A5%E5%AE%89%E5%85%A8%E6%80%A7"
href="https://docs.astrbot.app/platform/aiocqhttp.html"
target="_blank">{{ tm('dialog.securityWarning.learnMore') }}</a></span>
<span><a
href="https://docs.astrbot.app/platform/aiocqhttp.html"
target="_blank"
rel="noopener noreferrer">{{ tm('dialog.securityWarning.learnMore') }}</a></span>

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates documentation links for the aiocqhttp platform in both the AddNewPlatform component and the platform utility mapping. Feedback was provided regarding the removal of a specific anchor in the security warning link, which may make it more difficult for users to find relevant safety information on the new documentation page.

<p>{{ tm('dialog.securityWarning.aiocqhttpTokenMissing') }}</p>
<span><a
href="https://docs.astrbot.app/deploy/platform/aiocqhttp/napcat.html#%E9%99%84%E5%BD%95-%E5%A2%9E%E5%BC%BA%E8%BF%9E%E6%8E%A5%E5%AE%89%E5%85%A8%E6%80%A7"
href="https://docs.astrbot.app/platform/aiocqhttp.html"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The previous link included an anchor (#附录-增强连接安全性) that directed users to a specific section on connection security. The new link points to the top of the page, which makes it harder for users to find this critical information. To improve usability, please consider adding an anchor to the new URL if a corresponding section exists on the new documentation page.

@dosubot dosubot Bot added the area:webui The bug / feature is about webui(dashboard) of astrbot. label Mar 27, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Mar 27, 2026
@Soulter Soulter merged commit 8986d05 into AstrBotDevs:master Mar 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webui The bug / feature is about webui(dashboard) of astrbot. lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard 中 OneBot 接入文档链接仍指向旧的 napcat 页面

2 participants