Skip to content

Removing a widget also removes a hidden folder holding it - #297

Merged
jiunbae merged 2 commits into
mainfrom
fix/shadowed-duplicate-removal
Nov 16, 2026
Merged

jiunbae merged 2 commits into
mainfrom
fix/shadowed-duplicate-removal

Conversation

@jiunbae

@jiunbae jiunbae commented Nov 16, 2026

Copy link
Copy Markdown
Member

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

jiunbae and others added 2 commits November 16, 2026 17:56
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>
@jiunbae
jiunbae enabled auto-merge November 16, 2026 09:00
@jiunbae
jiunbae added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 9e24a11 Nov 16, 2026
6 checks passed
@jiunbae
jiunbae deleted the fix/shadowed-duplicate-removal branch November 16, 2026 09:31
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.

1 participant