session-desktop
session-desktop copied to clipboard
Add option to disable "open this link in browser" popup.
Describe the bug The session client on android/mac/windows is asking if I want to open a link in the browser.
There should be an option to disable that popup and open it directly in the browser.
To Reproduce
- Send a link to someone
- Click on link to try and open it in the browser
Screenshots or Logs

Other information (please complete the following information):
- Device: MacOS, Windows, Android
- OS: MacOS 12.6, Windows 10, Android 13
- Session Version or Git commit hash: Session 1.10.4, 991ddd1cbaa1948c865b5e8ad9b2b8137f04641c
Yeah i think this is a good idea, would support putting an option in the modal, something like "Don't show me this again"
Yeah i think this is a good idea, would support putting an option in the modal, something like "Don't show me this again"
I think it would be better to add "Trust this domain" button which adds this exact hostname to list of trusted and put "Disable link warnings" in settings instead. Users presented with "don't show me this again" will usually click it, because it removes extra time-wasting step for them (risking security), and by adding option to disable these popups to settings we add extra customization for users who took their time to search for settings for this exact option and who take responsibility of clicking on unknown links.
I noticed that in current implementation pressing "esc" while in this modal copies link to clipboard. Is this intentional? Looks like bug because SessionConfirm modal is used.
I created separate component SessionOpenExternalLinkDialog and separate modal state OpenExternalLinkModalState, moved showLinkVisitWarningDialog from SessionConfirm to OpenExternalLinkDialog so we don't mix these two modals in same file and took some design ideas from discord to put all four possible actions in popup: 1) close popup 2) copy link 3) just open 4) open and trust in future
Here is reference from Discord:
Here is what I made:
Here is patch for this: 0001-chore-refactor-redesign-external-links-modal.patch
And for trusted websites feature:
I added TrustWebsitesController which is a simplier copy of BlockedNumberController that stores trusted hostnames in db by trusted-websites key.
By the way, I fixed this issue when options were shrinking because of too small resolution. This is fixed by applying flex-shrink: 0.
became:
Also this arrow should be reversed (pointing downwards when closed) so I fixed it too
However, I noticed that trusted-websites key does not get saved in database, while blocked does. I need these changes to be reviewed and approved anyway, so please keep in mind this issue with persisting trusted hostnames string set.
Here is final patch with yarn ready executed:
0001-feat-trusted-websites-list-and-trust-hostname-btn.patch
And I'll create a pull request when GitHub support detach my bot framework repo and I'll be able to fork session desktop client repo again.
Thanks for taking a stab at this @VityaSchel , after looking at this further, i think we want to take this in house as we want to support this feature cross platform and potentially sync the URL list cross platform, which extends this from being a simple PR into something more complex. Tracking this via Jira internally as https://optf.atlassian.net/browse/SES-1808
Thanks for taking a stab at this @VityaSchel , after looking at this further, i think we want to take this in house as we want to support this feature cross platform and potentially sync the URL list cross platform, which extends this from being a simple PR into something more complex. Tracking this via Jira internally as https://optf.atlassian.net/browse/SES-1808
I was finally able to create PR with my code #3088 so feel free to take anything from it, if it helps :)