Add Shift+Space preview and wire ⌘K actions popover#8
Conversation
Shift+Space opens a Quick Look-style preview at ~85% of the panel, showing the screenshot plus filename, captured-at, file size and the OCR snippet. Esc closes the preview first, leaving the panel up; a second Esc dismisses. Plain space still types into the search field so multi-word queries keep working. ⌘K now opens a Raycast-style actions popover anchored to the existing footer hint, listing every RowAction with the currently-wired shortcuts (↵, ⌘P, ⌘⇧C) shown alongside. Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: GitButler <gitbutler@gitbutler.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a0171181d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds two user-facing panel affordances in Vista’s floating panel UI: a Shift+Space “Quick Look”-style large preview overlay for the selected screenshot, and a wired-up ⌘K actions popover anchored to the footer hint, along with an updated Esc dismissal cascade.
Changes:
- Add
PreviewOverlayand keyboard handling so Shift+Space toggles a large preview while plain Space still types into the search field. - Wire the footer “Actions ⌘K” hint to a real popover that lists
RowActionentries and executes them against the selected record. - Update Esc handling to close actions popover → preview overlay → dismiss panel.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address reviewer comments on #8: - PreviewOverlay: guard against stale thumbnail loads racing the selection by checking Task.isCancelled before assigning the image. Task.detached is unstructured so the outer .task(id:) cancellation doesn't propagate; without the check, a slow load for the previous record can land after a faster load for the new one and briefly show the wrong screenshot. - handlePanelKey: pass ⌘K through when no record is selected instead of swallowing it, so the shortcut doesn't become a dead key on empty result lists. - ActionsPopover: shortcut hints now support multiple bindings per row, so when Copy OCR Text is the user's primary action the popover shows both ↵ and ⌘⇧C instead of hiding the still-live ⌘⇧C binding. Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: GitButler <gitbutler@gitbutler.com>
Summary
text:hello world) keep working.RowActionin canonical order with currently-bound shortcuts (↵for the primary,⌘Pfor pin,⌘⇧Cfor copy OCR) shown alongside. Pin label flips between "Pin" and "Unpin" based on the selected record.All changes are in
Sources/Vista/PanelContentView.swift— no model, store, or preferences changes.Test plan
./Scripts/dev-run.shand summon the panel.text:foo bar.