Repository navigation
feat: put desktop icons back in place after a console session - #167
Merged
Merged
Conversation
Changing the primary display and disconnecting screens can make Explorer reshuffle the desktop icons. Their positions are now read through the shell's folder view before the session and put back after the desk is restored, a few times in the background while Explorer settles. Skipped when the desktop arranges icons automatically. On by default, with a toggle in both settings screens. Closes #30 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: Reviewed the full PR diff, including the Shell COM icon snapshot/move implementation, session restore scheduling, its setting and localization, and the pure layout tests.
- Shell icon positioning: Reads desktop item positions before display changes and repositions surviving icons after restore, unless Windows auto-arranges them.
- Restore lifecycle and setting: Adds a default-on setting in both desktop and console UI, then retries asynchronously after restoring the desk.
- Supporting coverage and documentation: Adds layout tests, six-language strings and guide text, and a manual Windows checklist.
gpt-6-luna | 𝕏
This was referenced Oct 25, 2026
This was referenced Oct 29, 2026
Closed
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.

Closes #30.
Changing the primary display (every hide mode does it) and disconnecting screens can make Explorer reshuffle the desktop icons. Console Mode already restores the layout and the primary, but not the icons.
What changes
Native/DesktopIcons.cs: reads and moves icons through the shell's own view of the desktop (IShellWindows→ desktopIShellBrowser→IFolderView:GetItemPosition/SelectAndPositionItems), keyed by the parsing name (path or::{CLSID}). Each call runs on its own STA thread with a 10 s cap. Skipped when the desktop has Auto arrange icons on.ConsoleEngine.Startreads the positions before any screen changes.Stopputs them back in the background after the desk is restored: three passes (1.5 s, 4 s and 8 s), because Explorer can rearrange more than once. The restore itself doesn't wait for this.DesktopIconLayout.Moves(pure, tested) picks the saved icons that are still there but in a different place. Icons added or removed during the session are left alone.RestoreDesktopIcons, on by default) in desktop Settings and in the Console System tab, next to "Send Steam to the tray". Strings are in all 6 catalogs; the GUIDE paragraph is in all 6 languages; TESTING.md has a new checklist.Verified
dotnet test: 502 passed (7 new).🤖 Generated with Claude Code