fix(desktop): make Linux URL handlers discoverable with the app icon #8673
Mergedlimwa(GitHub profile, opens in a new tab)merged 6 commits into
main fromrefs/pull/8673/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/desktop/src/app/DesktopLinuxUrlHandler.ts line 163OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -131,3 +148,16 @@131148 ),132149 );133150151+ const updateDesktopDatabase = Effect.scoped(152+ Effect.gen(function* () {153+ const command = ChildProcess.make(154+ "update-desktop-database",155+ [environment.linuxApplicationsDir],156+ {157+ stdin: "ignore",158+ stdout: "ignore",159+ stderr: "ignore",160+ },161+ );162+ const handle = yield* spawner.spawn(command);163+ const exitCode = yield* handle.exitCode;
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
shivamhwp(GitHub profile, opens in a new tab) changed the title
- apps/desktop/src/app/DesktopLinuxUrlHandler.ts line 237OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -170,3 +225,13 @@170225 }171226 yield* writeDesktopEntry;172227 if (!environment.isPackaged) return;228+229+ yield* Effect.gen(function* () {230+ const { png } = yield* assets.iconPaths;231+ if (Option.isNone(png)) return;232+ // The AppImage mount is temporary; the chooser needs the icon after exit.233+ yield* fileSystem.makeDirectory(iconsDir, { recursive: true });234+ yield* fileSystem.copyFile(png.value, iconPath);235+ }).pipe(236+ Effect.catch((error) =>237+ logWarning("URL handler icon copy failed", { iconPath, message: error.message }),
shivamhwp(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
Note
Reviews paused#
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
7d13040f-4686-4935-9f8c-f992fc35cb04📥 Commits
Reviewing files that changed from the base of the PR and between aa9e519629f610484e2c22bf3e1d09c24bfdcb82 and 8b5b5b73eccdbfe84958d45c7932f52fd2fc59ee.
📒 Files selected for processing (1)
apps/desktop/src/app/DesktopLinuxUrlHandler.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
📝 Walkthrough
Walkthrough#
Packaged Linux desktop setup installs the app icon in the user icons directory. URL-handler registration can include that icon path, refreshes the desktop MIME cache, and continues to set the scheme default when icon copying or cache refresh fails.
Changes#
Linux desktop registration
apps/desktop/src/app/DesktopPreReadyPlatform.ts,apps/desktop/src/app/DesktopPreReadyPlatform.test.tsapps/desktop/src/app/DesktopLinuxUrlHandler.ts,apps/desktop/src/app/DesktopLinuxUrlHandler.test.tsapps/desktop/src/app/DesktopLinuxUrlHandler.ts,apps/desktop/src/app/DesktopLinuxUrlHandler.test.tsPriority: ➖ Normal
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)#
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
8b5b5Packaged Linux registration now installs the icon it references and refreshes MIME metadata before setting the scheme default. The inspected paths agree, and the ordering regression is detected by the registration test; no concrete merge risk remains.
Security Architecture Review#
Security architecture risk: 🔵 Low · up to
8b5b5The change makes the existing Linux handler easier for the application chooser to find. It does not change the handler’s executable, URL scheme, or authentication code. No introduced security issue was established, but a full packaged OAuth round trip has not been verified.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
Iconfields, and related pre-ready registration behavior inDesktopLinuxUrlHandler.tsandDesktopPreReadyPlatform.ts. Issue [#10354] requi…Iconrendering, pre-ready icon handling, and related tests. Keep the desktop database refresh and its failure handling.✅ Passed checks (4 passed)
#10354] requires a desktop database refresh after Linux URL-handler registration.DesktopLinuxUrlHandlerwrites or verifies the desktop entry, runsupdate-desktop-databasewith a five-secon…Full details: Out of Scope Changes check
Explanation
The pull request adds persistent packaged-icon copying,
Iconfields, and related pre-ready registration behavior inDesktopLinuxUrlHandler.tsandDesktopPreReadyPlatform.ts. Issue [#10354] requires desktop database refresh and URL-scheme discovery. It does not require icon installation or chooser presentation changes. These changes are not connected to the linked issue's coding scope.✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands.