AppFlowy-IO / AppFlowy-IO/AppFlowy

[Bug] Crash on Paste into Fresh Empty Inline DB Row Page

Open
#8,884 0 comments 0 reactions 1 assignee Claimed by @appflowy View on GitHub
Dominant language
Dart
Stars
76.6k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### Bug Description

### Product
AppFlowy client 0.13.0 (self-hosted backend)
### Summary
Pasting larger text into a freshly created empty page that belongs to an inline database row can trigger save warning and then client crash/exit.
### Expected
Paste should succeed and page should remain stable.
### Actual

- Save warning appears (not always immediately).
- Client exits/crashes around 10 seconds later.

### Reliable Trigger Pattern

1. Create a new page from database row (fresh empty page).
2. Do direct copy/paste of larger text into this empty page.
3. Wait ~10s.
4. Client exits.

### Stable Control Pattern (Workaround)

1. Create the same new empty row page.
2. Type short temporary manual text.
3. Close page and reopen it.
4. Paste the same larger text.
5. Remove temporary text.
6. No crash observed.

### Environment

- Self-hosted AppFlowy Cloud stack (docker compose beta overlay)
- Workspace ID: c23e4a71-c8c2-4306-af2b-cda64be1d997
- Problematic View ID observed: f851a808-5476-5bd3-831e-ff8020fb5c93

### Server-side Correlation
At repro time, server-side save endpoints return 200, but cloud logs show:

- warning: Cycle detected in folder hierarchy at view_id f851a808-5476-5bd3-831e-ff8020fb5c93
- request path frequently includes POST /api/workspace/{workspace_id}/orphaned-view

No correlated Postgres hard errors were observed.
### Hypothesis
Likely initialization/state-transition bug for fresh empty row documents.
The first direct paste into a brand new empty row page may hit an invalid intermediate state; after first manual edit + reopen, state stabilizes.

### How to Reproduce

See Bug Description - Reliable Trigger Pattern

### Expected Behavior

Paste should succeed and page should remain stable.

### Operating System

Linux, Docker

### AppFlowy Version(s)

AppFlowy client 0.13.0 (self-hosted backend)

### Screenshots

_No response_

### Additional Context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.