raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.02k stars 2.75k forks source link

[Pins] Export Pin Data removed tags from pinned apps #13274

Open dudido opened 4 days ago

dudido commented 4 days ago

Extension

https://www.raycast.com/HelloImSteven/pins

Raycast Version

1.77.3

macOS Version

13.6.7

Description

I just spent quite some time setting up my Pins in folders and with tags, and ran a backup of Pins as well as Raycast after. After running the backup of Raycast, one folder with 100+ tagged Pins, had all their tags removed. There are 3 other folders with tagged Pins (all folders in Finder, not apps).

Steps To Reproduce

  1. Set up Pins folders with tagged pins
  2. Run Raycast backup
  3. Pins have Tags removed

Current Behaviour

Raycast export somehow interferes with Pins setup

Expected Behaviour

Configuration should be stable and part of Raycast backup

raycastbot commented 4 days ago

Thank you for opening this issue!

🔔 @SKaplanOfficial @pernielsentikaer you might want to have a look.

💡 Author and Contributors commands The author and contributors of `HelloImSteven/pins` can trigger bot actions by commenting: - `@raycastbot close this issue` Closes the issue. - `@raycastbot rename this issue to "Awesome new title"` Renames the issue. - `@raycastbot reopen this issue` Reopens the issue. - `@raycastbot assign me` Assigns yourself to the issue. - `@raycastbot good first issue` Adds the "Good first issue" label to the issue. - `@raycastbot keep this issue open` Make sure the issue won't go stale and will be kept open by the bot.
dudido commented 4 days ago

After checking the .json backup created by Pins, I can see that all apps of that folder have not saved their tags. So I cannot say if it was the Pins backup or the Raycast backup which cause the configuration to loose data.

SKaplanOfficial commented 4 days ago

Hmm, not sure what's going on here. When you use the export command with the latest version, are tags included in the JSON output? Are they included for some pins but not others?

dudido commented 3 days ago

I had two kinds of Pins, folders (20-30?) and apps (100-150?). On export, all tags of apps were removed—tags for folders were retained in the JSON export.

Now that all app tags are gone, I tried assigning a single tag to a single pinned app, and it was correctly exported into a new JSON.

There must be a bug in the Pins export (which may or may not relate to the Raycast backup as a whole), and it was triggered once by running the Pins export. But beyond that, I don't know either what is going on.

SKaplanOfficial commented 2 days ago

The export function just loads all the data from LocalStorage, JSON stringifies it, and exports to a file. So if the tags were displaying in other areas of Pins, there's seemingly nothing the export itself does that would strip the tags. I'm wondering if the LocalStorage got corrupted somehow right before you exported.

I'm going to continue testing with 100+ pins to see if I can recreate the error. If not, we'll just have to have for some more data points...

dudido commented 2 days ago

Well the Pins menubar extension did crash on occasion before, but there was no data loss and reloading it on occasion got it working again. Since, I have not seen any crashes of the menubar since, it could be that the LocalStorage got corrupted, and was somehow stripped of tags on export, and that on re-import, the LocalStorage is not corrupted anymore, which is would explain why the menubar stopped crashing. But I'm not a dev…