 to selectively update only changed parts
                updateItemGranularly(element, newItem, newIndex, context);
            }

            function updateItemGranularly(element, newItem, newIndex, context) {
                // Update checkbox state
                const checkbox = element.querySelector('.todo-checkbox');
                if (checkbox && checkbox.checked !== newItem.completed) {
                    checkbox.checked = newItem.completed;
                }
                
                /