Skip to content

fix: handle file and document open events for external URLs#5

Merged
nikuscs merged 1 commit intomainfrom
feature/fix-external-url-open
Feb 24, 2026
Merged

fix: handle file and document open events for external URLs#5
nikuscs merged 1 commit intomainfrom
feature/fix-external-url-open

Conversation

@nikuscs
Copy link
Copy Markdown
Owner

@nikuscs nikuscs commented Feb 24, 2026

Summary

Fixes file opening and external URL routing by implementing support for document open events and ensuring proper initialization order on cold launch.

Problem

Opening HTML files from Finder or terminal (e.g., open /path/to/file.html from Vite bundle analyzer) would activate the app but silently fail to route the file. The app only handled URL scheme events (http/https) but not file open events.

Solution

  • Implement application(_:open:) to handle document open events (kAEOpenDocuments)
  • Move early initialization to applicationWillFinishLaunching to ensure engine and source tracking are ready before any events arrive
  • Preserves source app context for source-based routing rules, even on cold launch

Testing

  • All 63 existing unit tests pass
  • SwiftLint --strict: 0 violations
  • Build succeeds

🤖 Generated with Claude Code


Open with Devin

Add support for opening HTML files from Finder and terminal, and support URLs opened via terminal (e.g., from Vite bundle analyzer).

Changes:
- Implement application(_:open:) to handle file open events (kAEOpenDocuments)
- Move early initialization to applicationWillFinishLaunching to ensure engine and source tracking are ready before any events arrive
- Ensures URLs opened at cold launch preserve source app context for source-based routing rules

Fixes URLs from terminal tools like `open /path/to/file.html` and Finder double-click opens now correctly route to configured browsers instead of silently failing.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@nikuscs nikuscs merged commit 48c3f50 into main Feb 24, 2026
1 check passed
@nikuscs nikuscs deleted the feature/fix-external-url-open branch February 24, 2026 21:52
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