Files
AFFiNE-Mirror/packages
Whitewater f78e46f90e feat: add select all action to trash (#15556)
<img width="284" height="132" alt="image"
src="https://github.com/user-attachments/assets/a11f1919-ac91-4f87-b03d-4fab6e8cba7e"
/>


## Description

Add a select-all action next to the Trash page title after document
multi-selection starts.

- Select every unique document ID from the explorer groups, including
items outside the rendered viewport.
- Change the action to Clear selection when every Trash document is
selected.
- Reuse the existing Trash bulk-operation permissions without
introducing artificial grouping.

## Testing

- Trash page Playwright E2E: 2 passed
- Targeted TypeScript project build
- lint-staged
- lint:ox
- oxfmt --check
- git diff --check

## Checklist

- [x] I have signed the AFFiNE Contributor License Agreement
- [x] The PR targets the canary branch and its title follows
Conventional Commits
- [x] Tests are added or updated where it makes sense
- [ ] Full yarn lint and yarn typecheck pass locally

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added a select-all and clear-selection control to the Trash view when
multiple documents can be managed.
  - Select-all actions now update the document selection toolbar.

- **Bug Fixes**
- Improved Trash view controls for users with administrator or owner
permissions.

- **Tests**
- Added end-to-end coverage for selecting, selecting all, and clearing
multiple trashed documents.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-02 21:01:45 +08:00
..