Repository navigation
feat(desktop-gpui): reliable shortcuts with after-capture choices - #2559
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
This was referenced Oct 22, 2026
Closed
This branch was successfully deployed
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.
Global shortcuts in the GPUI app had two bugs. A screenshot shortcut pressed from another app opened the editor behind that app, and the Start Studio/Instant shortcuts failed with
target_display_crop: Display not found. This PR fixes both and rebuilds the Shortcuts page, so each shortcut says what it will do and you choose what happens after a capture.Bugs
open_screenshot_editornever activated Cap. The window opened, but stayed hidden until you clicked into Cap.bring_screenshot_editor_forward(apps/desktop-gpui/src/app_windows.rs:6647) activates the app and the window on both the new-window and refocus paths.recording_settings.targetfrom the shared store, which this app never wrote, so it still held whatever the Tauri app recorded last. On the reporting machine that was a window that no longer existed. Starts now pick a target that exists, and every recording start saves its target (apps/desktop-gpui/src/main_window.rs:2138).flowchart LR A[Start shortcut] --> B{Main window selection exists?} B -- yes --> R[Record it] B -- no --> C{Last recorded target exists?<br/>camera-only skipped} C -- yes --> R C -- no --> D[Display under the pointer] --> Rpick_hotkey_target(apps/desktop-gpui/src/hotkeys.rs:887) is pure, with liveness and the fallback injected, so the stale-window case is covered by a test.target_is_live(hotkeys.rs:903) treats a window as recordable only when it still has a display, which is the lookup that failed. Both run on the background executor because they enumerate windows.After a capture
New
postScreenshotBehavioursetting (apps/desktop-gpui/src/store.rs:670), and adoNothingvalue forpostStudioRecordingBehaviour:disableAutoOpenLinks)screenshot_finished(app_windows.rs:6490) copies the PNG to the clipboard and/or opens the editor. For copy or do nothing, the main window comes back only if it was on screen before the picker hid it, so a shortcut pressed from another app leaves that app in front.Shortcuts page
NONEpills, no description of what each does, and the post-capture settings elsewhere or missingshortcut_effect,apps/desktop-gpui/src/settings_pages.rs:1080). After a save, the row confirms with "Saved. Press ⌘⇧4 in any app to ...".render_outcome_panel,settings_pages.rs:1579).description_follows_outcome,settings_pages.rs:1118), so picking an option never moves the panel.hotkeys::pause/resume,hotkeys.rs:202), so an existing binding is captured instead of firing. Every exit path resumes them: Escape, a click elsewhere, a page change, the window losing focus or closing.hotkeys::unavailable_actions,hotkeys.rs:229).Settings controls
apps/desktop-gpui/src/ui/toggle.rs:84).postScreenshotBehaviourandpostStudioRecordingBehaviour: "doNothing"are written only by this app. The Tauri app no longer ships.
Confidence Score: 5/5
The latest changes appear safe to merge.Summary
This PR fixes screenshot editor focus and stale recording targets. It also rebuilds the Shortcuts page and adds after-capture choices.
Reviews (3) · Last reviewed commit: "fix(desktop-gpui): clear the blocked sho..." · Reviewed by Greptile