feat: add telegram thread routing and delivery test#22
Open
juanjoGonDev wants to merge 5 commits intoachetronic:masterfrom
Open
feat: add telegram thread routing and delivery test#22juanjoGonDev wants to merge 5 commits intoachetronic:masterfrom
juanjoGonDev wants to merge 5 commits intoachetronic:masterfrom
Conversation
Owner
|
Hi @juanjoGonDev for this PR and contribution! I have several questions regarding to that. Could you open a related Issue to start discussion about them? I want to merge your changes but I think PRs section is not the proper place to keep the discussion 🙂 |
Author
Thanks! I opened issue #23 to continue the discussion and track follow-ups |
achetronic
added a commit
that referenced
this pull request
Apr 18, 2026
The previous commit (3528d6b) duplicated logic that had already been implemented on 2026-04-10 by commit 75cc2de. The ConversationRecorder middleware intercepts every session DELETE and calls Executor.CloseConversationSession, which already handles both admin and user perspectives for every client and for the admin API alike. Reverted: - SetConversationStore + closeConversations in telegram/slack/discord bots - conversations field + wiring in clientManager (main.go) Remaining wins from the previous commit stay in place: - Telegram thread-aware error messages (MessageThreadID on error paths) - Slack/Discord multimodal inlineData support - MemoryCard border polish (final form: no active override) Added decision #22 to .agents/DECISIONS.md pinning the middleware-based design and listing the "do not" rules so this mistake is not repeated.
achetronic
added a commit
that referenced
this pull request
Apr 18, 2026
- adk-utils-go v0.9.1 → v0.13.0 - google.golang.org/adk v0.4.0 → v1.0.0 (pinned, see note below) - a2a-go v0.3.3 → v0.3.10 - modelcontextprotocol/go-sdk v1.2.0 → v1.4.1 adk v1.1.0 extends artifact.Service with GetArtifactVersion, which the adk-utils-go filesystem backend does not implement yet. Sticking to v1.0.0 is the highest version adk-utils-go@v0.13.0 is compatible with. adkrest.NewHandler(launcher.Config, timeout) was removed in v1.0.0; the agent Service now constructs the REST handler through adkrest.NewServer with an explicit adkrest.ServerConfig. Decision #22 added so the choice is not undone accidentally.
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.
Additional finding (out of scope)
${...}-based tokens may still work for bot runtime and test action until process restart.What
allowedChatsentries (chatId+ optionalthreadId).Testbutton in client dialog).${ENV_VAR}expansion support in Telegram test action to match runtime secret/env resolution semantics.allowedChatsrules on save.chatId=0, non-positive threadId or invalid threadId format) with user-facing error handling.Why
${...}) should behave the same in test action and runtime behavior.mastermust continue working safely.Scope
server/store/types.goserver/store/types_test.goserver/clients/telegram/spec.goserver/clients/telegram/bot.goserver/clients/telegram/bot_test.goserver/api/admin/clients.goserver/api/admin/clients_telegram_test.goserver/api/admin/handler.gofrontend/admin-ui/src/lib/api/clients.jsfrontend/admin-ui/src/views/clients/ClientDialog.vuefrontend/admin-ui/src/views/clients/allowedChatsRules.jsfrontend/admin-ui/src/views/clients/allowedChatsRules.test.jsBehavior changes
errors[]details (e.g. bot kicked, chat not found, invalid thread).allowedChatsas the canonical field, with structured rules:{ chatId, threadId? }allowedChatsinteger array frommasteris still supported on load.${ENV_VAR}placeholders consistently with runtime behavior.message_thread_idacross text, tool messages, voice, artifacts, and command responses.Validation
go test ./api/admin ./clients/telegram ./storenode --test src/views/clients/allowedChatsRules.test.jsnpx vite build(admin-ui)Manual test checklist
allowedChatsrows (chatId+ optionalthreadId).allowedChatsinteger-array config (frommaster) is migrated/loaded correctly./start,/help,/agent,/responsemode,/showtools) respond in the same thread/topic.Testbutton works with current form values without saving first.Testbutton with direct token uses that token immediately.Testreturns proper validation error (no hidden fallback).Testbutton works with secret placeholder token format (e.g.${TELEGRAM_BOT_API_RPI_MONITOR}).allowedChatsentries are deduplicated on save.Screenshots
Admin UI — Telegram chat/thread rules editor
Admin UI — Test action result (success/error)
Telegram — thread reply behavior in supergroup topic
Disclosure
Assisted by AI for implementation and review; all changes were manually validated via tests/build and runtime checks.