Repository navigation
Removing a widget also removes a hidden folder holding it - #297
Merged
Merged
Conversation
Discovery loads the first folder per widget id and hides any other folder under the user widgets root whose widget.json resolves to the same id (a hand-copied package folder). Removal deleted only the loaded folder and erased the instance's data, prefs and permission decision, so the rescan brought the hidden folder up under the same id, unconfigured and unapproved. Removal now deletes every folder directly under the library's root that discovery would load as that instance id, after the purge and before the loaded folder, so a failure still leaves the widget installed. Folders outside the root, `<id>--<label>` copies and folders with an unreadable widget.json are never matched. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The user never saw that folder, and a hand-made copy may hold edits the loaded one did not. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Two folders under the user widgets root with the same manifest id load as one widget (the first wins). Removing it deleted that folder and its settings, data and permission decision — and the rescan then brought the hidden folder up under the same id, unapproved and with the settings gone.
Removing a widget now also takes every other folder under the user root that discovery would load as the same instance id. Those hidden folders go to the Trash rather than being deleted.
<id>--<label>copies are separate instances and are never matched; folders outside the user root (dev copies) are never touched; a failed purge removes nothing.Tests: three fail without the fix (hidden folder reappears; whichever of the two was loaded; a hidden symlink loses only the link), two guard the limits. Full suite: Core 941 / App 938 / CLI 86, 0 failures.
🤖 Generated with Claude Code