Skip to content

Add native macOS support - #67

Open
prioneto wants to merge 5 commits into
Deepender25:mainfrom
prioneto:macos-port
Open

Add native macOS support#67
prioneto wants to merge 5 commits into
Deepender25:mainfrom
prioneto:macos-port

Conversation

@prioneto

@prioneto prioneto commented Sep 9, 2026

Copy link
Copy Markdown

Summary

Adds a native macOS port of Edge-Drop while preserving the existing Windows behavior.

  • Adds macOS clipboard and image handling
  • Adds Finder file drag-and-drop support
  • Adds native macOS pasteboard and paste helpers
  • Adds macOS packaging, menu-bar, login-item, and permission support
  • Adjusts window layering and edge activation for Finder drags
  • Refines controls for Retina displays
  • Preserves Windows-specific behavior behind platform checks

Testing

  • 320 tests passed
  • TypeScript checks passed
  • macOS ARM64 DMG and ZIP builds completed
  • Finder drag-and-drop manually verified
  • Clipboard text, files, and images manually verified

Copilot AI lite review requested due to automatic review settings September 9, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new macOS clipboard fast-path parsing can mis-handle file://host/... URLs (hostname dropped), and the new macOS documentation contains branch-/user-specific wording that should be made generic.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds first-class macOS support to Edge-Drop by introducing a native pasteboard/helper binary, macOS-specific window/tray/login-item behavior, and packaging/CI updates, while keeping existing Windows behavior behind platform checks.

Changes:

  • Add macOS native helper + main-process adapters (clipboard files/images, Command+V simulation, fullscreen detection, window layering/geometry).
  • Add macOS packaging + CI (electron-builder mac targets, helper build script, GitHub Actions workflow).
  • Refine renderer UX for macOS/Retina and expand tests to cover macOS contracts and shared drag/URI parsing.
File summaries
File Description
tests/trayTheme.test.ts Skip Windows-only tray theme assertion on non-Windows.
tests/storePaths.test.ts Skip Windows Store/exe interop tests on non-Windows.
tests/storePackaging.test.ts Update packaging contract tests for per-platform build settings.
tests/storeLoginItem.test.ts Skip Windows registry login-item tests on non-Windows.
tests/storeLoginApply.test.ts Skip Windows Store login-item behavior tests on non-Windows.
tests/macosPort.test.ts Add macOS port contract tests (scripts/build/window/CSP/helper).
tests/launchAtLoginFixes.test.ts Skip Windows registry healing tests on non-Windows.
tests/imageProtocol.test.ts Add tests for macOS clipboard file format recognition.
tests/geometry.test.ts Add tests for collapsed-window bounds used by macOS hot-zone strip.
tests/dropPayload.test.ts Add tests for shared external drag detection + URI-list decoding.
src/styles/settings.css Tweak indicator-card active visuals.
src/styles/panel.css Add active/pressed button styles + macOS/Retina-specific chip styling.
src/styles/global.css Normalize button styling and focus-visible outline behavior.
src/main.tsx Expose platform to CSS via data-platform.
src/hooks/useEdgeHover.ts Use shared external-drag detection to open panel during Finder drags.
src/components/Panel.tsx Centralize drag payload detection via shared helper.
src/components/IndicatorStyleFlyout.tsx Update style-card visuals to match new macOS/Retina treatment.
src/components/HotkeyRecorder.tsx Render mac-friendly modifier labels (Command/Option/Control).
src/components/Header.tsx Adjust header sizing/gaps/icons for macOS/Retina metrics.
shared/dropPayload.ts Add shared helpers for drag payload types + URI-list to file paths.
shared/bridge.ts Add platform field to renderer bridge contract.
resources/macos/EdgeDropMacHelper.swift New native helper for pasteboard/files/images/paste/fullscreen.
resources/macos/build-helper.sh Build/universalize/sign the macOS helper binary.
README.md Document macOS support and update platform badge.
package.json Add macOS scripts and electron-builder mac/win extraResources structure.
NOTICE Add macOS-port attribution/notice file.
MACOS.md Add macOS build/run/permissions/distribution documentation.
index.html Allow font-src data: in CSP for packaged fonts.
electron/preload/index.ts Decode Finder URI-list drops into file adds before URL handling.
electron/main/window.ts macOS-specific hot-zone window geometry + Spaces/Mission Control behavior.
electron/main/updater.ts Disable auto-updater on macOS until a release feed exists.
electron/main/tray.ts Use template tray image on macOS and size appropriately.
electron/main/macos.ts Main-process wrapper around the native macOS helper binary.
electron/main/loginItems.ts Add macOS login-item read/apply path and guard Windows-only healing.
electron/main/ipc.ts Route clipboard writes/paste simulation through macOS helper when on darwin.
electron/main/index.ts Set macOS activation policy to accessory (menu-bar utility behavior).
electron/main/geometry.ts Add collapsed-window bounds helper for macOS Finder drag targeting.
electron/main/fullscreen.ts Add macOS fullscreen checks via native helper; expand monitor to darwin.
electron/clipboard/formats.ts Detect/read macOS clipboard file URLs (formats + helper integration).
.gitignore Ignore macOS helper build/bin outputs.
.github/workflows/macos.yml Add macOS CI workflow (typecheck, tests, mac build artifacts).
Review details
  • Files reviewed: 40/42 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +126 to +134
