fix(03): WR-06 surface move-failed distinctly with re-save guidance
This commit is contained in:
@@ -50,7 +50,12 @@ export function SyncStateToast() {
|
||||
})
|
||||
|
||||
const status = data?.status
|
||||
const isConflict = status === 'failed' && data?.error?.includes('412')
|
||||
// WR-06: an edit-as-move whose create hits 412 dead-ends with no retry path (the
|
||||
// original event is preserved, but the new uid's only outbox row is failed). The
|
||||
// worker tags that case with a 'move-failed:' lastError so we can show distinct copy
|
||||
// guiding the user to re-open and re-save, rather than the etag-conflict copy.
|
||||
const isMoveFailed = status === 'failed' && !!data?.error?.startsWith('move-failed')
|
||||
const isConflict = status === 'failed' && !isMoveFailed && data?.error?.includes('412')
|
||||
const isPersistent = status === 'failed' || status === 'dead'
|
||||
|
||||
// Invalidate events on done OR on conflict (D-06/D-08)
|
||||
@@ -113,6 +118,16 @@ export function SyncStateToast() {
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)
|
||||
} else if (isMoveFailed) {
|
||||
// WR-06: the move could not be applied; the original event is unchanged.
|
||||
copy = "Couldn't move the event. Open it and save again."
|
||||
icon = (
|
||||
<AlertCircle
|
||||
size={14}
|
||||
style={{ color: 'var(--color-destructive)', flexShrink: 0 }}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)
|
||||
} else if (status === 'failed') {
|
||||
copy = "Didn't save. Try again."
|
||||
icon = (
|
||||
|
||||
Reference in New Issue
Block a user