New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gui: Use discovered IDs from cache when adding a new remote device #8382
Merged
calmh
merged 3 commits into
syncthing:main
from
acolomb:gui-discovery-from-cache-when-adding
Jul 22, 2022
Merged
gui: Use discovered IDs from cache when adding a new remote device #8382
calmh
merged 3 commits into
syncthing:main
from
acolomb:gui-discovery-from-cache-when-adding
Jul 22, 2022
Conversation
This file contains 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
The GUI already does refreshDiscoveryCache() when it comes online and on every 10 second refresh cycle. Querying the same information freshly in addDevice() seems unnecessary and adds some more round-trip delay on a possibly slow network link. Instead use the IDs from the existing discoveryCache property to populate the suggested ID list.
For the auto-completion list, which is hidden by default and filtered by the browser, we can offer more discovered device IDs without causing much confusion. The list of suggested "nearby" devices is still limited to the first five.
The old name "discovery" was pretty ambiguous..
Ping. Review please? |
calmh
approved these changes
Jul 22, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
calmh
added a commit
to calmh/syncthing
that referenced
this pull request
Jul 26, 2022
* main: lib/model, lib/config: Apply sensible defaults for auto-accepted encrypted folder (fixes syncthing#8296) (syncthing#8427) gui: Move filesystem watcher explanation from tooltip to help block (syncthing#8432) gui: Use discovered IDs from cache when adding a new remote device (syncthing#8382) build: Update goleveldb (syncthing#8440)
calmh
added a commit
to calmh/syncthing
that referenced
this pull request
Jul 28, 2022
* main: cmd/syncthing, lib/config: Remove restartOnWakeup option & functionality (fixes syncthing#8448) (syncthing#8449) gui: Remove blank meta tags (syncthing#8362) gui: Add device sync status (fixes syncthing#7981) (syncthing#8401) gui: Fix detailed staggered versioning information in folder info (ref syncthing#8348) (syncthing#8433) all: Support syncing ownership (fixes syncthing#1329) (syncthing#8434) gui, man, authors: Update docs, translations, and contributors lib/model, lib/config: Apply sensible defaults for auto-accepted encrypted folder (fixes syncthing#8296) (syncthing#8427) gui: Move filesystem watcher explanation from tooltip to help block (syncthing#8432) gui: Use discovered IDs from cache when adding a new remote device (syncthing#8382) build: Update goleveldb (syncthing#8440) gui, man, authors: Update docs, translations, and contributors cmd/syncthing/cli: Add show discovery command (fixes syncthing#8007) (syncthing#8378) gui, man, authors: Update docs, translations, and contributors lib/osutil: Only announce address of interfaces which are up (fixes syncthing#7458) (syncthing#8422) gui: Fix missing span end tag and missing nbsp semicolon in HTML (syncthing#8419)
st-review
added
the
frozen-due-to-age
Issues closed and untouched for a long time, together with being locked for discussion
label
Jul 22, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
frozen-due-to-age
Issues closed and untouched for a long time, together with being locked for discussion
ui
Issues related to the graphical user interface
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.
Purpose
The GUI already does
refreshDiscoveryCache()
when it comes online and on every 10 second refresh cycle. Querying the same information freshly inaddDevice()
seems unnecessary and adds some more round-trip delay on a possibly slow network link. Instead use the IDs from the existingdiscoveryCache
property to populate the suggested ID list.Increase maximum suggested device ID count to 100, only for the auto-completion list. It is hidden by default and filtered
by the browser, so we can offer more discovered device IDs without causing much disturbance. The list of suggested "nearby" devices is still limited to the first five.
Testing
Manual GUI testing with locally discovered, not yet added devices.