Files
Bohdan Triapitsyn 141f528949 fix(sessions): keep a new session draft reachable when its save fails
On a poor connection (for example over the private relay) the first save of
a new project session draft could fail. Its text stayed in the composer's
local storage under the draft's own id, but the sidebar row came only from
the server, so after leaving the screen nothing led back to it and a new
draft opened empty.

A failed save now keeps the draft as an unsynced entry with its own row,
persisted in localStorage (attachment ids without bytes, merged per entry so
windows don't overwrite each other), shown before the server's list arrives,
and sent again after each successful list read. A 413 is not resent until
the draft changes, a draft the server never had is discarded without an
error, and a failed move leaves the draft where its local text lives.

Tested in an isolated dev instance with draft writes blocked: type, leave,
reload offline, reopen the row, reconnect; plus store tests for the retry,
the stored copy and the offline discard.
2026-11-23 02:00:16 +02:00
..
2026-11-22 02:19:13 +02:00