Polish Telegram connect flow messaging and restore /start#399
Conversation
…mmand Restores /start (welcome/status message for already-connected users) after an earlier removal, updates its wording to match the new "connect" (not "verify") terminology, mentions YouTube-link moments in the fallback and success messages, and consolidates all Telegram bot message strings into consts.ts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughTelegram user-facing message strings are consolidated into shared constants and a ChangesTelegram Message Constants and Usage
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant verifyTelegramCode
participant Privy
participant consts
User->>verifyTelegramCode: submit code
verifyTelegramCode->>Privy: authenticatePrivyPasswordless
Privy-->>verifyTelegramCode: auth result
verifyTelegramCode->>consts: telegramConnectedMessage(pending.username)
consts-->>verifyTelegramCode: connectedMessage
verifyTelegramCode->>User: thread.post(connectedMessage)
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/lib/telegram/chat/__tests__/verifyTelegramCode.test.tsOops! Something went wrong! :( ESLint: 9.39.4 TypeError: Converting circular structure to JSON ... [truncated 446 characters] ... c/dist/eslintrc.cjs:3261:25) src/lib/telegram/chat/commands/handleStart.tsOops! Something went wrong! :( ESLint: 9.39.4 TypeError: Converting circular structure to JSON ... [truncated 446 characters] ... c/dist/eslintrc.cjs:3261:25) src/lib/telegram/chat/connectTelegramToAccount.tsOops! Something went wrong! :( ESLint: 9.39.4 TypeError: Converting circular structure to JSON ... [truncated 446 characters] ... c/dist/eslintrc.cjs:3261:25)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/telegram/chat/commands/handleStart.ts (1)
9-9: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the
/startreply aligned with the shared connected-message copy.This still says users can send “photos and captions,” while the centralized connected message now says photos, videos, or YouTube links. That leaves
/startout of sync with the rest of the flow.♻️ Suggested fix
- const text = `Hello ${artistUsername || telegramUsername}, Your telegram has been connected! You can now send photos and captions to post them on In Process.`; + const text = `Hello ${artistUsername || telegramUsername}, Your Telegram is now connected. You can now send photos, videos, or YouTube links to create moments on In Process.`;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/telegram/chat/commands/handleStart.ts` at line 9, The /start reply in handleStart is still using the old connected-message text and is out of sync with the shared copy. Update the message built in handleStart to match the centralized connected-message wording used elsewhere, including photos, videos, or YouTube links, and keep the greeting structure with artistUsername/telegramUsername unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/lib/telegram/chat/commands/handleStart.ts`:
- Line 9: The /start reply in handleStart is still using the old
connected-message text and is out of sync with the shared copy. Update the
message built in handleStart to match the centralized connected-message wording
used elsewhere, including photos, videos, or YouTube links, and keep the
greeting structure with artistUsername/telegramUsername unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1912399f-0b3b-403a-a80b-9b65a1016a52
📒 Files selected for processing (8)
src/lib/telegram/chat/__tests__/verifyTelegramCode.test.tssrc/lib/telegram/chat/commands/handleStart.tssrc/lib/telegram/chat/connectTelegramToAccount.tssrc/lib/telegram/chat/consts.tssrc/lib/telegram/chat/handlers/__tests__/onNewMention.test.tssrc/lib/telegram/chat/handlers/onNewMention.tssrc/lib/telegram/chat/promptTelegramEmail.tssrc/lib/telegram/chat/verifyTelegramCode.ts
Summary
/start(shows a welcome/status message for already-connected users) after an earlier removal, and updates its wording from "verified" to "connected" to match the new flow's terminology.consts per file) intoconsts.ts.Test plan
pnpm vitest run— 1472/1472 passingpnpm exec tsc --noEmit— no new type errors introduced🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes