Repository: oliverschwendener/ueli (ts)

Issue:
[Help wanted] Cant get Chrome Bookmarks to work in Ueli 9
**Describe what you're trying to achieve**
Cant get Chrome Bookmarks to work in Ueli 9. Works in Ueli 8.

Dont get any of my bookmarks 

**Screenshots**
![image](https://github.com/user-attachments/assets/f5664e5f-6559-46f3-85a2-2e30997368d4)

**Environment**

-   OS: Windows 11


Pull request:
fix: read chromium bookmarks from other and bookmark_bar
My Bookmarks File has an additional element "other" for all Bookmarks which are not stored on the Bookmarks bar. These Bookmarks where ignored. 

Fixes #1269

Patch:
diff --git a/src/main/Extensions/BrowserBookmarks/ChromiumBrowserBookmarkRepository.ts b/src/main/Extensions/BrowserBookmarks/ChromiumBrowserBookmarkRepository.ts
index e0685fa3..a7a63451 100644
--- a/src/main/Extensions/BrowserBookmarks/ChromiumBrowserBookmarkRepository.ts
+++ b/src/main/Extensions/BrowserBookmarks/ChromiumBrowserBookmarkRepository.ts
@@ -11,7 +11,7 @@ type BookmarkItem = {
     url?: string;
 };
 
-type BookmarksFileContent = { roots: { bookmark_bar: BookmarkItem } };
+type BookmarksFileContent = { roots: { bookmark_bar: BookmarkItem; other: BookmarkItem } };
 
 export class ChromiumBrowserBookmarkRepository implements BrowserBookmarkRepository {
     public constructor(
@@ -22,7 +22,10 @@ export class ChromiumBrowserBookmarkRepository implements BrowserBookmarkReposit
     public async getAll(): Promise<BrowserBookmark[]> {
         const jsonFilePath = this.bookmarksFilePathResolver();
         const fileContent = await this.fileSystemUtility.readJsonFile<BookmarksFileContent>(jsonFilePath);
-        return this.getBookmarksFromItem(fileContent.roots.bookmark_bar);
+        const bookmarkBarBookmarks = this.getBookmarksFromItem(fileContent.roots.bookmark_bar);
+        const otherBookmarks = this.getBookmarksFromItem(fileContent.roots.other);
+
+        return [...bookmarkBarBookmarks, ...otherBookmarks];
     }
 
     private getBookmarksFromItem(item: BookmarkItem): ChromiumBrowserBookmark[] {


Test patch:
diff --git a/src/main/Extensions/BrowserBookmarks/ChromiumBrowserBookmarkRepository.test.ts b/src/main/Extensions/BrowserBookmarks/ChromiumBrowserBookmarkRepository.test.ts
index c597e95b..d92a11f2 100644
--- a/src/main/Extensions/BrowserBookmarks/ChromiumBrowserBookmarkRepository.test.ts
+++ b/src/main/Extensions/BrowserBookmarks/ChromiumBrowserBookmarkRepository.test.ts
@@ -35,6 +35,10 @@ describe(ChromiumBrowserBookmarkRepository, () => {
                     new ChromiumBrowserBookmark("bookmark2", "url2", "guid2"),
                     new ChromiumBrowserBookmark("bookmark3", "url3", "guid3"),
                     new ChromiumBrowserBookmark("bookmark4", "url4", "guid4"),
+                    new ChromiumBrowserBookmark("bookmark6", "url6", "guid6"),
+                    new ChromiumBrowserBookmark("bookmark7", "url7", "guid7"),
+                    new ChromiumBrowserBookmark("bookmark8", "url8", "guid8"),
+                    new ChromiumBrowserBookmark("bookmark9", "url9", "guid9"),
                 ],
                 jsonFileContent: JSON.stringify({
                     roots: {
@@ -77,6 +81,45 @@ describe(ChromiumBrowserBookmarkRepository, () => {
                                 },
                             ],
                         },
+                        other: {
+                            children: [
+                                {
+                                    children: [],
+                                    guid: "guid6",
+                                    name: "bookmark6",
+                                    type: "url",
+                                    url: "url6",
+                                },
+                                {
+                                    children: [],
+                                    guid: "guid7",
+                                    name: "bookmark7",
+                                    type: "url",
+                                    url: "url7",
+                                },
+                                {
+                                    children: [
+                                        {
+                                            children: [],
+                                            guid: "guid8",
+                                            name: "bookmark8",
+                                            type: "url",
+                                            url: "url8",
+                                        },
+                                        {
+                                            children: [],
+                                            guid: "guid9",
+                                            name: "bookmark9",
+                                            type: "url",
+                                            url: "url9",
+                                        },
+                                    ],
+                                    guid: "guid10",
+                                    name: "bookmark10",
+                                    type: "folder",
+                                },
+                            ],
+                        },
                     },
                 }),
             });
@@ -104,6 +147,23 @@ describe(ChromiumBrowserBookmarkRepository, () => {
                                 },
                             ],
                         },
+                        other: {
+                            children: [
+                                {
+                                    children: [],
+                                    guid: "guid1",
+                                    name: "bookmark1",
+                                    type: "url",
+                                },
+                                {
+                                    children: [],
+                                    guid: "guid1",
+                                    name: "bookmark1",
+                                    type: "url",
+                                    url: "",
+                                },
+                            ],
+                        },
                     },
                 }),
             });
@@ -125,6 +185,17 @@ describe(ChromiumBrowserBookmarkRepository, () => {
                                 },
                             ],
                         },
+                        other: {
+                            children: [
+                                {
+                                    children: [],
+                                    guid: "guid1",
+                                    name: "bookmark1",
+                                    type: "other",
+                                    url: "url1",
+                                },
+                            ],
+                        },
                     },
                 }),
             });