AppFlowy-IO / AppFlowy-IO/AppFlowy

[Bug] Empty trash fails silently for database views — items permanently stuck in trash (0.13.0)

Đang mở
#8,921 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Dart
Star
76.6k
Fork
6k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Bug Description

When emptying the trash, database pages (Board / Grid / Gallery / Calendar / List views) are not permanently deleted. They remain in the trash and cannot be removed by any subsequent delete attempt. The problem is cumulative — every database page that is trashed and then "emptied" can join the stuck list.

## Actual behavior

Database items stay in trash permanently. The app log records:

```
🔴delete database failed: code:Record not found, message:The database for view id: not found
```

(target: `flowy_core::deps_resolve::folder_deps::folder_deps_database_impl`)

The view itself is already fully removed from the page tree — only the trash entry remains — which suggests the delete cascade fails on the database-record lookup even though there is nothing left to delete.

## Impact

Low severity but annoying and permanent: the trash accumulates entries that can never be cleared. No data loss for remaining content.

## Possible relation

The trash area already has at least one other open issue (#7588 — moving a page sends it to trash).

### How to Reproduce

1. Create a new page.
2. Add one or more database views to it (e.g. Board and Grid).
3. Move the page/view to the trash (delete).
4. Open Trash → Empty trash.
5. Observe: some database items remain in the trash.
6. Attempt to delete the remaining items individually — no effect (silently fails).
7. Repeat steps 1–6 with new database pages — the stuck list grows.

### Expected Behavior

Empty trash permanently deletes all items. If a record is already gone, deletion should be treated as successful (idempotent), not as a failure.

### Operating System

macOS 15.7.8, Apple Silicon (M3)

### AppFlowy Version(s)

0.13.0 (desktop, downloaded from appflowy.com) local-only, no cloud account / no sign-in

### Screenshots

_No response_

### Additional Context

_No response_

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.