forked from HeyPuter/puter
-
Notifications
You must be signed in to change notification settings - Fork 150
feat: Add web link shortcuts feature for desktop #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PrayagCodes
wants to merge
2
commits into
codepath:main
Choose a base branch
from
PrayagCodes:feat/web-link-shortcuts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Implement the ability to create web link shortcuts on the desktop, allowing users to save and quickly access frequently visited websites. This feature bridges the gap between the Puter environment and external web resources, making the desktop feel more integrated and functional. Features: - Add 'New Link' option to desktop context menu - Prompt for URL with validation (must start with 'http://' or 'https://') - Auto-generate filename from URL domain (e.g., 'Github.weblink') - Automatic link creation when pasting URLs onto desktop - Display .weblink files with link icon instead of generic file icon - Double-click to open URLs in new browser tab with security attributes - Persistent storage of URLs in .weblink files - Duplicate prevention mechanism for paste operations Changes: - src/gui/src/helpers/new_context_menu_item.js: Add 'Web Link' menu item - src/gui/src/helpers.js: Add create_weblink() and create_weblink_from_url() functions - src/gui/src/keyboard.js: Enhance paste handler to detect and create links from URLs - src/gui/src/helpers/item_icon.js: Add icon support for .weblink file extension - src/gui/src/helpers/open_item.js: Add special handling to open URLs from .weblink files - src/gui/src/i18n/translations/*.js: Add translations to all 38 language files Technical details: - .weblink files store URLs as plain text - URLs validated before opening (security check) - window.open() called with opener=null for security - Duplicate prevention using '_creating_weblink' flag - Early event prevention in paste handler to avoid browser defaults
israx
reviewed
Dec 1, 2025
israx
reviewed
Dec 1, 2025
israx
reviewed
Dec 1, 2025
israx
reviewed
Dec 1, 2025
israx
reviewed
Dec 1, 2025
israx
reviewed
Dec 1, 2025
israx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job. We are getting close!
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.
Overview
This PR implements the ability to create web link shortcuts on the desktop, allowing users to save and quickly access frequently visited websites. This feature bridges the gap between the Puter environment and external web resources, making the desktop feel more integrated and functional.
Features
Changes Made
Core Functionality
src/gui/src/helpers/new_context_menu_item.js: Add 'Web Link' menu item to context menusrc/gui/src/helpers.js:create_weblink()function for manual link creationcreate_weblink_from_url()function for paste operationssrc/gui/src/keyboard.js: Enhance paste handler to detect and create links from URLssrc/gui/src/helpers/item_icon.js: Add icon support for .weblink file extensionsrc/gui/src/helpers/open_item.js: Add special handling to open URLs from .weblink filesInternationalization
src/gui/src/i18n/translations/*.js: Add translations to all 38 language filesweb_link,enter_url_for_web_link,url_must_start_with_http,failed_to_open_url,invalid_url_in_weblink,error_reading_weblinkSecurity Considerations
window.open()called withopener=nullfor security (prevents window.opener access)Technical Details
_creating_weblinkflag to prevent concurrent creationTesting
Manual Test Cases
Create Link via Context Menu
Paste URL to Create Link
URL Validation
Persistence
Icon Display
Related Issues
Closes #[issue-number]
Notes