Skip to content

[Refactor] Unify Telegram elicitation prompt retirement - #2649

Draft
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/telegram-elicitation-retirement-2sgkqmhuoovwq
Draft

roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/telegram-elicitation-retirement-2sgkqmhuoovwq

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Created by Roomote. View the task or mention @roomote-roomote for follow-up asks.

What changed

  • Consolidated Telegram elicitation confirmation text replacement, button removal, and managed-footer state updates into the existing lock-aware retirement operation.
  • Kept stale prompt retirement as the button-only form of the same operation and retained fallback confirmation posting when an in-place edit is unavailable.
  • Updated focused API and SDK coverage for single-mutation ownership, persisted confirmation text, Markdown delivery, stale retirement, and fallback behavior.

Why this change was made

Answer confirmation previously retired the keyboard through the SDK and then edited the same Telegram message again in the API handler. Splitting one lifecycle transition across layers created duplicate provider calls and left persisted footer text out of sync with the rendered confirmation.

Impact

Telegram answers now retire their prompt with one owned message mutation, and later managed-footer refreshes cannot restore the old prompt text or controls. Submission semantics and best-effort fallback delivery are unchanged.

@roomote-community

roomote-community Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

1 issue outstanding. See task

  • packages/sdk/src/server/lib/communication-request-user-input.ts:300 Failed replacement edits leave the original prompt's inline keyboard active.

Reviewed b117fa3

messageId: params.messageId,
});
if (params.replacementText !== undefined) {
await adapter.editMessageText({

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.

If editMessageText fails, the record has already been rewritten without buttons, so this returns false and confirmAnswer posts a fallback confirmation without making another mutation to the original prompt. Its inline keyboard therefore remains visible until a later footer refresh (and can be clicked in the meantime). Previously the separate editMessageReplyMarkup call retired the keyboard before the text edit. On this failure path, also clear the reply markup best-effort, or otherwise preserve the old two-step cleanup behavior.

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