Skip to content

feat(ton-bridge): add inline keyboard URL button support - #46

Merged
xlabtg merged 3 commits into
xlabtg:mainfrom
konard:issue-44-4fee5d5a6a03
Mar 25, 2026
Merged

feat(ton-bridge): add inline keyboard URL button support#46
xlabtg merged 3 commits into
xlabtg:mainfrom
konard:issue-44-4fee5d5a6a03

Conversation

@konard

@konard konard commented Mar 25, 2026

Copy link
Copy Markdown

Summary

Fixes #44

  • Changed buildMessageWithLink() to return { text, opts } where opts.inlineKeyboard contains a real Telegram inline keyboard URL button instead of embedding the URL as plain text in the message
  • Updated all 3 tools (ton_bridge_open, ton_bridge_about, ton_bridge_custom_message) to pass the opts to sdk.telegram.sendMessage()
  • Added tests for inline keyboard structure, button text (with/without emoji), URL content, and emoji support
  • Updated README examples to show the new button behavior

Before / After

Before:

TON Bridge — The #1 Bridge in the TON Catalog

Click the button below to open TON Bridge Mini App.
TON Bridge No1: https://t.me/TONBridge_robot?startapp

After:

TON Bridge — The #1 Bridge in the TON Catalog

Click the button below to open TON Bridge Mini App.

[ TON Bridge No1 ]  ← real inline keyboard URL button

Test plan

  • All 71 tests pass (npm test) — 3 new inline keyboard tests added
  • ton_bridge_open, ton_bridge_about, ton_bridge_custom_message all send inlineKeyboard opts
  • Button text uses configured/param buttonText (with or without emoji)
  • startParam is still appended to the button URL when set
  • Backward compatibility preserved — all existing buttonText and startParam params still work

🤖 Generated with Claude Code

konard and others added 2 commits March 25, 2026 19:04
Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: xlabtg#44
Replace plain text link with a proper Telegram inline keyboard URL button.
`buildMessageWithLink` now returns `{ text, opts }` where `opts.inlineKeyboard`
contains the TON Bridge Mini App URL button. All three tools (`ton_bridge_open`,
`ton_bridge_about`, `ton_bridge_custom_message`) pass the opts to
`sdk.telegram.sendMessage`. Tests updated to verify inline keyboard structure,
button text (with and without emoji), and URL content. README examples updated.

Fixes xlabtg#44

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@konard konard changed the title [WIP] 🐛 Требуется: Добавить поддержку кнопок в ton-bridge плагине feat(ton-bridge): add inline keyboard URL button support Mar 25, 2026
@konard
konard marked this pull request as ready for review March 25, 2026 19:08
@konard

konard commented Mar 25, 2026

Copy link
Copy Markdown
Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $1.425009
  • Calculated by Anthropic: $0.939370 USD
  • Difference: $-0.485639 (-34.08%)

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: sonnet
  • Model: Claude Sonnet 4.6 (claude-sonnet-4-6)

📎 Log file uploaded as Gist (859KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard

konard commented Mar 25, 2026

Copy link
Copy Markdown
Author

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@xlabtg
xlabtg merged commit fb3a1a6 into xlabtg:main Mar 25, 2026
6 checks passed
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.

🐛 Требуется: Добавить поддержку кнопок в ton-bridge плагине

2 participants