Skip to content

feat: recreate bot platforms through QR scanning - #10083

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

Soulter wants to merge 3 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. Use the normal creation flow to derive the bot ID from the template and scan result, while retaining manual ID editing.

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, automatic ID naming, and manual ID overrides for all five adapter types.

Summary by Sourcery

Enable QR-code rebinding for supported bot platforms by deleting the existing connection and reopening the standard creation flow in scan mode.

New Features:

  • Add QR-based rebind support for Lark, DingTalk, QQ Official, and Weixin bot platforms.
  • Allow the existing bot editor to launch the platform creation flow in scan mode while retaining manual bot ID editing.

Bug Fixes:

  • Prevent duplicate rescan requests and prevent saving while a rescan is in progress.
  • Preserve existing bots when confirmation is cancelled and stop recreation when deletion fails.
  • Reset creation dialog state when it closes.

Enhancements:

  • Localize the rescan action and confirmation prompt across all supported UI languages.

@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

cloudflare-workers-and-pages Bot commented Sep 14, 2026

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 d029fcc Commit Preview URL

Branch Preview URL
Sep 14 2026, 01:19 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