-
Notifications
You must be signed in to change notification settings - Fork 244
[codex] feat(ai plugin): Add silent start auto-show search window#545
[codex] feat(ai plugin): Add silent start auto-show search window #545ziboh wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a 'silent start' (静默启动) feature, allowing the application to start minimized in the system tray without showing the main window by default. This is implemented by adding a setting toggle in the UI, saving/loading the setting, and notifying the main process via a new 'renderer-ready' IPC event once the renderer is ready. The review feedback suggests changing 'ipcMain.on' to 'ipcMain.once' for the 'renderer-ready' event to prevent the window from unexpectedly showing again during page reloads or hot module replacements.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议将 ipcMain.on 改为 ipcMain.once。
由于渲染进程可能会因为页面刷新、开发环境下的热重载(HMR)或异常重启等原因多次发送 renderer-ready 事件,使用 ipcMain.on 会导致每次渲染进程就绪时都重新触发窗口显示逻辑(在用户关闭了静默启动的情况下)。这可能会在用户已经手动隐藏窗口后,因为页面刷新而导致窗口意外弹出,影响用户体验。
使用 ipcMain.once 可以确保该自动显示逻辑在应用启动时仅执行一次。
4a5985c to
3576fb1
Compare
Codex 写的添加静默启动的代码,我自己不会写,希望能够审查一下,测试了一下功能正常