Open file attachments in default app instead of save dialog - #7855
Closed
FellowTraveler wants to merge 4 commits into
Closed
Open file attachments in default app instead of save dialog#7855FellowTraveler wants to merge 4 commits into
FellowTraveler wants to merge 4 commits into
Conversation
Clicking a downloaded generic file attachment now immediately opens it with the system default application (e.g. Preview on macOS) rather than showing a save-to-disk modal dialog, reducing friction for viewing files shared in conversations. Adds an 'open-file-path' IPC channel in the main process that calls shell.openPath, and a new openAttachmentInDefaultApp action that decrypts the attachment to the OS temp directory before opening it.
Shows a save icon button (on hover) overlaying the attachment UI when a file has been fully downloaded, allowing users to save to a chosen location. The icon uses the existing save.svg asset and appears/fades with a CSS transition. Clicking it calls saveAttachment (shows the save dialog) without triggering the main click-to-open behavior.
Prompts the user with 'Open [filename]?' before calling shell.openPath, preventing accidental or malicious file execution.
Contributor
|
Hey there - thanks for all your work on this. We don't want this behavior in Signal Desktop, so I'm going to close this. We would be open to merging #7853 however, so please consider updating that to be a standalone PR. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Click a downloaded file attachment → shows a confirmation dialog ("Open [filename]?"), then opens it in the system default app.
Previously, clicking a downloaded file attachment had no action. This PR adds the ability to open it in the default app by clicking, with a confirmation dialog. Saving is still available via the existing download button already present in Signal's chat UI.
Changes
app/main.main.ts—open-file-pathIPC handler: shows a native confirmation dialog viadialog.showMessageBox, then callsshell.openPathts/state/ducks/conversations.preload.ts—openAttachmentInDefaultAppRedux thunk: decrypts attachment to OS temp dir, then invokes the IPC handlerts/components/conversation/Message.dom.tsx— click handler on generic attachments now callsopenAttachmentInDefaultAppstylesheets/_modules.scss— adds container wrapper needed by the drag-and-drop feature (PR Drag and drop file attachments to Finder #7853)Test plan