agent: fix — infinite reactivity loop in TaskSidebar froze entire app
prevTaskIds was declared as $state, causing the $effect that writes to it to re-trigger itself infinitely (effect_update_depth_exceeded). The variable is just a comparison reference — doesn't need to be reactive. Changed to a plain let. Also removed debug event loggers and reverted grain z-index. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,9 @@
|
||||
}
|
||||
|
||||
// Track recently added tasks for highlight animation
|
||||
let prevTaskIds = $state(new Set(tasks.map((t) => t.id)));
|
||||
// Use a plain variable (not $state) for previous IDs to avoid
|
||||
// read-write loop inside the $effect.
|
||||
let prevTaskIds = new Set(tasks.map((t) => t.id));
|
||||
$effect(() => {
|
||||
const currentIds = new Set(tasks.map((t) => t.id));
|
||||
for (const id of currentIds) {
|
||||
|
||||
Reference in New Issue
Block a user