Skip to content

feat(telegram): explicit /support mode instead of capturing every message - #820

Merged
fclairamb merged 5 commits into
mainfrom
claude/project-thread-pr5l7d
Nov 9, 2026
Merged

fclairamb merged 5 commits into
mainfrom
claude/project-thread-pr5l7d

Conversation

@fclairamb

Copy link
Copy Markdown
Owner

Requested by Florent · project thread

What & why

Any prose or unknown command sent to the Telegram bot opened a support thread, so ids pasted for other bots (/getid, @getidsbot) landed in the support inbox. Talking to a person is now an explicit choice:

  • /support [message] opens a thread (with the message, or a placeholder body that says why the thread exists) and confirms it in the chat, saying how to leave. It works in unlinked chats too.
  • Support mode is a live thread. No new state: while the chat has a non-closed thread, plain text goes to it silently, as before, so the person can answer operator replies.
  • /done closes the thread (unread count kept for the operator). Closing it from the inbox also ends the mode.
  • Outside support mode, prose gets a short pointer to /support and /help and is not recorded. If the live-thread lookup fails, the handler captures anyway (fail open) so no message in a live conversation is lost.
  • Unknown commands are answered ("I don't know that command" + help, which now lists /support) and never recorded.
  • /support is added to the setMyCommands menu.
  • telegram.Command now ends the verb at any whitespace, so /support followed by a line break and a multi-line message parses correctly.

support.Service gains LiveThread and CloseLiveThread. Docs: configuration/telegram.md (new "Support mode" section) and the Telegram row of features/support-inbox.md.

Out of scope: an idle auto-close (a thread never closed keeps the chat in support mode), and the other channels (WhatsApp, Slack and Discord DMs still capture everything).

How to test

go test ./internal/handlers/telegramcb/ ./internal/integrations/telegram/ ./internal/support/. The TestSupportMode_* tests cover prose outside/inside the mode (with a positive control), /support with and without a message, repeated /support, /done, operator close, bot-authored messages, unknown commands, and an instance without an inbox.

Checklist

  • Lint (golangci-lint 2.15.0) and tests pass on the touched packages
  • Tests added or updated for the change
  • Docs updated (web/docs/)
  • Schema changes: none

Generated by Claude Code

…sage

Any prose or unknown command sent to the Telegram bot used to open a
support thread, so ids pasted for other bots (/getid, @getidsbot) landed
in the inbox. Talking to a person is now an explicit choice:

- /support [message] opens a thread and confirms it in the chat.
- While the chat has a live thread, plain text goes to it, as before.
- /done closes it; closing it from the inbox ends the mode too.
- Outside support mode, prose gets a pointer to /support and /help and
  is not recorded. Unknown commands are answered and never recorded.

Command parsing now ends the verb at any whitespace, so "/support"
followed by a line break and a multi-line message works.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XE5Bqq6R9cBxgJ1SqMkecK
@fclairamb fclairamb self-assigned this Nov 9, 2026
@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.70330% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.27%. Comparing base (27efc51) to head (daefd7a).

Files with missing lines Patch % Lines
server/internal/handlers/telegramcb/handler.go 96.61% 2 Missing ⚠️
server/internal/support/service.go 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #820      +/-   ##
==========================================
+ Coverage   89.24%   89.27%   +0.03%     
==========================================
  Files        1333     1333              
  Lines      136202   136283      +81     
==========================================
+ Hits       121551   121666     +115     
+ Misses      14642    14608      -34     
  Partials        9        9              
Files with missing lines Coverage Δ
server/internal/integrations/telegram/client.go 90.64% <ø> (ø)
...ver/internal/integrations/telegram/incidentview.go 90.82% <100.00%> (+0.04%) ⬆️
server/internal/integrations/telegram/message.go 100.00% <100.00%> (ø)
server/internal/integrations/telegram/webhook.go 95.23% <100.00%> (+0.15%) ⬆️
server/internal/support/service.go 83.13% <92.85%> (+0.47%) ⬆️
server/internal/handlers/telegramcb/handler.go 81.03% <96.61%> (+6.85%) ⬆️

... and 16 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Storage failures on /support, /done and prose; a bot sending /support;
/done without an inbox; a photo in support mode; a sender without a
username; and LiveThread/CloseLiveThread in the support service.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XE5Bqq6R9cBxgJ1SqMkecK
@fclairamb
fclairamb marked this pull request as ready for review November 9, 2026 21:20
@fclairamb
fclairamb enabled auto-merge (squash) November 9, 2026 21:20
@fclairamb
fclairamb merged commit 571607e into main Nov 9, 2026
38 checks passed
@fclairamb
fclairamb deleted the claude/project-thread-pr5l7d branch November 9, 2026 22:19
@fclairamb fclairamb mentioned this pull request Nov 9, 2026
fclairamb added a commit that referenced this pull request Nov 9, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.45.0](v0.44.3...v0.45.0)
(2026-11-09)


### Features

* dashboard glance strips, failed sign-in account names, log noise fixes
([#824](#824))
([659c52c](659c52c))
* **dashboard:** 24h / 7d / 30d availability window, saved per user
([#821](#821))
([283a28e](283a28e))
* **mcp:** sharpen tool descriptions for Glama scoring
([#825](#825))
([ca305f1](ca305f1))
* **server:** run as a native Linux systemd service
([#819](#819))
([8a0cb2f](8a0cb2f))
* **server:** run as a native macOS launchd service
([#811](#811))
([c6612ea](c6612ea))
* **server:** run as a native Windows service, no NSSM
([#802](#802))
([c66c947](c66c947))
* **telegram:** explicit /support mode instead of capturing every
message ([#820](#820))
([571607e](571607e))


### Bug Fixes

* **auth:** admit by email address only when the email is verified
([#818](#818))
([91992fe](91992fe))
* batch of production-log and Slack issues
([#808](#808))
([580d09c](580d09c))
* **deps:** update github.com/dop251/goja digest to d6eaa50
([#800](#800))
([60b7443](60b7443))
* **deps:** update github.com/dop251/goja digest to d8dfb4d
([#810](#810))
([e11b926](e11b926))
* **deps:** update go dependencies (non-major)
([#806](#806))
([1c59927](1c59927))
* **deps:** update go dependencies (non-major)
([#822](#822))
([ec0aebf](ec0aebf))
* **deps:** update module github.com/aws/aws-sdk-go-v2/credentials to
v1.20.17 ([#823](#823))
([27efc51](27efc51))
* **deps:** update module github.com/crewjam/saml to v0.6.3
([#807](#807))
([0f06336](0f06336))
* **deps:** update module github.com/wneessen/go-mail to v0.8.2
([#812](#812))
([3670206](3670206))
* **oncall:** record on-call override changes in the audit log
([#816](#816))
([4561f41](4561f41))
* serve robots.txt, indexable on solidping.io only
([#809](#809))
([3512833](3512833))
* **server:** refuse a pre-existing Windows service data folder others
control ([#817](#817))
([b1832b5](b1832b5))
* **vendorstatus:** drop datadog and atlassian from the catalog
([#814](#814))
([d3397c5](d3397c5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants