Skip to content

fix(desktop): remove duplicate tray icon config#801

Open
vdimarco wants to merge 2 commits intomasterfrom
fix/duplicate-tray-icon
Open

fix(desktop): remove duplicate tray icon config#801
vdimarco wants to merge 2 commits intomasterfrom
fix/duplicate-tray-icon

Conversation

@vdimarco
Copy link
Contributor

@vdimarco vdimarco commented Jan 16, 2026

Summary

Fixes the issue where two Gatewayz icons appear in the Windows taskbar.

Root Cause

The tray icon was being created twice:

  1. Automatically by Tauri from the trayIcon config in tauri.conf.json
  2. Programmatically in lib.rs setup_tray() function

Fix

Removed the trayIcon config from tauri.conf.json since the Rust code already handles tray icon creation with the proper menu and event handlers.

Test plan

  • Build and install the desktop app on Windows
  • Verify only one Gatewayz icon appears in the taskbar/system tray

🤖 Generated with Claude Code

Greptile Summary

This PR fixes a duplicate tray icon issue on Windows by removing the declarative trayIcon configuration from tauri.conf.json. The tray icon is now created exclusively through the programmatic setup_tray() function in src-tauri/src/lib.rs:144, which provides the proper menu items and event handlers.

Key Changes:

  • Removed 6 lines of trayIcon config from tauri.conf.json that was creating the first duplicate icon
  • Added missing NEXT_PUBLIC_PRIVY_APP_ID, NEXT_PUBLIC_API_BASE_URL, and NEXT_PUBLIC_CHAT_HISTORY_API_URL environment variables to the desktop build workflow (these are required for authentication to work)

How it Works:
The Rust code at lib.rs:144-230 already handles complete tray icon setup including the icon, menu items (Show, New Chat, Check Updates, Settings, Quit), keyboard shortcuts, and click event handlers. The declarative config was redundant and causing Tauri to create a second icon without the custom menu.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fix is straightforward and correct - removing duplicate tray icon configuration that was causing two icons to appear. The Rust code already handles tray icon creation properly with full functionality. The added environment variables are essential for desktop app authentication and match the existing web app configuration. No logic changes or new features introduced.
  • No files require special attention

Important Files Changed

Filename Overview
src-tauri/tauri.conf.json Removed duplicate trayIcon config - tray icon is now only created programmatically in lib.rs
.github/workflows/desktop-build.yml Added required NEXT_PUBLIC env vars for desktop app authentication

Sequence Diagram

sequenceDiagram
    participant App as Tauri App Startup
    participant Config as tauri.conf.json
    participant Rust as lib.rs setup_tray()
    participant Tray as System Tray
    
    Note over App,Config: BEFORE (Duplicate Icons)
    App->>Config: Read trayIcon config
    Config->>Tray: Create tray icon #1
    App->>Rust: Call setup()
    Rust->>Tray: Create tray icon #2
    Note over Tray: Two icons appear!
    
    Note over App,Config: AFTER (Single Icon)
    App->>Config: Read config (no trayIcon)
    App->>Rust: Call setup()
    Rust->>Tray: Create tray icon with menu
    Note over Tray: One icon with full functionality
Loading

root added 2 commits January 16, 2026 16:06
The desktop app was showing 'Something went wrong' because NEXT_PUBLIC_PRIVY_APP_ID
was not set during the build. Added required environment variables from secrets.
The tray icon was being created twice - once by the trayIcon config in tauri.conf.json
and once programmatically in lib.rs setup_tray(). This caused two Gatewayz icons
to appear in the Windows taskbar. Removed the config since the code handles it.
@vercel
Copy link

vercel bot commented Jan 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
gatewayz-frontend Error Error Jan 16, 2026 4:39pm

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant