Repository navigation
Conversation
Extract the OS-neutral desktop code into a new Files.Platform.Posix project that references only Files.Platform.Abstractions, and rename the Linux-prefixed types, files and namespaces to Desktop*/Posix* so the Linux head is one implementation of a shared desktop layer instead of the layer itself. * Add a FilesDesktopOS selector (defaults to Linux) and gate the desktop Wayland/X11 targets on it. Linux behaviour is unchanged: the same Uno packages, the same define, the same output. * Move the shared POSIX primitives (stat, enumeration, watching, file operations, permissions, archives, launching, icons, previews, search and settings) into Files.Platform.Posix; Files.Platform.Linux keeps the Linux-only services and references it. * Route the root/elevation environment applied when starting a process through a Posix-level hook that the Linux assembly installs, and move the safe "open beneath a directory handle" primitive into the Posix native layer. * Gather the app layer's Linux entry points behind DesktopPlatform (DI registration, user directories, drag file list, display scale, FileManager1) and move the Linux startup, single instance and Uno host code from Program.cs into Program.Linux.cs. * Let CredentialsHelpers use any non-Windows ISecretStore. * Fix the tests left stale by the move and restore the /usr/lib/linuxfiles helper, state and cache paths that the packaging, polkit policy and launchers still use. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Resolved / Related Issues
No linked issue. This is a refactor with no intended behavior change.
What changed
Files.Platform.Posixproject that references onlyFiles.Platform.Abstractions.Files.Platform.Linuxkeeps the Linux-only services and references it.Desktop*/Posix*, so the Linux head is one implementation of a shared desktop layer.FilesDesktopOSselector (defaults to Linux) and gates the Wayland/X11 targets on it. Same Uno packages, define and output for Linux.DesktopPlatform(DI registration, user directories, drag file list, display scale, FileManager1) and moves the Linux startup, single instance and Uno host code fromProgram.csintoProgram.Linux.cs.CredentialsHelpersuses any non-WindowsISecretStore./usr/lib/linuxfileshelper, state and cache paths that packaging, the polkit policy and launchers use.Steps used to test these changes
dotnet build src/Files.App -f net10.0-desktopbuilds with 0 errors.Remaining limitations
Programstartup, single-instance forwarding and drag and drop are only covered by the build and CI, not by a runtime check.Files.Platform.Posix(for example/proc/self/fdinTrustedNativeDirectoryand the freedesktop MIME and icon helpers). Moving it is left for a follow-up.🤖 Generated with Claude Code