Skip to content

Follow-Up to #45 & #46: Make Paste Bar navigation and handoff reliable - #49

Draft
alvst wants to merge 73 commits into
momenbasel:mainfrom
alvst:codex/preserve-card-strip-viewport
Draft

Follow-Up to #45 & #46: Make Paste Bar navigation and handoff reliable#49
alvst wants to merge 73 commits into
momenbasel:mainfrom
alvst:codex/preserve-card-strip-viewport

Conversation

@alvst

@alvst alvst commented Jul 26, 2026

Copy link
Copy Markdown

Summary

Fixes the rapid global-hotkey workflow: ⌘⇧V, Right Arrow, Return.

  • Opens Pesty as a non-activating key panel, preserving the previous app’s focused control—for example, a selected Safari input—until paste returns to it.
  • Handles the main-thread Carbon hotkey synchronously, so the bar is key and its local key monitor is installed before an immediately following Right Arrow arrives.
  • Presents the Paste Bar at its final position immediately, without a slide-in animation or selection spring.
  • Arrow-key selection no longer re-centers or right-anchors the whole strip when the next card is already visible; it scrolls only when the selected card is off-screen.
  • Captures the actual non-Pesty destination when Return is pressed, orders the bar out synchronously, and sends ⌘V directly to that app’s process after the physical shortcut/Return keys lift. This removes the old global event/focus race and arbitrary handoff delay.
  • Uses cooperative activation only for unusual menu-bar/reopen paths where the destination is not already active.
  • ⌘C now always copies the primary selected Paste Bar item, rather than depending on a per-card SwiftUI key equivalent. A successful copy promotes its canonical clip to history item Add selected clip preview pane #1 with a fresh timestamp.
  • Copy promotion intentionally does not reorder a pinboard or Paste Stack, whose ordering has separate semantics.
  • Avoids an unnecessary full history JSON save when opening the bar does not prune any clips.
  • Guards the deferred auto-hide path so an older resign-key event cannot close a newly re-keyed bar.

Relationship to preview work

#45 restores the detached, shadow-free preview above the selected card. This PR keeps the hotkey-to-selection and paste-handoff paths responsive while that preview remains open.

Dependency

Builds on #45 and #46 while those preview changes remain unmerged.

Validation

  • swift build
  • git diff --check

Screenshot

Debug Demo; Pesty window only.

Card-strip navigation in Debug Demo

alvst added 30 commits July 23, 2026 19:33
…ttings-polish

# Conflicts:
#	Sources/Pesty/Settings/Settings.swift
…tings-polish

# Conflicts:
#	Sources/Pesty/Settings/Settings.swift
…-settings-polish

# Conflicts:
#	Sources/Pesty/AppController.swift
#	Sources/Pesty/Settings/Settings.swift
#	Sources/Pesty/Settings/SettingsView.swift
…s-polish

# Conflicts:
#	Sources/Pesty/UI/BarWindowController.swift
…ettings-polish

# Conflicts:
#	Sources/Pesty/Settings/Settings.swift
#	Sources/Pesty/Settings/SettingsView.swift
…tings-polish

# Conflicts:
#	Sources/Pesty/Settings/SettingsView.swift
alvst added 18 commits July 24, 2026 14:47
…view

# Conflicts:
#	Sources/Pesty/Settings/Settings.swift
#	Sources/Pesty/Settings/SettingsView.swift
…all-prs-preview

# Conflicts:
#	Sources/Pesty/AppController.swift
#	Sources/Pesty/Monitor/PasteService.swift
#	Sources/Pesty/Settings/Settings.swift
#	Sources/Pesty/Settings/SettingsView.swift
#	Sources/Pesty/Store/ClipboardStore.swift
#	Sources/Pesty/UI/BarView.swift
…eview

# Conflicts:
#	Sources/Pesty/UI/BarView.swift
…-preview

# Conflicts:
#	Sources/Pesty/UI/BarView.swift
…-preview

# Conflicts:
#	Sources/Pesty/AppController.swift
#	Sources/Pesty/Store/ClipboardStore.swift
#	Sources/Pesty/UI/BarView.swift
# Conflicts:
#	Sources/Pesty/AppController.swift
#	Sources/Pesty/Monitor/PasteService.swift
#	Sources/Pesty/Store/ClipboardStore.swift
#	Sources/Pesty/UI/ClipCardView.swift
@alvst alvst changed the title Keep visible cards stable during navigation Follow-Up to #45 & #46: Keep visible cards stable during navigation Jul 26, 2026
@alvst alvst changed the title Follow-Up to #45 & #46: Keep visible cards stable during navigation Follow-Up to #45 & #46: Make Paste Bar navigation and handoff reliable Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant