Skip to content

Conversation

@JammingBen
Copy link
Contributor

Needed to move isItemInCurrentFolder from the runtime to web-pkg.

fixes #1522

@JammingBen JammingBen self-assigned this Nov 7, 2025
Copilot AI review requested due to automatic review settings November 7, 2025 10:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the isItemInCurrentFolder helper function by moving it from web-runtime to web-pkg to improve code reusability and maintainability across the codebase.

  • Moved isItemInCurrentFolder helper from web-runtime/src/container/sse/helpers.ts to web-pkg/src/helpers/resource/isItemInCurrentFolder.ts
  • Relocated associated tests from web-runtime/tests/unit/container/sse/helpers.spec.ts to web-pkg/tests/unit/helpers/resource/isItemInCurrentFolder.spec.ts
  • Updated all import statements across files to use the new location from @opencloud-eu/web-pkg

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/web-runtime/tests/unit/container/sse/helpers.spec.ts Removed isItemInCurrentFolder tests and related imports (SpaceResource, isItemInCurrentFolder)
packages/web-runtime/src/container/sse/shares.ts Updated import to use isItemInCurrentFolder from @opencloud-eu/web-pkg instead of local helpers
packages/web-runtime/src/container/sse/helpers.ts Removed isItemInCurrentFolder function and its dependencies
packages/web-runtime/src/container/sse/files.ts Updated import to use isItemInCurrentFolder from @opencloud-eu/web-pkg instead of local helpers
packages/web-pkg/tests/unit/helpers/resource/isItemInCurrentFolder.spec.ts Added comprehensive test suite for isItemInCurrentFolder (moved from web-runtime)
packages/web-pkg/src/helpers/resource/isItemInCurrentFolder.ts Added isItemInCurrentFolder helper function implementation
packages/web-pkg/src/helpers/resource/index.ts Exported isItemInCurrentFolder from resource helpers
packages/web-pkg/src/composables/actions/files/useFileActionsUndoDelete.ts Refactored to use isItemInCurrentFolder helper instead of direct comparison for improved robustness

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JammingBen JammingBen force-pushed the fix/undo-delete-file-list-update branch from b2bf7a6 to d416ac4 Compare November 7, 2025 10:15
@kulmann kulmann merged commit 71f9608 into main Nov 10, 2025
28 checks passed
@kulmann kulmann deleted the fix/undo-delete-file-list-update branch November 10, 2025 15:23
@openclouders openclouders mentioned this pull request Nov 10, 2025
1 task
openclouders pushed a commit that referenced this pull request Nov 10, 2025
…update

fix: add missing file list update after undo delete in space
@JammingBen
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
stable-4.2

Questions ?

Please refer to the Backport tool documentation

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Undo feature. Restored files are not immediately displayed in the project space.

3 participants