fix(desktop): restore missing Start Menu shortcut - #7829
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR adds standard NSIS installer logic to create a Windows Start Menu shortcut during installation. The change is self-contained to the installer process, doesn't affect runtime application behavior, and includes updated tests. You can add or adjust custom eligibility rules. Learn more. |
Problem
Windows updates preserve the previous shortcut state. If the Start Menu shortcut is missing, later updates and reinstalls keep it missing, leaving the installed app undiscoverable from Windows Search.
Closes #5174.
Fix
Add a small NSIS install hook that recreates the configured Start Menu shortcut only when it is missing, including its AppUserModelID.
Validation
v1 -> missing shortcut -> v2 --updatedleft the shortcut missinginstaller.nsh: the same update restored the shortcut with the correct executable targetv1 -> v2update preserved the existing shortcutpnpm exec vp test run scripts/build-desktop-artifact.test.ts -t "applies platform-specific packaging"pnpm exec vp fmt --check scripts/build-desktop-artifact.ts scripts/build-desktop-artifact.test.ts apps/desktop/resources/installer.nshModel: GPT-5.6 Sol. Harness: OpenAI desktop agent.
Note
Restore Windows Start Menu shortcut via
customInstallNSIS macrocustomInstallmacro that creates a Start Menu shortcut if it does not already exist and sets its AppUserModelID to the application ID, guarded byDO_NOT_CREATE_START_MENU_SHORTCUT.createBuildConfigin build-desktop-artifact.ts to include the custom installer script in the Windowsnsisconfiguration.nsisconfig includes the script path.Macroscope summarized 27486f4.
Note
Low Risk
Installer-only Windows packaging change that recreates a missing Start Menu shortcut; it does not touch auth, data, or app runtime. Existing shortcuts are left unchanged.
Overview
Windows NSIS updates no longer leave a missing Start Menu shortcut missing. A new
customInstallhook ininstaller.nshrecreates the shortcut (with AppUserModelID) only when it is absent, so Search/Start Menu stay usable after reinstalls and updates.The Windows electron-builder
nsisconfig now includes that script; packaging tests assert the include path.Reviewed by Cursor Bugbot for commit 27486f4. Bugbot is set up for automated code reviews on this repo. Configure here.