const urls = raw.match(/file:\/\/[^\s<>'"]+/g) ?? []
const paths = filterValidPaths(urls.flatMap((url) => {
try {
return [decodeURIComponent(new URL(url).pathname)]
} catch {
return []
}
}))
if (paths.length) return paths
Comment thread MACOS.md Outdated
Comment thread README.md
<img src=".github/readme/Logo.gif" alt="Edge-Drop Logo" width="220" style="max-width: 100%; height: auto;" />
</p>

> **macOS port:** the `macos-port` branch adds a native macOS pasteboard helper, menu-bar/Spaces behavior, Finder file copy/paste, Command+V automation, full-screen detection, launch at login, and DMG/ZIP packaging. See [MACOS.md](MACOS.md) for setup and current distribution notes.
@Deepender25

Copy link
Copy Markdown
Owner

@prioneto Thanks for this and give me some time

@prioneto

prioneto commented Sep 9, 2026

Copy link
Copy Markdown
Author

@prioneto Thanks for this and give me some time

let me know if i can keep improving it or if there is something else i can help with! I just loved the idea and wanted it for my macbook.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Deepender25

Copy link
Copy Markdown
Owner

@prioneto i am really grateful for your contribution but and i have plans for mac port but the problem i i do not have access to a mac at the point i am in the last year of my Computer Science and i have plans to buy a mac after graduation and for now i have a windows laptop and non of my friends have mac too and those who have i can to ask them and its just a difficult situation for me to test or built a version for mac at the point and i in any mean not saying that your contribution is bad or something.
but the thing is i want to updates after proper testing of every version and even if your port is perfect and works correctly for now and i publish it and it have any issue that is mac specific that neither i can test , reproduce nor fix it and that will be a bad user experience.
and even though this is a personal project and not some production grade project i want to keep the project more focused towards quality rather then quantity of updates or platforms.
so even though i want to merge this with the repo i can do that due to the above situations.
i would be happy to use and test and merge the approaches of your version when i will have a mac and as i do not have any experience with mac i would be looking forward to contributors like you to guide and teach me things.
if i have to suggest something i would say you should work on it if you want and feel like it and add it into your own projects and as you mentioned that you wanted to use it your mac that would also let you be the master of the thing that you use .
and in the end i would just say if you need any kind of design and user flow help i will be happy to provide my feedbacks and suggestions.
if you like you can reach out to me through email any time "yadavdeepender65@gmail.com"

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.

3 participants