Skip to content

feat(dashboard): clarify manual Telegram bot setup - #64636

Merged
teknium1 merged 2 commits into
NousResearch:mainfrom
shannonsands:shannonsands/ns-594-manual-telegram-bot-setup
Jul 16, 2026
Merged

feat(dashboard): clarify manual Telegram bot setup#64636
teknium1 merged 2 commits into
NousResearch:mainfrom
shannonsands:shannonsands/ns-594-manual-telegram-bot-setup

Conversation

@shannonsands

@shannonsands shannonsands commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Makes the two Telegram onboarding paths explicit in the dashboard Channels page:

  • Quick setup keeps the managed QR flow as the recommended path.
  • Use your own bot opens a guided manual setup flow for bots created with @BotFather.

The manual flow now explains how to create a bot, where to obtain the complete token and numeric user ID, and how leaving the allowlist blank falls back to dashboard pairing approval. It also validates Telegram credentials in both the browser and API so malformed tokens or usernames cannot be silently written as configuration.

This keeps the centralized bot manager convenient without implying it is the only supported setup method.

Related Issue

NS-594: Add wording and clearer options for manual Telegram bot config

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Added clear Quick setup and Use your own bot choices to the Telegram channel card.
  • Added BotFather and user-ID instructions, direct links, and DM pairing guidance to the manual form.
  • Added client-side validation for Telegram bot-token shape and numeric allowlists.
  • Added matching API validation so non-dashboard callers receive the same protection.
  • Updated Telegram field metadata and added backend coverage for descriptions and invalid values.

How to Test

  1. Open Dashboard → Channels and confirm Telegram offers separate Quick setup and Manual setup controls.
  2. Open Manual setup and verify the BotFather, /newbot, user-ID, and Pairing guidance on desktop and mobile widths.
  3. Enter an invalid bot token or non-numeric allowed user ID and confirm the form rejects it before saving.
  4. Enter a valid-looking token such as 123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ_1234 and numeric comma-separated user IDs to exercise the accepted API shape in an isolated Hermes home.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS, desktop and mobile browser viewports

Focused validation run:

  • pytest -q tests/hermes_cli/test_web_server.py -k 'telegram_onboarding or messaging_platform' (20 passed)
  • npm --workspace web run typecheck
  • npm --workspace web run build
  • npm --workspace web run test -- --run src/lib/api.test.ts
  • ruff check hermes_cli/web_server.py hermes_cli/config.py tests/hermes_cli/test_web_server.py
  • git diff --check

Documentation & Housekeeping

  • I've updated relevant documentation (config.py field metadata supplies the dashboard guidance)
  • cli-config.yaml.example update is N/A; no config keys changed
  • CONTRIBUTING.md / AGENTS.md update is N/A; no architecture or workflow changed
  • I've considered cross-platform impact; the change uses existing dashboard controls and platform-neutral validation
  • Tool description/schema updates are N/A

Screenshots / Logs

Manually verified the Telegram choice panel and manual setup dialog at desktop and 390 × 844 mobile viewports. The dialog remains scrollable within the viewport and displays field-level errors for malformed tokens and allowlists.

Infographic

telegram-manual-setup

@shannonsands
shannonsands marked this pull request as ready for review July 14, 2026 22:20
@alt-glitch alt-glitch added type/feature New feature or request comp/dashboard Web dashboard / control panel UI (dashboard/, landing) platform/telegram Telegram bot adapter P3 Low — cosmetic, nice to have labels Jul 14, 2026
@shannonsands
shannonsands force-pushed the shannonsands/ns-594-manual-telegram-bot-setup branch from b23e39b to 947b0fa Compare July 16, 2026 04:24
@teknium1
teknium1 merged commit 4a69a66 into NousResearch:main Jul 16, 2026
40 checks passed
teknium1 added a commit that referenced this pull request Jul 16, 2026
The #62803 branch predates PR #64636's Telegram token-shape validation
on the messaging platform PUT endpoint; align the new guard test's
fixture with the validated format.
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
The NousResearch#62803 branch predates PR NousResearch#64636's Telegram token-shape validation
on the messaging platform PUT endpoint; align the new guard test's
fixture with the validated format.
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
The NousResearch#62803 branch predates PR NousResearch#64636's Telegram token-shape validation
on the messaging platform PUT endpoint; align the new guard test's
fixture with the validated format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/dashboard Web dashboard / control panel UI (dashboard/, landing) 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.

3 participants