e === 'folder' && node.children) {
                    const foundId = findParentFolderId(node.children, bookmarkId, node.id);
                    if (foundId) return foundId;
                }
            }
            return null;
        }

        window.api.onPopupData((data) => {
            pageData = data;
            console.log('[书签弹窗] 接收到的数据:', data);
            
            nameInput.value = data.title;
            populateFolders(data.bookmarksTree);

            if (data.b