Skip to content

Show the Paste Bar on launch and reopen - #38

Closed
alvst wants to merge 2 commits into
momenbasel:mainfrom
alvst:codex/reactivate-slide-up-bar
Closed

Show the Paste Bar on launch and reopen#38
alvst wants to merge 2 commits into
momenbasel:mainfrom
alvst:codex/reactivate-slide-up-bar

Conversation

@alvst

@alvst alvst commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Show the Paste Bar after every normal launch, including the first launch after quitting Pesty.
  • Show the Paste Bar when Pesty is reopened from Finder, Spotlight, or the Dock while it is hidden.
  • Treat only the visible Paste Bar as already presented; Settings and preview windows no longer block reopening it.

Why

Pesty's primary interface should be discoverable without requiring the keyboard shortcut.

Validation

  • swift build
  • Manual macOS verification: hide the Paste Bar, reopen Pesty.app, and confirm the bar returns.

@alvst alvst changed the title Show the bar when Pesty is reopened Show the Paste Bar on launch and reopen Jul 25, 2026
@alvst
alvst marked this pull request as ready for review July 26, 2026 22:05
@momenbasel

Copy link
Copy Markdown
Owner

The reopen handler is a real gap and I want it. The rest of this I cannot take.

It deletes first-run onboarding. The if !Settings.shared.onboarded block now only sets the flag - the showSettings() call is gone. That Settings window is the only place Accessibility permission is ever surfaced, and without the grant PasteService returns early, so direct paste silently does nothing on a fresh direct-download install. The user copies, presses Return, and nothing happens with no prompt and no explanation anywhere.

The bar force-presents 0.5s after every launch, not just the first. Combined with Launch at login, a full-width panel slides up and calls NSApp.activate(ignoringOtherApps: true) at every single login, stealing focus from whatever the login sequence is restoring.

Both new paths also gate on panel.isVisible, which was exactly the wrong signal - see #64, which shipped this week. Presentation state is now explicit (barController.isPresented), so a rebase should use that instead.

Please split it: applicationShouldHandleReopen on its own is a clean, mergeable PR. Note I have since added a reopen handler for a different reason (restoring a hidden menu bar icon), so a rebase will want to fold into that rather than add a second one.

momenbasel added a commit that referenced this pull request Aug 12, 2026
A normal reopen from Finder, Spotlight, or the Dock now surfaces the
primary interface instead of Settings. The hidden-menu-bar escape hatch
keeps its old behavior: restore the icon and show Settings, since that
reopen is a recovery path rather than a request for the bar.

Presentation is gated on the explicit BarWindowController.isPresented
state rather than NSWindow.isVisible, per the #64 machinery, and
duplicate reopen events coalesce because the phase flips as soon as the
first show begins.

Reopen half of #38; the launch-time auto-show was dropped per review.

Co-authored-by: momenbasel <momenbasel@users.noreply.github.com>
Co-authored-by: Alvie Stoddard <alviestoddard@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@momenbasel

Copy link
Copy Markdown
Owner

Maintainer pass — reopen behavior landed, closing this PR.

Action taken: the reopen half — the part the Aug 11 review wanted — landed on main via #68 with Co-authored-by credit, folded into the existing reopen handler rather than added as a second one. A normal reopen from Finder/Spotlight/Dock now shows the Paste Bar, gated on barController.isPresented (the #64 state machine) instead of NSWindow.isVisible; the hidden-menu-bar escape hatch keeps restoring the icon and showing Settings. Duplicate reopen events coalesce naturally because the presentation phase flips as soon as the first show begins, so the pending-flag dance wasn't needed. Stale paste targets on this path are covered by pasteTarget (#66).

Not taken, per the review: the 0.5 s auto-show after every launch (with Launch at login it steals focus at every login) and the removal of first-run onboarding (Settings is the only surface that ever requests Accessibility; dropping it makes direct paste silently dead on fresh installs). If launch-time discoverability still feels lacking, a first-launch-only bar presentation after onboarding could be discussed in an issue.

Closing since the mergeable portion is on main. Thanks @alvst — the reopen gap was real.

— automated maintainer pass on behalf of @momenbasel

@momenbasel momenbasel closed this Aug 12, 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.

2 participants