fix: disable Telegram link-preview in tracker notifications (ORCH-080)

Add "disable_web_page_preview": True to the JSON payload of both
low-level Telegram primitives — send_telegram (POST /sendMessage) and
edit_telegram (POST /editMessageText). Telegram no longer expands the
Plane "Modern project management" link-preview banner under every
tracker card (bump/edit) and notify/alert message, which the default
bump mode (ORCH-067) was duplicating on each transition.

Single-point fix at the primitive level — all consumers
(update_task_tracker, notify_approve_requested, notify_error, stage
alerts from launcher/stage_engine) inherit it without code changes.
parse_mode: HTML is preserved so the ORCH-NNN issue link stays
clickable; disable_notification, bump/edit logic, the one-card-per-task
invariant, return contracts and never-raise are untouched. Unconditional,
no kill-switch (ADR-001).

Tests: tests/test_link_preview_disabled.py (TC-01..06). Docs: CHANGELOG,
CLAUDE.md, docs/architecture/README.md (Notifications component).

Refs: ORCH-080
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 01:24:04 +03:00
committed by stream
parent a482b36dae
commit d826eacfcf
5 changed files with 170 additions and 1 deletions

View File

@@ -57,6 +57,9 @@ def send_telegram(text: str, disable_notification: bool = False):
"text": text,
"parse_mode": "HTML",
"disable_notification": disable_notification,
# ORCH-080: suppress the Plane link-preview banner that Telegram
# would otherwise expand under every tracker card / notification.
"disable_web_page_preview": True,
},
timeout=5,
)
@@ -170,6 +173,8 @@ def edit_telegram(message_id: int, text: str) -> str:
"message_id": message_id,
"text": text,
"parse_mode": "HTML",
# ORCH-080: suppress the Plane link-preview banner (see send_telegram).
"disable_web_page_preview": True,
},
timeout=5,
)