Skip to content

fix(remote-control): deduplicate session list in DingTalk/WeChat#473

Merged
sorrycc merged 1 commit intomasterfrom
fix/remote-control-session-list-dedup
Apr 9, 2026
Merged

fix(remote-control): deduplicate session list in DingTalk/WeChat#473
sorrycc merged 1 commit intomasterfrom
fix/remote-control-session-list-dedup

Conversation

@sorrycc
Copy link
Copy Markdown
Member

@sorrycc sorrycc commented Apr 9, 2026

Summary

  • Fix duplicated session list: DingTalk/WeChat adapters were appending a numbered action list to messages that already contained one from CommandHandler, causing users to see the session list twice when using /chats or /start
  • Add supportsInlineKeyboard capability flag to adapter interface and centralized sendWithActions() helper with explicit actionsInText parameter — Telegram uses native buttons, text-only platforms get a numbered list only when the text doesn't already contain one
  • Auto-link single session: When only one active session exists and user sends a message, auto-link silently instead of asking them to /chats
  • Fix /start string literal bug: "Welcome to ${APP_NAME}!" used regular quotes instead of backticks, showing literal ${APP_NAME} to users

Test plan

  • Send /chats in DingTalk/WeChat — session list should appear once, followed by "Reply with a number to select."
  • Send /chats in Telegram — session list with inline keyboard buttons (no change)
  • Select a project via /repos → tap project in DingTalk/WeChat — sessions should render as numbered list (not duplicated)
  • Send a message in WeChat/DingTalk with no linked session and exactly 1 active session — should auto-link and forward
  • Send a message with 0 or 2+ sessions — should show hint text, not auto-link
  • Unlink a session — should show "Session unlinked" + session list without duplication
  • Send /start with no sessions — should show app name correctly (not literal ${APP_NAME})

…auto-link single session

DingTalk and WeChat adapters appended a numbered action list to messages
that already contained one from CommandHandler, causing users to see
the session list twice.

Changes:
- Add `supportsInlineKeyboard` capability flag to adapter interface
- Add centralized `sendWithActions()` helper with explicit `actionsInText`
  parameter to avoid duplicate list rendering on text-only platforms
- Remove duplicate list rendering from DingTalk/WeChat sendMessage()
- Auto-link when only one active session exists (silent, no round-trip)
- Fix /start string literal bug (regular quotes → backticks for APP_NAME)
@sorrycc sorrycc force-pushed the fix/remote-control-session-list-dedup branch from 3a6b9e2 to 2af6136 Compare April 9, 2026 15:39
@sorrycc sorrycc merged commit 8c4bb0c into master Apr 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Build Ready

Platform Architecture Download Size
macOS Apple Silicon Download 147.40 MB
macOS Intel Download 155.08 MB
Windows x64 Download 171.05 MB

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