Skip to content

Favorites and search results drop a file when another session moves it #4279

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

Favorites and the search results drop a file as soon as another session moves it to another folder, although it's still a favorite and still matches the search. onSSEItemMovedEvent (packages/web-runtime/src/container/sse/files.ts) removes every item whose new parent isn't the current folder, and isItemInCurrentFolder returns false whenever there is no current folder. Flat lists like Favorites and search results have none, so every move counts as "moved out" and the item gets removed.

Reproduction Steps

  1. Create the folders src and src/dest with the files src/fav.txt and src/other.txt
  2. Mark fav.txt as a favorite and open Favorites
  3. In another session, move src/fav.txt to src/dest/fav.txt
  4. Search for other and press Enter, then move src/other.txt to src/dest/other.txt in another session

Expected Outcome

The file stays in Favorites and in the search results, with its new location.

Actual Outcome

The file disappears from both lists as soon as the move event arrives. A reload brings it back with the new path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions