Skip to content

fix: remove desktop shortcut when app is deleted from Dev Center#2786

Open
tmchow wants to merge 1 commit intoHeyPuter:mainfrom
tmchow:fix/766-app-shortcut-cleanup
Open

fix: remove desktop shortcut when app is deleted from Dev Center#2786
tmchow wants to merge 1 commit intoHeyPuter:mainfrom
tmchow:fix/766-app-shortcut-cleanup

Conversation

@tmchow
Copy link
Copy Markdown
Contributor

@tmchow tmchow commented Apr 8, 2026

Summary

When an app is deleted from the Dev Center, the .app shortcut file on the user's desktop is not cleaned up. This leaves a non-functional icon that cannot be opened.

Changes

In src/dev-center/js/apps.js, the puter.apps.delete() success callback now also removes the desktop shortcut file at /{username}/Desktop/{appTitle}.app. The deletion is wrapped in a try/catch since the shortcut only exists if the user previously added it to their desktop via the Start menu context action.

Steps to reproduce (before fix)

  1. Create an app in the Dev Center
  2. Right-click it in the Start menu and select "Add to desktop"
  3. Delete the app from the Dev Center
  4. Desktop still shows the shortcut icon, but clicking it does nothing

Testing

The cleanup runs after the existing app directory and subdomain cleanup (lines 1414-1423). If no shortcut file exists, the puter.fs.delete call throws and is silently caught.

Fixes #766

This contribution was developed with AI assistance (Codex).

CE

After deleting an app via puter.apps.delete(), the .app shortcut file
on the user's desktop was not cleaned up. This left a non-functional
icon that could not be opened.

The cleanup attempts to delete /{username}/Desktop/{appTitle}.app
after the app deletion succeeds. If no shortcut exists (user never
added it to the desktop), the error is silently caught.

Fixes HeyPuter#766
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 8, 2026

CLA assistant check
All committers have signed the CLA.

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.

App shortcut not removed after deleting the app

2 participants