fix(desktop): improve Niri AppImage and remote environment#2538
fix(desktop): improve Niri AppImage and remote environment#2538mwolson wants to merge 5 commits intopingdotgg:mainfrom
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 Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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: Needs human review This PR introduces new Linux desktop environment detection logic, a new You can customize Macroscope's approvability policy. Learn more. |
dba46b4 to
bfc4a7c
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5cce063. Configure here.





Summary
desktop-settings.json.Closes #2331.
Fixes #2539.
Repro
For the icon issue:
For the credential-store issue:
--password-store=gnome-libsecretto the desktop launcher.Diagnosis
Electron chooses the Linux
safeStoragebackend from the desktop environment or from--password-store. Niri is not one of Electron's recognized desktop names, so the app needed a launcher workaround to forcegnome-libsecret.This PR moves that into the app startup path:
desktop-settings.jsonnow acceptslinuxPasswordStore.automode leaves Electron alone for known GNOME and KDE desktops.autoappends--password-store=gnome-libsecret.The icon fix from #2332 stages standard Linux icon sizes and points electron-builder at the generated icon directory.
Scope
This is intentionally Linux desktop only.
The two fixes are combined because they were both found while testing the same Linux AppImage flow under Niri, and because this PR is intended to replace the narrower icon-only PR #2332.
Test plan
bun fmtbun lintbun typecheckbun run testbun dist:desktop:linuxsafe storage backend=gnome_libsecret encryptionAvailable=true.16,22,24,32,48,64,128,256, and512.Note
Medium Risk
Medium risk because it changes Linux desktop startup flags that affect Electron
safeStoragebackend selection and updates build/release packaging for Linux artifacts; regressions would mainly impact Linux users saving credentials or icon rendering.Overview
Improves Linux AppImage behavior by generating a full set of standard-sized icons at build time (via ImageMagick) and pointing the Linux
electron-builderconfig at the generatedicons/directory; the release workflow now ensures ImageMagick is available on Linux runners.Adds a Linux-only secret-storage preference (
linuxPasswordStore) todesktop-settings.jsonand uses a newlinuxSecretStoragehelper to auto-apply an Electron--password-storeswitch on unrecognized desktop environments while preserving explicit user choice. Saved-environment credential persistence now fails fast whensafeStorageencryption is unavailable and surfaces a more actionable GNOME Keyring/KWallet remediation message; related web runtime rollback logic was refactored to preserve the primary credential error even if registry rollback also fails.Reviewed by Cursor Bugbot for commit b133f59. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix Niri AppImage packaging and improve Linux secret storage error handling
magickorconvert) and point electron-builder at the icons directory; CI installs ImageMagick when missing--password-storeswitch at startup when Electron's auto-detection does not recognize the desktop environmentlinuxPasswordStorepreference (autoby default) is persisted in desktop settings and used to select the appropriate secret storage backendaddSavedEnvironmentnow consistently trigger registry rollback and preserve the original error messageMacroscope summarized b133f59.