Repository navigation
Code Quality: ShellViewModel Windows code isolated (P4-E) - #73
Merged
Merged
Conversation
Move the FindFirstFileEx/StorageFolder enumeration, ReadDirectoryChangesW watchers, alternate data streams, Recycle Bin shell items and BitLocker prompt verbatim into ShellViewModel.Windows.cs. Linux lists archive roots and folders through IStorableResolver/ArchiveFolder (read-only, no watcher) and can navigate into folders inside an archive. Ratchet the compat-off baseline to 2 keys. Co-Authored-By: Claude Opus 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.
Resolved / Related Issues
Phase 4 work package P4-E (docs/linux-port/PLAN.md, Phase 4 plan Revision 3). No issue.
What changed
ViewModels/ShellViewModel.Windows.cs(new, excluded on desktop by the*.Windows.csglob): the FindFirstFileEx/StorageFolder enumeration (EnumerateWindowsFolderAsync, the former#elsebody),EnumFromStorageFolderAsync, the ReadDirectoryChangesW/StorageQuery/FileSystemWatcher watchers and their queues,WatchForStorageFolderChangesAsync,AddFileOrFolderAsync(string),AddFileOrFolderFromShellFile, the Recycle Bin shell-item handlers, the BitLocker prompt, ADS listing and the SFGAO drive-capacity block. Moved verbatim; the ADS and SFGAO blocks became bodies ofpartial voidmethods, so Linux needs no#if.ShellViewModel.cs: 3720 to about 2810 lines. The Win32 usings are gone, and the Windows-only switch cases and Recycle Bin subscriptions are wrapped in#if WINDOWS.LINUX-TODO(props)marksGetExtraPropertiesandCheckCloudDriveSyncStatusAsync.ShellViewModel.Linux.cs: archive roots and folders inside archives are listed throughIStorableResolver→ArchiveFolder/ArchiveEntryFile. The listing is read-only, has no watcher, and handles password dismissal. The location is kept ascurrentStorable(StorableWithPath).currentStorageFolderstaysStorageFolderWithPath, because the Windows enumeration andStorageFileExtensionstake that type; on Linux it is always null.NavigationHelpers.Linux.cs: you can now open a folder inside an archive (it navigates). Opening files inside an archive shows the open-failed dialog (LINUX-TODO(archives)). The archive file itself still opens with its default application.ContextMenu.csandWidgetRecentItem.csare left). A probe that stubbed those two showed no errors left in ShellViewModel.Unchanged: the incremental watcher (
FolderChangeBatch,TryApplyIncrementalDisplayChanges) and the trash view.Steps used to test these changes
dotnet build src/Files.App -f net10.0-desktop: 0 errors.scripts/linux/compat-off-check.sh: no new keys; ratcheted with--update.headless-run.sh, showcase drives and seed). Each step passed: browse Documents; copy summary.txt into Reports; move todo.txt into Notes; trash readme.txt; restore it from the Recycle Bin; browse into Projects.zip (via the address bar) and into its Projects folder;exec touch/rmin Documents (the item appears and then disappears); search "inventory"; Properties of the result. The files on disk were checked afterwards.🤖 Generated with Claude Code
https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY