From 5be15be139fd221f46abb22b6610e39fa4007cd4 Mon Sep 17 00:00:00 2001 From: gabi-simons Date: Thu, 30 Apr 2026 12:07:53 +0000 Subject: [PATCH] fix: prevent telegram pairing spinner from flooding the terminal The spinner label exceeded terminal width, breaking clack's cursor-up redraw and causing each animation tick to print a new line instead of updating in-place. Wrap with fitToWidth() like other setup spinners. Co-Authored-By: Claude Opus 4.6 (1M context) --- setup/channels/telegram.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/channels/telegram.ts b/setup/channels/telegram.ts index 5681fd110..1aa7cb541 100644 --- a/setup/channels/telegram.ts +++ b/setup/channels/telegram.ts @@ -33,7 +33,7 @@ import { spawnStep, writeStepEntry, } from '../lib/runner.js'; -import { accentGreen, brandBold, note } from '../lib/theme.js'; +import { accentGreen, brandBold, fitToWidth, note } from '../lib/theme.js'; const DEFAULT_AGENT_NAME = 'Nano'; @@ -254,11 +254,11 @@ async function runPairTelegram(): Promise< stopSpinner("Old code expired. Here's a fresh one."); } note(formatCodeCard(block.fields.CODE ?? '????'), 'Secret code'); - s.start('Waiting for you to send the code from Telegram…'); + s.start(fitToWidth('Waiting for you to send the code from Telegram…', '')); spinnerActive = true; } else if (block.type === 'PAIR_TELEGRAM_ATTEMPT') { stopSpinner(`Got "${block.fields.CANDIDATE ?? '?'}", not a match.`); - s.start('Waiting for the correct code…'); + s.start(fitToWidth('Waiting for the correct code…', '')); spinnerActive = true; } else if (block.type === 'PAIR_TELEGRAM') { if (block.fields.STATUS === 'success') {