Skip to content

Telegram voice commands skip their own Scratch Pad entry - #240

Merged
HarunRRayhan merged 1 commit into
mainfrom
fix/telegram-voice-delete-last
Oct 21, 2026
Merged

HarunRRayhan merged 1 commit into
mainfrom
fix/telegram-voice-delete-last

Conversation

@HarunRRayhan

Copy link
Copy Markdown
Owner

What

  1. Voice delete/edit last note. delete_scratchpad and update_scratchpad picked the newest entry, which during a voice turn is the voice note itself. ExecuteTelegramWorkspaceActionAction::handle() now takes the in-flight transcription id and the latest-note lookup leaves that entry out. The voice entry is then dropped, like other answered non-capture turns. The same applies to update_idea, delete_idea, and a confirming "yes" (all commands, not notes). Typed text is unchanged (new test pins it).
  2. /notes menu description now reads "Count and list your active Scratch Pad notes". A data migration re-syncs the menu for already-connected bots (same pattern as earlier command-list changes).
  3. Clear-notes during a voice turn leaves the in-flight voice entry out of the batch, so it agrees with /notes, then drops the voice entry.

One shared helper: ScratchpadEntry::scopeExceptVoiceTranscription(), used by /notes, clear-notes, and the latest-note lookup.

Tests

New: voice delete-last targets the previous note and drops the voice entry; voice update-last same; voice clear-notes excludes then drops; typed delete-last still targets the newest entry. Pint and PHPStan clean. Locally the touched suites show the same 11 machine-setup failures as main, plus the 4 new tests passing.

Generated with Claude Code

A voice "delete/change my last note" targeted the voice entry itself,
since it is the newest entry. The latest-note lookup, the clear-notes
batch, and the /notes list now share one ScratchpadEntry scope that
leaves out the in-flight voice entry. Edit, delete, and idea commands,
clear-notes, and a confirming "yes" now also drop the voice entry, like
other answered non-capture turns. Typed text is unchanged.

The /notes menu description now reads "Count and list your active
Scratch Pad notes", re-synced to connected bots by a data migration.
@HarunRRayhan
HarunRRayhan merged commit 52a8df0 into main Oct 21, 2026
4 checks passed
@HarunRRayhan
HarunRRayhan deleted the fix/telegram-voice-delete-last branch October 21, 2026 04:19
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