Repository navigation
Cancel an inline sent-message edit with Escape - #1940
Merged
ymichael merged 2 commits intoAug 21, 2026
Merged
Conversation
Escape in the sent-message inline editor now cancels the edit (same as the frame's X button) instead of only blurring the composer. The composer gains an optional onEscape that replaces the Escape-to-blur default; typeahead dismissal and voice-recording cancel keep their higher priority. The queued-message inline editor is unchanged.
ymichael
force-pushed
the
esc-cancels-inline-message-edit
branch
from
August 21, 2026 20:24
ebb946a to
09bc72d
Compare
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 was wrong
Pressing Escape inside the sent-message inline editor only blurred the composer — the standard Escape-to-release behavior every composer shares. The editor could only be closed with its X button, so an edit opened by mistake could not be dismissed from the keyboard.
What changed
PromptBoxInternalgains an optionalonEscapeprop that replaces the default Escape-to-blur when provided. Higher-priority Escape consumers are unchanged: the typeahead menu still dismisses itself first, and voice recording still cancels from its window capture listener.FollowUpComposerPropscarriesonEscapethrough to the internal box.ThreadDetailPromptAreapasses the sent-message editor's existing cancel action asonEscape, so Escape now cancels the edit exactly like the frame's X button. The queued-message inline editor and the bottom composer are unchanged (noonEscape→ blur as before).No wire changes; no CLI/guide surfaces affected.
How you verified
PromptBoxInternal.test.tsxverify that Escape callsonEscapewithout blurring, omission retains the default blur behavior, and an open typeahead consumes the first Escape before the host callback.FollowUpPromptBox.test.tsxregression test verifies that the composer forwards its host Escape action toPromptBoxInternal.ThreadDetailPromptArea.test.tsxverifies that Escape callsonCancelwhile the bottom composer receives noonEscape.pnpm exec turbo run test --filter=@bb/app --force -- src/components/promptbox/PromptBoxInternal.test.tsx src/components/promptbox/FollowUpPromptBox.test.tsx src/views/thread-detail/ThreadDetailPromptArea.test.tsxpasses all 162 tests across the three focused files, including the existing voice-recording Escape-priority coverage.pnpm exec turbo run typecheck --filter=@bb/app --forcepasses.sawyerhood/dev-browserreproduces the pre-fix behavior onmain(Escape leaves the edit frame open after blurring) and confirms the fixed behavior (Escape closes the edit frame and restores the sent message).🤖 Generated with Claude Code