Skip to content

feat(sidebar): add a connect-to-server dialog with optional pinning - #1726

Merged
l0gicgate merged 7 commits into
lgse:mainfrom
Musheer0:feat/add-network-location
Oct 17, 2026
Merged

l0gicgate merged 7 commits into
lgse:mainfrom
Musheer0:feat/add-network-location

Conversation

@Musheer0

@Musheer0 Musheer0 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Strata could open smb://, sftp://, ftp://, and davs:// URIs typed into the location bar, but there was no discoverable way to add a network location or keep one a click away. The Network sidebar row's context menu now offers Connect to server…, which opens a dialog with a server address field and a Pin to sidebar checkbox. Without the checkbox it connects once, like typing the address in the location bar; with it, the share is also pinned.

  • Connect keeps the dialog open until there is an outcome, with a fresh spinner on every attempt (GTK 4.24 leaves a restarted spinner blank or frozen) and failures held for at least one second so a quick retry still visibly runs. The address, checkbox and Connect button are disabled and the dialog spinner runs while the location is validated, mounted, and authenticated. Authentication prompts stack above it.
  • Invalid addresses and connection failures (unknown host, refused, timed out, missing GVfs backend) are shown inline under the address. No second error dialog opens, and the user can correct the address and retry. Cancelling an authentication prompt returns to the dialog.
  • Cancel, the close button, and Escape cancel the pending validation or mount, so nothing opens afterwards.
  • The pin is written only once the location opens, in the form the bookmarks file reloads, so Unpin removes it later. Pins are never removed when a mount goes away (fix(sidebar): remove pins after deleting folders #1373, feat(ui): enable pin action in file properties and add navigate_location #67).
  • The network:/// root is now titled Network (localized) in its column, breadcrumbs, and window title instead of network:.
  • With nothing pinned, the sidebar no longer shows an empty PINNED heading. The section appears only while a file drag is over the sidebar, so dragging a folder in still pins it.

Dialog strings are localized in all eleven supported languages.

Visual evidence

Before (contributor's recording: the dialog closes on Connect with no feedback, and the column reads network:):
https://github.com/user-attachments/assets/b6ddb8ab-4b13-4934-b49d-f74f85fa841d

After: screenshots pending upload by the maintainer (connecting state, inline error, Network column title).

How to test

  1. Right-click the Network row in the sidebar and choose Connect to server….
  2. Enter nonsense and press Connect: an inline validation error appears and the dialog stays open.
  3. Enter an unreachable address such as sftp://10.255.255.1/share and press Connect: the fields and Connect disable and the spinner runs. Press Cancel: the dialog closes and nothing opens later.
  4. Enter sftp://nonexistent.invalid/share and press Connect: the dialog stays open with "That host couldn’t be found…" under the address. No pin is added.
  5. Enter a reachable share, tick Pin to sidebar, and press Connect (authenticate if asked): the dialog closes once the share opens and a row appears under Pinned. Unpin on that row removes it.
  6. Disconnect or unmount the share: its pinned row stays and remounts the share when clicked.
  7. Click Network: the column and window title read Network.
  8. With nothing pinned, the sidebar shows no PINNED heading. Drag a folder over the sidebar: the section appears, and dropping on it pins the folder.

Expected result: The dialog always reports an outcome before closing, cancellation never opens the location later, and network locations are pinned only after they open and stay pinned until the user unpins them.

Related issue

Closes #1725

Add "Add network location…" to the Network row's context menu with a
modal dialog that validates a single URI and, on request, pins the
location to the sidebar only after the location loads successfully.
Failed mounts and rejected loads never leave a bookmark behind, and the
stored pin is normalized through GIO so the sidebar row matches the
bookmark parser's form and unpins cleanly on a later removal.

Unmount, eject, or externally removing a network mount also unpins the
matching location, gated to network schemes so removable-media pins
survive and skipped when the same root is still mounted. Ship the
localized dialog strings in all eleven supported languages.
@wmfeht

wmfeht commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Keeping pins for network locations that are unmounted or unreachable is intentional (#1373, #67). A mount disappearing doesn't mean the user is done with that location: the server may be rebooting, the network may have dropped, GVfs may have timed out, or they may have disconnected for now and plan to come back. A pin is also the quickest way back in, since clicking a pinned share remounts it. Pins live in the GTK bookmarks file that Nautilus and other apps share, so removing one automatically takes it away everywhere, and the user has no idea why. That's why cleanup only happens for confirmed deletions, never because a mount went away.

Could you drop the mount_removed unpin handler so pins are only removed when the user asks for it?

…ends

Connect now locks the form and shows the dialog spinner until the location
opens or fails. Validation, mount and authentication failures appear inline
in the dialog instead of a second error dialog, and Cancel or Escape cancels
the pending validation or mount. The pin is written only once the location
opens, which replaces the event-tracking PinTracker.

Pins are no longer removed when a network mount goes away, since a pin is
the quickest way back to a share that is temporarily unavailable.

The network:/// root is now titled "Network" in columns, breadcrumbs and the
window title, and the untranslatable URI placeholder left the catalogs.
With nothing pinned, the sidebar showed a Pinned heading over an empty
gap. The section now stays hidden and appears only while a file drag is
over the sidebar, so dragging a folder in still pins it.
GTK 4.24 leaves a spinner that was stopped and hidden blank or frozen
when it is started again, so retries after a failed connect showed no
working spinner. Each attempt now swaps in a fresh spinner.

GTK's spinner also fades in over about a second, so a retry that fails
at once looked as if Connect did nothing. A failure now holds the dialog
busy for at least one second before showing its error.
The dialog connects to a server and only pins it when asked, so it is now
"Connect to server…" with a "Pin to sidebar" checkbox, matching the
sidebar's Pinned and Unpin wording and reusing the existing translation.
@l0gicgate l0gicgate changed the title feat(sidebar): add network location entry with pinning feat(sidebar): add a connect-to-server dialog with optional pinning Oct 17, 2026
@l0gicgate
l0gicgate merged commit 4654392 into lgse:main Oct 17, 2026
9 checks passed
@Musheer0

Copy link
Copy Markdown
Contributor Author

Keeping pins for network locations that are unmounted or unreachable is intentional (#1373, #67). A mount disappearing doesn't mean the user is done with that location: the server may be rebooting, the network may have dropped, GVfs may have timed out, or they may have disconnected for now and plan to come back. A pin is also the quickest way back in, since clicking a pinned share remounts it. Pins live in the GTK bookmarks file that Nautilus and other apps share, so removing one automatically takes it away everywhere, and the user has no idea why. That's why cleanup only happens for confirmed deletions, never because a mount went away.

Could you drop the mount_removed unpin handler so pins are only removed when the user asks for it?

My bad my laptop had suddenly gone off probably due to motherboard issue while I was working on solution so i couldn't fix it

l0gicgate added a commit that referenced this pull request Oct 20, 2026
…ompat-followups

Resolves the catalog, services, preview test, context menu, theme and
typed-navigation conflicts, and adapts what main added since the fork to
this branch's rules:

- The user stylesheet (#1758) is watched through the monitors worker and
  re-read off the UI thread.
- The Diagnostics page (#1735) and the Integrations page (#1748) detect
  the package manager and resolve the terminal off the UI thread; the
  Run-in-terminal button spawns through the reaper closure.
- Connect to server (#1726) waits for a native path's asynchronous
  validation instead of pinning and closing at once.
- The pinned-places tests read the GTK bookmarks file through
  adapters::bookmarks after the settings writer settles.
- Traditional Chinese (#1745) gets the strings this branch adds.
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.

Add a network location entry to the Network sidebar row

3 participants