-
Notifications
You must be signed in to change notification settings - Fork 928
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I am describing a concrete problem or use case, not just a vague idea.
Area
apps/desktop
Problem or use case
Dragging a folder from Finder onto the T3 Code dock icon does nothing. The Electron main process (apps/desktop/src/main.ts) has no app.on('open-file') handler. This means both macOS folder-drop and t3code CLI workflows are unsupported.
Proposed solution
- Register
app.on('open-file')in the main process, buffering paths received beforeapp.whenReady() - Add requestSingleInstanceLock() + second-instance handler so a running instance receives the path instead of spawning a duplicate
- Send the opened path to the renderer via a new IPC channel (e.g.
desktop: open-folder-path) - Web app receives the path and creates/switches to the matching project
- Parse process. argv for a folder path on first launch (covers t3code /some/folder )
- Update Electron builder config to declare folder association via
CFBundleDocumentTypes/Info.plist
Why this matters
Dragging a folder onto a dock icon is a core macOS interaction pattern. Not supporting it makes the app feel incomplete. This also unblocks the CLI open workflow requested in #517
Smallest useful scope
macOS only, handle open-file for directories and navigate to the project. CLI args and second-instance forwarding can follow separately.
Alternatives considered
Currently the only way to add a project is through the in-app folder picker dialog. #517 requests the CLI side of the same problem.
Risks or tradeoffs
Need to handle the case where the dropped path is not yet a registered project by auto-adding it. Also need to decide behaviour when the app is not yet fully bootstrapped (buffer the path and flush after ready).
Examples or references
VS Code: code . / drag folder onto dock icon
Ghostty: drag folder onto dock icon to open terminal in this path
Contribution
- I would be open to helping implement this.