Repository navigation
Feature: Native file pickers on Linux via the desktop portal - #77
Merged
Merged
Conversation
Implement DesktopCommonDialogService on org.freedesktop.portal.FileChooser (OpenFile single/multiple/directory, SaveFile with name, folder and filters). Tested against a fake portal on a private bus. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IFileChooserService(Platform.Abstractions) withPortalFileChooserService(Platform.Linux) overorg.freedesktop.portal.FileChooser: OpenFile (multiple/directory), SaveFile (current_name, current_folder, filters), Request/Response handshake with handle_token and Sender= match.DesktopCommonDialogServicenow uses it: filter pairs map to portal filters,file://URIs are decoded safely (empty/localhost authority only, NUL rejected), cancel returns the existing "cancelled" result, and no portal falls back to cancel with one logged warning.x11:<hex id>when known, else empty (WindowHandle is currently always 0 on Linux).Notes
Testing
7 new tests against a fake portal on a private dbus-daemon (single, multiple, directory, save, cancel, no portal, no bus). Full Files.Platform.Tests pass (871 passed, 7 skipped for missing Xvfb); Files.App net10.0-desktop builds.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY