Repository: oliverschwendener/ueli (ts)

Issue:
[Bug] Taskbar tool tip empty on Windows 11
**Describe the bug**
Taskbar tool tip empty on Windows 11

**To Reproduce**
Run euli.  However over "U" taskbar icon. empty box shown

**Expected behavior**
Should read "Euli" or something.

**Screenshots**
![image](https://github.com/user-attachments/assets/9d24ff62-1616-4e2c-b609-7dc60debc22f)

**Environment**
 - OS: Windows
 - Version 11

**Additional context**
Add any other context about the problem here.


Pull request description:
feat(TrayIcon): show tooltip on hover
Fixes #1191

Patch:
diff --git a/src/main/Core/TrayIcon/TrayIconManager.ts b/src/main/Core/TrayIcon/TrayIconManager.ts
index 8e90a3a7..4dc2b30a 100644
--- a/src/main/Core/TrayIcon/TrayIconManager.ts
+++ b/src/main/Core/TrayIcon/TrayIconManager.ts
@@ -19,6 +19,7 @@ export class TrayIconManager {
 
     public async createTrayIcon() {
         this.tray = this.trayCreator.createTray(this.trayIconFilePathResolver.resolve());
+        this.tray?.setToolTip("Ueli");
         await this.updateContextMenu();
     }
 


Test patch:
diff --git a/src/main/Core/TrayIcon/TrayIconManager.test.ts b/src/main/Core/TrayIcon/TrayIconManager.test.ts
index 4efce854..1333b12a 100644
--- a/src/main/Core/TrayIcon/TrayIconManager.test.ts
+++ b/src/main/Core/TrayIcon/TrayIconManager.test.ts
@@ -9,9 +9,15 @@ import { TrayIconManager } from "./TrayIconManager";
 
 describe(TrayIconManager, () => {
     describe(TrayIconManager.prototype.createTrayIcon, () => {
-        it("should create a tray and update the context menu", async () => {
+        it("should create a tray, set tooltip, and update the context menu", async () => {
             const setContextMenuMock = vi.fn();
-            const createTrayMock = vi.fn().mockReturnValue(<Tray>{ setContextMenu: (m) => setContextMenuMock(m) });
+            const setToolTipMock = vi.fn();
+
+            const createTrayMock = vi.fn().mockReturnValue(<Tray>{
+                setContextMenu: (m) => setContextMenuMock(m),
+                setToolTip: (t) => setToolTipMock(t),
+            });
+
             const trayCreator = <TrayCreator>{ createTray: (i) => createTrayMock(i) };
 
             const dummyTrayIconFilePath = "test-tray-icon-file-path";
@@ -44,6 +50,7 @@ describe(TrayIconManager, () => {
             expect(getContextMenuTemplateMock).toHaveBeenCalledOnce();
             expect(buildFromTemplateMock).toHaveBeenCalledOnce();
             expect(buildFromTemplateMock).toHaveBeenCalledWith(dummyContextMenuTemplate);
+            expect(setToolTipMock).toHaveBeenCalledWith("Ueli");
             expect(setContextMenuMock).toHaveBeenCalledOnce();
             expect(setContextMenuMock).toHaveBeenCalledWith(dummyMenu);
         });