AppFlowy-IO / AppFlowy-IO/AppFlowy

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

Abierto
#8,921 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Dart
Estrellas
76.6k
Forks
6k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.