Skip to content

Conversation

@JammingBen
Copy link
Contributor

Prevents the sort options in the trash overview from disappearing after emptying a trash bin. This happened because we always cleared the file list afterwards, which should only happen when the user is inside a trash bin (not on the overview).

fixes #1391

@JammingBen JammingBen self-assigned this Jan 20, 2026
Copilot AI review requested due to automatic review settings January 20, 2026 14:32
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 fixes a bug where sort options in the trash overview disappear after emptying a trash bin. The fix ensures that the file list is only cleared when the user is inside a trash bin (i.e., when trash resources are present), not when viewing the trash overview.

Changes:

  • Modified the emptyTrashBin function to conditionally clear resources based on whether trash resources are present in the file list
  • Added test coverage for the new conditional clearing behavior
  • Updated test imports to include TrashResource type

Reviewed changes

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

File Description
packages/web-pkg/src/composables/actions/files/useFileActionsEmptyTrashBin.ts Added conditional logic to only clear resources when trash resources are present in the file list
packages/web-pkg/tests/unit/composables/actions/files/useFileActionsEmptyTrashBin.spec.ts Added test case for the new conditional clearing behavior and updated existing test to verify resources are not cleared on overview

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

Prevents the sort options in the trash overview from disappearing after emptying a trash bin. This happened because we always cleared the file list afterwards, which should only happen when the user is inside a trash bin (not on the overview).
@JammingBen JammingBen force-pushed the fix/trash-overview-sort-options-disappearing branch from 4ef268f to c7d15dc Compare January 20, 2026 14:33
@JammingBen JammingBen requested a review from kulmann January 20, 2026 15:26
@kulmann kulmann merged commit 7523276 into main Jan 21, 2026
28 checks passed
@kulmann kulmann deleted the fix/trash-overview-sort-options-disappearing branch January 21, 2026 12:32
@openclouders openclouders mentioned this pull request Jan 21, 2026
1 task
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.

Emptying trash bin removes sorting options in tiles view

3 participants