Skip to content

Telegram: drop the voice Scratch Pad entry when the bot answered it - #238

Merged
HarunRRayhan merged 2 commits into
mainfrom
fix/telegram-voice-skip-scratchpad
Oct 21, 2026
Merged

HarunRRayhan merged 2 commits into
mainfrom
fix/telegram-voice-skip-scratchpad

Conversation

@HarunRRayhan

Copy link
Copy Markdown
Owner

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.
  • ChatVoiceNoteJob then deletes the entry through DeleteScratchpadEntryAction (transcriptions, attachments, orphaned media asset, stored audio file). It only deletes an entry still in new status.
  • Kept: save/update/delete note and idea actions, 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

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
HarunRRayhan merged commit 5a10edd into main Oct 21, 2026
4 checks passed
@HarunRRayhan
HarunRRayhan deleted the fix/telegram-voice-skip-scratchpad branch October 21, 2026 02:42
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant