Skip to content

🔩 Add an explicit action to make PDF Magic Opener the default - #63

Merged
JFWooten4 merged 5 commits into
mainfrom
starlight-default0110
Oct 27, 2026
Merged

JFWooten4 merged 5 commits into
mainfrom
starlight-default0110

Conversation

@JFWooten4

Copy link
Copy Markdown
Member

Summary

Implement opener-0110, checklist §2.4 macOS default PDF handler — Add a user action to make PDF Magic Opener the default.

  • Install a double-clickable Make PDF Magic Opener Default.command action in ~/Applications, and document the equivalent Terminal invocation.
  • Add a dedicated native helper that, only on explicit user invocation, verifies the installed PDF Magic Opener.app bundle name, exact local.studio.brave-pdf-opener identity, executable, and PDF document declaration before asking macOS to register it as the preferred PDF handler.
  • Reject missing or spoofed bundles, symlinks, unexpected arguments, missing executables, and macOS registration failures. Do not accept arbitrary application paths.
  • Preserve any existing user-managed .command file on reinstall. Do not change the user's selected post-scan browser, other file associations, ClamAV scanning, quarantine, or content checks.

Why

Installation already sets PDF Magic Opener as the PDF default, but if another app takes over later there has been no dedicated opt-in user action to restore it. The new action is reachable from Finder and Terminal, without requiring a PDF scan or a reinstall. It is independent of the separate generic utility rename PR #57 and read-only default handler inspection PR #59, and does not duplicate their scopes. The separate post-registration verification checklist work in PR #62 is also not modified.

Tests and CI

  • Linux CI checks the opt-in command script, preserved installer behavior, and native/CI wiring.
  • macOS CI compiles the helper and runs synthetic application-bundle tests for correct identity, missing applications/executables, an incorrect document-type declaration, symlinks, mocked registration success, rejected input, and registration errors. CI never changes its real PDF association.
  • Existing scanner-tests and macos-build must both pass before squash merge.

Publishing

The configured Codex Pony/Kefania publishing tool is not exposed in this chat. The connected GitHub identity is JFWooten4; no credentials or secret-bearing files are accessed.

Write PR descriptions automatically.

JFWooten4 and others added 4 commits October 27, 2026 18:32
Install a Finder-invokable action that verifies the PDF Magic Opener bundle before explicitly selecting it as the macOS default PDF handler. Keep the configured post-scan browser and scanner safety unchanged, preserve existing user-managed action files, and cover both the native logic and installation wiring in CI.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Create distinct temporary application bundles for identity, executable, document-type, and symlink validation to avoid mutating or caching the successful fixture.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Preserve the newly merged PDF handler inspection and running-browser safeguards while integrating the explicit user action to restore PDF Magic Opener as the default.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Invoke NSWorkspace.setDefaultApplication using its supported trailing completion closure, preserving the injectable success/failure handling and explicit user action.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Keep newly merged PDF handler status reporting and fallback selection alongside the explicit verified Finder default-handler action.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>

Copy link
Copy Markdown
Member Author

The first full CI run found a native Swift completion-handler argument error, which has been fixed without changing the feature's scope. Both Linux and macOS jobs then passed on commit 2ebe8c00e2e311b7f3c282d3bcea9d084978a2ff. Since main received additional PDF handler inspection/status and fallback support, I reconciled these changes via a normal, non-force merge commit 12c97d1c3539da232b329870a20c3d767dcc09c4. The current PR requires a fresh successful CI run before squash merge; no PR description edits or existing user preferences were made.

@JFWooten4
JFWooten4 merged commit fe58a76 into main Oct 27, 2026
2 checks passed
@JFWooten4
JFWooten4 deleted the starlight-default0110 branch October 27, 2026 22:38
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