Skip to content

Renaming the folder of a file open in an app switches the app to the folder #4286

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

If another session renames the folder that holds the file open in the preview (or another app), the app switches to that folder and shows 'Failed to load ""'. The app's folder context sets the parent folder as resourcesStore.currentFolder, and onSSEItemRenamedEvent (packages/web-runtime/src/container/sse/files.ts) then calls router.push(createFileRouteOptions(...)) without a route name and without checking that a files list is active, so the current app route gets the folder path and id.

Reproduction Steps

  1. Open a folder pics and open an image from it in the preview
  2. In another session, rename pics to pics2
  3. Look at the preview, then click Close

Expected Outcome

The preview keeps showing the image, and Close returns to pics2.

Actual Outcome

The URL changes to /preview/personal/<user>/pics2?fileId=<folder id>, the page shows 'Failed to load "pics2"', and Close opens the Personal root.

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