Dismiss the formatting menu when the text selection moves - #256
Merged
Conversation
Co-Authored-By: Warp Factory Agent <oz-agent@warp.dev>
Co-Authored-By: Warp Factory Agent <oz-agent@warp.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
bholmesdev
marked this pull request as ready for review
August 11, 2026 11:54
Contributor
Author
There was a problem hiding this comment.
Overview
Fixes #255 stuck format menu: outside pointerdown hides menu + clearFrozenSelection (no restore), Escape stays global via capture and still restoreSelection + focus. FakeSelectionExtension gets a clear-without-restore command. Approach matches acceptance criteria.
Concerns
- No automated coverage for the two dismiss paths. This bug is pure interaction state;
SelectionFormattingToolbar.test.tsxalready shows the happy-dom pattern for Escape/selection dismiss. Without tests this can regress silently. - Manual/Electron verification was blocked in CI; unit tests are the practical safety net here.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Reviewed by a Warp Factory agent.
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.
Description
Dismiss the formatting menu when clicking elsewhere in a note. Outside clicks clear the frozen highlight without restoring the old selection, allowing the caret to move to the clicked location. Escape remains available globally while the menu is open and restores focus to the editor.
Closes #255
Type of Change
Testing
Manual Testing Details:
pnpm build:desktoppnpm --filter @hubble.md/editor build && pnpm --filter @hubble.md/ui buildpnpm exec biome check packages/editor/src/FakeSelectionExtension.ts packages/ui/src/editor/FormatCommandMenu.tsx CHANGELOG.mdgit diff --check@hubble.md/convex-clientand@hubble.md/syncbuild output.HUBBLE_DESKTOP_ENABLE_CDP=1 pnpm dev:desktop, but Electron could not launch because the CI SUID sandbox helper is not configured.Checklist
Implemented by a Warp Factory agent.