Scope the bar key monitor to its panel; resolve paste target robustly - #66
Merged
Conversation
…et robustly Two infrastructure fixes extracted from #42: - The local key monitor now ignores events destined for any window other than the bar panel, so typing into the Rename / Create Pinboard alerts (and any future editor or Settings surface shown while the bar is up) reaches that window instead of being swallowed into search. - Pasting resolves its target through lastActiveApp -> previousApp -> frontmost, skipping Pesty itself and terminated apps. previousApp is only captured inside showBar(), so the menu-bar and reopen paths used to paste into a stale target. showBar() also keeps lastActiveApp in sync when it captures the frontmost app. Co-authored-by: Alvie Stoddard <alviestoddard@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Aug 12, 2026
momenbasel
added a commit
that referenced
this pull request
Aug 12, 2026
The context menu now offers Paste to <target app>, Paste as Plain Text, Copy, Edit, Writing Tools, Rename, a Pin submenu with colored pinboard dots, Preview, Share, and Delete. Editing opens a native rich-text editor panel with formatting controls, live stats, undo, find, and Writing Tools; colors get a color-well editor. Edits can no longer make CloudKit delete the clip that was just edited: updateContent bumps createdAt and removes same-content duplicates in the same container as an explicit, deliberate delete, so the edited record is always the newest copy of its content key and remote dedupe can never drop it into a reconciliation delete. Edits update the existing record in place - no delete and recreate, no dropped fields - and pinboard copies with their own UUIDs are left untouched while legacy shared-id copies stay consistent. A minimal main menu is installed at launch so the editor's Cmd-Z/X/C/ V/A/F shortcuts, Cmd-Q, and Cmd-W actually work; the app stays an accessory so no menu bar appears. Save in the editor is bound to Cmd-Return since Return types a newline, Rename pre-fills the custom title rather than baking in the auto-generated one, the preview window clears its tracked item via a window delegate when closed, and editing no longer silently overwrites the live system clipboard. Supersedes #42. Builds on the key-monitor scoping and pasteTarget infrastructure from #66. Co-authored-by: momenbasel <momenbasel@users.noreply.github.com> Co-authored-by: Alvie Stoddard <alviestoddard@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Extracts the two infrastructure fixes from #42 that the Aug 11 review asked to split out and land on their own:
handleKeynow guards onevent.window === barController?.window, so keys aimed at the Rename / Create Pinboard alerts (or any other window shown while the bar is up) stay with their own responder chain instead of being eaten by the search handler.pasteTargetresolveslastActiveApp → previousApp → frontmost, skipping Pesty itself and terminated apps, andshowBar()keepslastActiveAppin sync. This fixes stale paste targets on the menu-bar and reopen paths.pasteMenuTitleand the rest of the context-menu/editor work stay with #42.Credit to @alvst — extracted from #42.
— automated maintainer pass on behalf of @momenbasel
Made with Cursor