Skip to content

Commit e0228a9

Browse files
frankrousseauclaude
andcommitted
[widgets] Confirm annotation saves back to the player from TaskInfo
TaskInfo's onAnnotationChanged never called confirmAnnotationsSaved back on the PreviewPlayer, so the player kept treating the first save as still pending and silently dropped every annotation drawn afterwards from a side panel. Align it with the other consumers (Task, Edit, Playlist, ViewPlaylistModal) — await the dispatch, confirm on success, restore on failure. Port of upstream PR #2019. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent ea54dd5 commit e0228a9

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/components/sides/TaskInfo.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,17 +1119,22 @@ export default {
11191119
this.currentPreviewDlPath = this.getOriginalDlPath()
11201120
},
11211121
1122-
onAnnotationChanged({ preview, additions, deletions, updates }) {
1122+
async onAnnotationChanged({ preview, additions, deletions, updates }) {
11231123
let taskId = this.task ? this.task.id : this.previousTaskId
11241124
taskId = taskId || preview.task_id
1125-
if (taskId) {
1126-
this.updatePreviewAnnotation({
1125+
if (!taskId) return
1126+
const previewPlayer = this.$refs['preview-player']
1127+
try {
1128+
await this.updatePreviewAnnotation({
11271129
taskId,
11281130
preview,
11291131
additions,
11301132
deletions,
11311133
updates
11321134
})
1135+
previewPlayer?.confirmAnnotationsSaved()
1136+
} catch {
1137+
previewPlayer?.restoreFailedAnnotations()
11331138
}
11341139
},
11351140

0 commit comments

Comments
 (0)