fix(ton-bridge): replace inlineKeyboard URL buttons with embedded text links - #34
Merged
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: xlabtg#33
…t links
The agent's TelegramBridge.sendMessage only supports callback_data buttons
in inlineKeyboard. URL buttons ({ text, url }) cause Buffer.from(undefined)
because the agent code expects callback_data on every button. This fixes
all three tools (ton_bridge_open, ton_bridge_about, ton_bridge_custom_message)
by embedding the Mini App deep link directly in the message text instead.
Fixes xlabtg#33
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
konard
marked this pull request as ready for review
March 23, 2026 21:30
This reverts commit 75dcb05.
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (1207KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
All three TON Bridge tools (
ton_bridge_open,ton_bridge_about,ton_bridge_custom_message) crash with:Root cause
The agent's
TelegramBridge.sendMessageimplementation iterates overinlineKeyboardbuttons and callsBuffer.from(button.callback_data)to serialize button data. The TON Bridge plugin passes URL buttons ({ text, url }) which don't havecallback_data— soBuffer.from(undefined)is called, causing the crash.The SDK documentation (
CONTRIBUTING.md,references/patterns.md) only showscallback_databuttons ininlineKeyboardexamples. No other plugin in the repo uses URL buttons — onlycallback_databuttons are supported.Fix
Replace
inlineKeyboardURL buttons with the Mini App link embedded directly in the message text via a newbuildMessageWithLink()helper. Thehttps://t.me/TONBridge_robot?startappdeep link renders as a tappable link in Telegram messages across DMs, groups, and channels.Before (crashes):
After (works):
Tests
All 28 tests pass. Updated tests verify:
inlineKeyboard)inlineKeyboardoptions passed tosendMessageFixes #33
🤖 Generated with Claude Code