Skip to content

Interactive Button-based Telegram Session Resume UI Improvements - #33725

Closed
indigokarasu wants to merge 0 commit into
NousResearch:mainfrom
indigokarasu:feat/telegram-resume-ui-v3
Closed

Interactive Button-based Telegram Session Resume UI Improvements#33725
indigokarasu wants to merge 0 commit into
NousResearch:mainfrom
indigokarasu:feat/telegram-resume-ui-v3

Conversation

@indigokarasu

Copy link
Copy Markdown
Contributor

Summary

Replaces the plain-text /resume list on Telegram with an inline keyboard showing the last 12 non-cron named sessions sorted by recency.

Changes

  • gateway/platforms/telegram.py: Intercept /resume with no args in _handle_command, send inline keyboard via new _send_resume_button_ui() method. Handle rs:<session_id> callback to dispatch synthetic /resume event.
  • gateway/run.py: New get_resume_sessions() method returns structured session data. Fetches from all platforms, excludes cron/tool, filters for titled sessions, stops at 12.
  • tests/gateway/test_telegram_resume_button_ui.py: 13 new tests covering interception, button UI, callback handling, auth, and session listing.

UX

  • Numbered list (1-12) in message body with title + preview
  • Matching numbered buttons (truncated to fit mobile ~40 chars)
  • Plain text (no parse mode) — avoids Telegram HTML/Markdown escaping issues with session titles
  • Sessions sorted by most recent activity
  • Fallback: /resume or /resume still works through normal gateway handling
  • Link previews disabled on resume UI messages

Test Results

  • 13 new tests: all passing ✅
  • 2635 existing gateway tests: 2635 passing, 1 pre-existing failure (MS Graph webhook trio test, unrelated)

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have platform/telegram Telegram bot adapter comp/gateway Gateway runner, session dispatch, delivery labels May 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This appears to be a resubmission of #33702 (closed, same title and approach — Telegram resume inline keyboard). The prior PR was closed because it included unrelated scope creep (cron retry logic). This version appears scoped to the resume UI only.

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

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/telegram Telegram bot adapter type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants