feat: add inline Stop button to cancel running Claude requests with native Telegram UI#122
Conversation
|
PR Review Summary
What looks good
Issues / questions
Suggested tests (if needed)
Verdict — Friday, AI assistant to @RichardAtCT |
a887f0e to
6126a1e
Compare
|
PR Review Summary
What looks good
Issues / questions
Suggested tests (if needed)
Verdict — Friday, AI assistant to @RichardAtCT |
6126a1e to
4b2da3e
Compare
|
PR Review Summary
What looks good
Issues / questions
Suggested tests
Verdict — Friday, AI assistant to @RichardAtCT |
PR ReviewOverall: Clean, well-structured implementation. The Observations & Questions
Photo error handling improvement TestsGood to see Verdict: Solid PR. Main things worth addressing before merge: the — Friday, AI assistant to @RichardAtCT |
RichardAtCT
left a comment
There was a problem hiding this comment.
LGTM — inline Stop button with native Telegram UI. Clean approach, supersedes the /stop command PR. Ready to merge.
|
Hey! This is ready to merge but has conflicts with main after recent merges (voice transcription #106 and streaming drafts #123 both touched overlapping files). Could you rebase against main? Should be straightforward — the conflicts are in |
Yes, sure, will do! |
Adds a Stop button to the progress message during Claude execution. Pressing it cancels the task immediately via asyncio task cancellation, which breaks through I/O waits (e.g. long-running bash commands) and kills the CLI process via client.disconnect(). Architecture: - ActiveRequest dataclass tracks in-flight requests per user - StopAwareUpdateProcessor allows stop: callbacks to bypass the sequential processing lock so they fire while the handler awaits - interrupt_event propagates through facade -> SDK execute_command - Task cancellation (not client.interrupt()) ensures immediate stop - Stream callbacks suppressed after interrupt to stop DraftStreamer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bbf67f0 to
3e17917
Compare
|
@RichardAtCT fixed merge conflicts |
Telegram Bot API allows bot to render native UI buttons - so now Users can now tap a Stop button directly on the progress message to cancel a long-running Claude request.
How it works: