Skip to content

feat: show network locations already mapped by Windows - #211

Merged
nextestudios merged 1 commit into
mainfrom
feature/27-network-locations
Sep 27, 2026
Merged

nextestudios merged 1 commit into
mainfrom
feature/27-network-locations

Conversation

@nextestudios

Copy link
Copy Markdown
Owner

Summary

  • Mapped network drives now show on Home ("Unidades e dispositivos") and in Meu computador with the network symbol, the share name and path ("filmes (Z:)", "Rede · \nas\filmes"). Drives Windows remembers but isn't connected to (HKCU\Network, WNetGetConnection = ERROR_CONNECTION_UNAVAIL) show as "Rede · desconectada", never as an error; opening one lets Windows reconnect.
  • Network locations (%APPDATA%\Microsoft\Windows\Network Shortcuts, folders with target.lnk or loose .lnk) pointing to UNC shares are listed too (max 32, read without resolving the link on a short-lived STA thread with a 2 s timeout). WebDAV/FTP/local targets are ignored; targets go through the new NetworkPathPolicy (UNC only; \\?\, \\.\, .., invalid chars rejected).
  • Never blocks the UI / never probes: everything above is local information. Building Home no longer calls IsReady/free space on network drives (it could hang on a dead server); network drives never ask the Shell for an icon (IconRequest.For → symbol only); favorites/recents/quick-access checks skip network paths on the UI thread (IFileSystemProvider.IsNetworkPath, UNC or GetDriveType = remote); restored tabs (feat: persist open tabs between sessions #51) still check them off the UI thread. A server is only contacted when the user opens the place (async, Back cancels). No credentials stored, no SMB stack.
  • Docs: GUIDE pair, CHANGELOG pair, PRIVACY, TESTING ("Locais de rede (feat: show network locations already mapped by Windows #27)"), ui-redesign row.

Tests

  • CI unit: NetworkPathPolicyTests (accepted/rejected targets — untrusted input; network drives never request Shell icons), FavoritesJourneyTests::A_favorite_on_a_network_share_is_never_checked_on_the_ui_thread.
  • CI Windows integration: NetworkLocationIntegrationTests — net use <letter> \\localhost\C$ shows up as a network drive with its share and is browsable; a Network Shortcuts folder (temp dir) with a UNC target.lnk is listed and a local-target .lnk is ignored. (Skips with a reason if the runner can't map the admin share.)
  • Manual (docs/TESTING.md, not validated on a real network): real NAS, server off at startup, disconnected persistent mapping, "Add a network location", credentials.

Closes #27

🤖 Generated with Claude Code

Mapped network drives (connected or remembered but disconnected) and the
"Network locations" shortcuts to UNC shares are listed on Home and in This PC
with the network symbol and the share. Everything is read locally
(GetDriveType, WNetGetConnection, HKCU\Network, .lnk files): building Home no
longer queries network volumes, favorites on the network aren't checked on
the UI thread and network drives never ask the Shell for an icon.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nextestudios
nextestudios force-pushed the feature/27-network-locations branch from b830787 to fd9bed7 Compare September 27, 2026 22:44
@nextestudios
nextestudios merged commit b56f2f5 into main Sep 27, 2026
1 check passed
@nextestudios
nextestudios deleted the feature/27-network-locations branch September 27, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: show network locations already mapped by Windows

1 participant