Vance Ingalls
14e79b7a4e
fix(studio): expect what deleting a clip already wrote, not what it read
...
Deleting a clip refused its own save. The flow reads the file, POSTs
`remove-element` — which rewrites the file server-side — then saves the
duration shrink on top. That second write carried the content read at the
start as its optimistic-concurrency expectation, but the server had already
moved the file on, so it came back 409 "file conflict". The save queue pauses
on a conflict rather than retry stale work, so the error surfaced and nothing
persisted afterwards; the clip stayed on the timeline until a reload, since the
store update runs after the save and the throw skipped it.
The undo baseline and "what is on disk" were one value in
saveProjectFilesWithHistory, which is right until a server-side mutation has
already written part of the edit. They are now separable: `diskContent` says
what to expect on disk, `readFile` still says what undo restores. Both delete
paths pass what remove-element left behind.
Measured in the studio, before and after: PUT /files/index.html 409 -> 200, no
error toast, the clip leaves the timeline immediately, and undo still brings it
back. Pre-existing — reproduced identically on the pre-session studio source.
2026-08-12 00:47:43 -07:00
..
2026-07-28 00:37:31 +02:00
2026-07-14 16:28:33 -07:00
2026-07-14 14:31:58 -04:00
2026-07-03 18:22:22 -07:00
2026-07-03 18:22:22 -07:00
2026-07-03 18:14:17 -07:00
2026-07-03 18:14:17 -07:00
2026-07-13 02:55:36 -04:00
2026-06-22 01:21:18 -04:00
2026-07-14 14:31:58 -04:00
2026-07-14 14:31:58 -04:00
2026-07-13 02:55:36 -04:00
2026-07-13 02:55:36 -04:00
2026-07-13 02:55:36 -04:00
2026-07-28 21:21:37 +02:00
2026-07-28 01:19:05 +02:00
2026-07-28 21:21:37 +02:00
2026-07-29 03:44:30 +02:00
2026-07-29 03:44:30 +02:00
2026-07-28 21:21:37 +02:00
2026-06-29 11:23:46 -07:00
2026-07-13 02:55:36 -04:00
2026-07-28 21:21:37 +02:00
2026-07-28 00:13:46 +02:00
2026-07-28 21:21:37 +02:00
2026-07-07 03:45:17 -04:00
2026-07-07 03:45:17 -04:00
2026-07-11 03:34:21 -04:00
2026-07-11 03:34:21 -04:00
2026-07-11 04:07:06 -04:00
2026-07-11 15:18:49 -04:00
2026-07-28 21:21:37 +02:00
2026-07-28 00:13:46 +02:00
2026-07-28 19:02:05 +02:00
2026-07-28 21:21:37 +02:00
2026-07-28 21:21:37 +02:00
2026-06-22 01:21:18 -04:00
2026-07-29 03:39:17 +02:00
2026-07-29 03:39:17 +02:00
2026-07-01 21:55:31 -07:00
2026-07-07 03:45:17 -04:00
2026-07-29 03:44:30 +02:00
2026-07-28 21:21:37 +02:00
2026-07-28 21:21:37 +02:00
2026-07-13 02:55:36 -04:00
2026-07-09 13:31:03 -07:00
2026-06-17 16:55:34 -07:00
2026-06-17 16:55:34 -07:00
2026-06-16 12:36:33 -07:00
2026-06-16 12:36:33 -07:00
2026-07-31 19:43:47 +02:00
2026-07-31 19:43:47 +02:00
2026-07-13 02:55:36 -04:00
2026-07-28 00:40:42 +02:00
2026-07-18 20:57:44 +02:00
2026-07-13 16:48:52 -07:00
2026-07-27 19:52:05 +02:00
2026-07-14 14:31:58 -04:00
2026-07-14 14:31:58 -04:00
2026-07-28 20:37:52 +02:00
2026-07-28 21:21:27 +02:00
2026-07-16 00:18:36 -07:00
2026-07-16 00:18:36 -07:00
2026-07-13 02:55:36 -04:00
2026-07-28 21:21:37 +02:00
2026-08-12 00:47:33 -07:00
2026-08-12 00:47:33 -07:00
2026-06-09 18:30:23 -04:00
2026-08-12 00:47:37 -07:00
2026-08-12 00:47:37 -07:00
2026-07-24 18:42:37 -07:00
2026-07-24 18:42:37 -07:00
2026-07-13 13:28:11 -04:00
2026-07-14 14:31:58 -04:00
2026-07-06 16:56:06 -07:00
2026-07-13 13:28:11 -04:00
2026-06-13 18:25:11 -04:00
2026-07-13 02:55:36 -04:00
2026-07-08 22:24:26 -04:00
2026-08-12 00:47:37 -07:00
2026-08-12 00:47:37 -07:00
2026-08-12 00:47:25 -07:00
2026-07-14 16:28:33 -07:00
2026-07-13 02:55:36 -04:00
2026-07-30 02:00:05 +02:00
2026-08-03 23:06:46 -07:00
2026-08-12 00:47:25 -07:00
2026-07-13 02:55:36 -04:00
2026-08-12 00:47:25 -07:00
2026-07-30 02:00:05 +02:00
2026-07-13 02:55:36 -04:00
2026-07-13 02:55:36 -04:00
2026-07-30 02:00:05 +02:00
2026-07-13 02:55:36 -04:00
2026-07-15 18:07:04 -04:00
2026-07-14 14:31:58 -04:00
2026-08-12 00:47:43 -07:00
2026-07-13 13:28:11 -04:00
2026-07-28 20:37:52 +02:00
2026-07-28 20:37:52 +02:00
2026-07-15 18:07:04 -04:00
2026-07-15 18:07:04 -04:00
2026-06-13 18:25:11 -04:00
2026-07-06 16:56:06 -07:00
2026-07-13 02:55:36 -04:00
2026-07-28 21:21:37 +02:00
2026-07-31 18:05:22 +02:00
2026-07-31 18:05:22 +02:00
2026-07-13 02:55:36 -04:00
2026-06-22 01:21:18 -04:00
2026-07-28 00:40:44 +02:00
2026-07-15 10:29:22 -04:00
2026-06-13 18:25:11 -04:00
2026-07-13 02:55:36 -04:00
2026-07-13 02:55:36 -04:00
2026-06-12 22:02:17 -04:00
2026-08-03 23:06:46 -07:00
2026-08-03 23:06:46 -07:00
2026-06-17 16:55:34 -07:00
2026-07-20 11:59:57 -07:00
2026-07-15 10:29:22 -04:00
2026-07-28 00:13:46 +02:00
2026-07-28 19:02:25 +02:00
2026-07-28 01:19:05 +02:00
2026-07-28 01:19:05 +02:00
2026-07-28 19:02:25 +02:00
2026-07-29 03:44:30 +02:00
2026-07-14 16:28:33 -07:00
2026-07-29 03:39:52 +02:00
2026-06-29 11:23:46 -07:00
2026-06-13 18:25:11 -04:00
2026-08-12 00:47:37 -07:00
2026-03-21 22:43:56 -07:00
2026-07-13 02:55:36 -04:00
2026-07-24 18:42:49 -07:00
2026-07-24 18:42:49 -07:00
2026-07-15 10:29:22 -04:00
2026-07-15 10:29:22 -04:00
2026-07-15 10:29:22 -04:00
2026-07-28 00:40:43 +02:00
2026-07-09 13:31:03 -07:00
2026-07-03 17:41:01 -07:00
2026-07-30 02:00:05 +02:00
2026-08-12 00:47:37 -07:00
2026-07-15 10:29:22 -04:00
2026-07-15 21:19:14 +08:00
2026-07-15 21:19:14 +08:00
2026-07-17 14:15:30 -04:00
2026-07-13 02:55:36 -04:00
2026-07-17 14:15:30 -04:00
2026-07-17 14:15:30 -04:00
2026-07-20 11:59:57 -07:00
2026-07-07 04:26:56 -04:00
2026-07-13 02:55:36 -04:00
2026-06-22 01:21:18 -04:00
2026-06-22 01:21:18 -04:00
2026-06-15 14:00:39 -07:00
2026-07-15 10:29:22 -04:00
2026-06-17 16:20:52 -07:00
2026-07-15 10:29:22 -04:00
2026-06-22 01:21:18 -04:00
2026-07-15 10:29:22 -04:00
2026-07-17 00:37:39 -07:00
2026-07-17 00:37:39 -07:00
2026-07-15 21:19:14 +08:00
2026-07-27 19:52:06 +02:00
2026-07-30 02:00:05 +02:00
2026-07-09 13:31:03 -07:00
2026-06-28 15:15:57 -04:00
2026-07-31 19:43:47 +02:00
2026-07-31 19:43:47 +02:00
2026-07-13 02:55:36 -04:00
2026-07-17 14:15:30 -04:00
2026-07-17 14:15:30 -04:00
2026-07-27 19:52:05 +02:00
2026-08-12 00:47:43 -07:00
2026-07-27 19:52:05 +02:00
2026-07-28 00:40:42 +02:00
2026-07-09 16:54:34 -04:00
2026-07-09 16:54:34 -04:00
2026-07-06 16:56:06 -07:00
2026-07-15 10:29:22 -04:00