Repository navigation
Telegram voice commands skip their own Scratch Pad entry - #240
Merged
Merged
Conversation
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.
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.
What
delete_scratchpadandupdate_scratchpadpicked 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 toupdate_idea,delete_idea, and a confirming "yes" (all commands, not notes). Typed text is unchanged (new test pins it)./notesmenu 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)./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