Skip to content

🧪 Test Finder PDF double-click open-event delivery - #68

Merged
JFWooten4 merged 4 commits into
mainfrom
twilight-finder0119
Oct 27, 2026
Merged

JFWooten4 merged 4 commits into
mainfrom
twilight-finder0119

Conversation

@JFWooten4

Copy link
Copy Markdown
Member

Summary

Implement checklist opener-0119 (§2.4, Test double-clicking PDFs in Finder) with a focused, non-destructive macOS integration test and a separate manual Finder walkthrough.

  • Build a temporary, ad-hoc signed PDF-capable macOS app from the existing native opener, substituting only its scanner process path with a harmless local receipt writer. Neither the installed opener nor user scanner settings are modified.
  • Open a Unicode-and-spaces PDF with /usr/bin/open -a <temporary-app> <PDF>, which routes through macOS Launch Services and its open-documents Apple event. This tests actual native application dispatch rather than calling NSApplicationDelegate.application(_:open:) directly.
  • Assert that the event reaches the scan-gate subprocess, preserves the requested file path, and leaves the registered default PDF handler unchanged. The synthetic app declares itself an alternative PDF handler and is never installed as the default.
  • Document a genuinely interactive Finder double-click checklist, including scan-window display, clean/blocked/cancel behavior, duplicate suppression, verification of the user's default web browser, and restoration of PDF association if the user intentionally changed it. The automated test does not pretend to click the Finder UI or require Accessibility permission.
  • Run the integration on the macOS CI job; preserve all existing scanner-safety, application-selection, and other tests. No secret-bearing files are accessed.

Dependencies and scope

The existing native opener in brave-pdf-opener.swift already handles application(_:open:), duplicate suppression, and native scan progress. The existing native test calls that delegate directly; this PR adds real Launch Services event-delivery coverage. It does not overlap parallel default-PDF-handler action and verification PRs #62, #63, or #65 and does not mutate system-wide defaults.

Validation

The commit tree differs from its parent and changes only one test script, the CI workflow, the README pointer, and the manual checklist. Require successful scanner-tests and macos-build on the final integrated head before squash-merging.

A clean local checkout was attempted, but GitHub DNS resolution is unavailable in the container. The work was therefore implemented in an isolated branch through the connected GitHub account (JFWooten4); GitHub Actions supplies macOS runtime verification.

JFWooten4 and others added 4 commits October 27, 2026 18:38
Compile and launch a disposable, explicitly targeted PDF opener using macOS Launch Services, verify the native scan-gate receipt and original Unicode path, and assert the system PDF association remains unchanged. Document the separate literal Finder double-click procedure.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Retain newly merged PDF-handler registration, detection, and cold-browser tests while adding the Finder-style Launch Services event integration check.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Launch Services can decompose macOS file URL paths. Assert the delivered PDF has the same filesystem identity and Unicode-equivalent filename as the original request.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Include concurrently merged PDF-handler history and CI tests while keeping the Finder-style Launch Services event regression.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>
@JFWooten4
JFWooten4 merged commit b2b9ff9 into main Oct 27, 2026
2 checks passed
@JFWooten4
JFWooten4 deleted the twilight-finder0119 branch October 27, 2026 22:42
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