You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fresh draft gains an extra empty paragraph after first reload #8
A fresh browser with no saved draft ends up with an extra empty paragraph after the first reload.
Steps to reproduce
Open the app in a new browser profile (empty IndexedDB).
Type some text into the first paragraph and wait a moment.
Reload.
Expected
The draft has the single paragraph that was edited.
Actual
After the reload, the draft has an extra empty paragraph besides the edited one. On main before #3 it came out as ["", "INT. HOUXY\nSE"], and with #3 as ["INT. HOUXY\nShe waits.SE", ""], so this predates #3. A likely cause: LocalProject.open runs twice against the same empty IndexedDB store (e.g. a React StrictMode double effect), and each run calls createDocument, so the two blank documents merge.
Acceptance criteria
Opening a fresh draft and reloading leaves exactly the paragraphs the user created.
A regression test covers opening the same empty project twice concurrently.
Activity
lsegal commentedon Oct 3, 2026
Starting work on this issue /glorp:45E62B60
Fix duplicate blank document when an empty project opens twice