AppFlowy-IO / AppFlowy-IO/AppFlowy

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

Aperta
#8,921 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Dart
Stelle
76.6k
Fork
6k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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_

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.