Skip to content

feat: recreate bot platforms through QR scanning - #10083

Open
Soulter wants to merge 2 commits into
masterfrom
codex/platform-rescan
Open

feat: recreate bot platforms through QR scanning#10083
Soulter wants to merge 2 commits into
masterfrom
codex/platform-rescan

Conversation

@Soulter

@Soulter Soulter commented Sep 14, 2026

Copy link
Copy Markdown
Member

Add a Rebind via QR code action to the bot editor header for Lark, DingTalk, QQ Official (WebSocket and webhook), and Weixin. After the user confirms that the existing connection will be deleted, delete the bot and open the matching creation template in scan mode with the original bot ID prefilled.

Cancelling confirmation preserves the existing bot; failed deletion prevents recreation. Prevent duplicate rescan requests and saving while a rescan is pending, reset dialog state on close, and translate the action and confirmation in all four UI languages. This reuses the existing frontend creation flow and APIs.

Validation: dashboard production build (including vue-tsc --noEmit), Prettier checks, ruff format ., and ruff check .. A temporary harness using the actual Vue component scripts verified cancellation, successful deletion, rejected deletion, API error responses, and scan-mode initialization for all five adapter types.

Summary by Sourcery

Enable users to replace supported bot connections by confirming deletion and reopening the matching platform setup in QR-scan mode.

New Features:

  • Add a Rebind via QR code action for supported bot platforms that recreates a connection through the platform’s QR-scanning creation flow.
  • Prefill the original bot ID when entering scan mode for Lark, DingTalk, QQ Official, and Weixin integrations.

Bug Fixes:

  • Prevent duplicate rescan requests and disable saving while a rescan is in progress.
  • Preserve existing bots when confirmation is cancelled or deletion fails, and reset creation-dialog state when it closes.

Documentation:

  • Add translations for the rescan action and confirmation prompt in English, Japanese, Russian, and Simplified Chinese.

@sourcery-ai sourcery-ai Bot left a comment

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.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. Rescanning permanently deletes the selected platform and its connection settings before opening the replacement QR flow; cancelling or reverting the code cannot restore that data. The impact is bounded to the user-selected platform, but the deletion itself is not repaired by rerunning the operation.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
astrbot-docs eff3d95 Commit Preview URL

Branch Preview URL
Sep 14 2026, 12:21 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant