Repository navigation
Telegram: drop the voice Scratch Pad entry when the bot answered it - #238
Merged
Merged
Conversation
A voice note answered as a question or command (lookup intent, idea list, or chat reply) no longer stays in the Scratch Pad with its audio, matching typed text, which is never captured on those paths. Captures, chat failures, and failed transcriptions keep the entry.
HarunRRayhan
added a commit
that referenced
this pull request
Oct 21, 2026
* Telegram notes reply counts only active Scratch Pad notes The /notes reply and notes intent counted and listed every status, so triaged and dropped entries inflated the total. Both the count and the latest-10 list now use only status new, the status breakdown is gone, and the empty state says there are no active notes. The PR #238 exclusion of the in-flight voice entry stays. * Telegram notes list drops the per-line status, every entry is new now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A voice note like "how many notes are in my scratch pad?" got the right answer, but the note and its audio also stayed in the Scratch Pad. Typed text on the same chat paths is never captured.
Fix
HandleTelegramUpdateAction::handleVoiceTranscript()now returns true when the transcript was answered as a question or command: a lookup intent (notes, videos, posts, me),list_ideas, or a plain chat reply that was actually queued.ChatVoiceNoteJobthen deletes the entry throughDeleteScratchpadEntryAction(transcriptions, attachments, orphaned media asset, stored audio file). It only deletes an entry still innewstatus.clear_notes, the chat-failure fallback ("saved this as a note instead"), and any failed transcription (the chat job never runs).Typed text behavior is unchanged.
Tests
GistVoiceNoteActionTest: answered question removes entry, media asset and file; capture request keeps entry and audio; chat failure keeps it; failed transcription keeps it; duplicate chat job on a kept capture is a no-op. Pint and PHPStan pass.Generated with Claude Code