From a998ff890a56b67fdd15e68f47ec9438983dd352 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Sun, 8 Feb 2026 14:52:50 -0800 Subject: [PATCH] Fix HUD task bar not disappearing after accept/complete Changed t.ID to t.TaskID in three places - the API returns TaskID not ID, so filtering and lookups were failing. Co-Authored-By: Claude Opus 4.5 --- hud/hud.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hud/hud.js b/hud/hud.js index bb5e34c..79f1f7d 100644 --- a/hud/hud.js +++ b/hud/hud.js @@ -133,7 +133,7 @@ const HUD = { existingBars.forEach(bar => existingIds.add(parseInt(bar.dataset.taskId))); // Get current task IDs - const currentIds = new Set(this.tasks.map(t => t.ID)); + const currentIds = new Set(this.tasks.map(t => t.TaskID)); // Remove bars for tasks that no longer exist existingBars.forEach(bar => { @@ -210,7 +210,7 @@ const HUD = { const bars = document.querySelectorAll('.task-bar'); bars.forEach(bar => { const taskId = parseInt(bar.dataset.taskId); - const task = this.tasks.find(t => t.ID === taskId); + const task = this.tasks.find(t => t.TaskID === taskId); if (task) { this.updateTaskBar(bar, task); } @@ -330,7 +330,7 @@ const HUD = { if (data.OK) { // Remove from local list immediately - this.tasks = this.tasks.filter(t => t.ID !== task.TaskID); + this.tasks = this.tasks.filter(t => t.TaskID !== task.TaskID); this.renderTasks(); this.showFeedback('Task accepted!', 'success'); } else {