Skip to content

feat: Optimize the style of command approval in TG#45

Open
cl1107 wants to merge 1 commit into
cosmicstack-labs:mainfrom
cl1107:optimize-tg
Open

feat: Optimize the style of command approval in TG#45
cl1107 wants to merge 1 commit into
cosmicstack-labs:mainfrom
cl1107:optimize-tg

Conversation

@cl1107
Copy link
Copy Markdown

@cl1107 cl1107 commented May 7, 2026

What

  • Telegram Interaction Optimization: Approval messages now display action result labels (Allow / Denied / Blocked). Buttons are replaced with more intuitive emoji indicators and will be hidden after approval.

Changes

src/channels/telegram.ts

  • Added a new result parameter to buildApprovalKeyboard() to display different emoji labels based on Allow/Denied/Blocked status.
  • Retained the original approval request text in handleCallbackQuery(), and appended the operation result when editing the message.
  • Added try-catch for message.edit_text to improve system stability.

src/channels/telegram.test.ts (Newly Added)

  • Approval request process tests (allow / deny / block).
  • Error handling tests for expired / rejected requests.
  • Tests on the impact of accessControl configuration on approval behaviors.

Test

  • All newly added unit tests passed
  • Manual verification completed for the UI display of Telegram approval process
CleanShot 2026-05-07 at 17 09 26@2x CleanShot 2026-05-07 at 17 12 09@2x

…t messages

Add comprehensive unit tests for TelegramChannel covering approval
request handling and access control flow.

Improve UI interaction in Telegram messages:
- Show action result labels (Allow, Denied, etc.) on approval messages
- Update button text to more intuitive emoji indicators
- Preserve original approval request content when editing messages
- Enhance error handling for improved system stability
@cl1107 cl1107 changed the title optimize-tg 优化在 tg 中命令审批的样式 May 7, 2026
@cl1107 cl1107 changed the title 优化在 tg 中命令审批的样式 feat: Optimize the style of command approval in TG May 7, 2026
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