-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add remote directory picker to file sync #73
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
base: main
Are you sure you want to change the base?
Conversation
Adds a new remote directory picker window used when creating a file sync to select the remote directory.
It's ready for review, just need to finish the few TODOs |
@@ -1,7 +1,6 @@ | |||
using System.Diagnostics; | |||
using Coder.Desktop.App.Models; | |||
using Coder.Desktop.App.Services; |
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.
using Coder.Desktop.App.Services; | |
using Coder.Desktop.App.Services; | |
using Coder.Desktop.CoderSdk.Coder; |
{ | ||
new() | ||
{ | ||
Name = "(root)", |
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.
In the Windows native file explorer, this is rendered as "🖥️ This PC" --- I think just 🖥️ would look a little more friendly and nice than (root).
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.
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.
I like it!
TextTrimming="CharacterEllipsis" | ||
IsTextTrimmedChanged="TooltipText_IsTextTrimmedChanged" | ||
Margin="0,0,0,10" /> | ||
<ProgressRing |
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.
This is a nice touch
[RelayCommand] | ||
private void StartCreatingNewSession() | ||
{ | ||
ClearNewForm(); | ||
// Ensure we have a fresh hosts list before we open the form. | ||
SetAvailableHostsFromRpcModel(_rpcController.GetState()); |
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.
It might be a little annoying to find that the available hosts only updates when you click the button to create a new session. I could imagine starting up a workspace, then creating a new session to find your workspace isn't yet listed. To get it to populate you need to cancel out, then wait for it to start, maybe by watching the tray menu, then create a new sync session.
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.
If any entries get added or removed while the selector is broken it messes up the selector
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.
lame. I guess we can see if it's annoying in practice.
@@ -534,25 +538,44 @@ private void StartDaemonProcess() | |||
Directory.CreateDirectory(_mutagenDataDirectory); | |||
var logPath = Path.Combine(_mutagenDataDirectory, "daemon.log"); | |||
var logStream = new StreamWriter(logPath, true); | |||
try |
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.
Can you refactor this into a separate PR? It doesn't have anything to do with the remote picker.
_daemonProcess?.Dispose(); | ||
_logWriter?.Dispose(); | ||
_daemonProcess = null; | ||
_logWriter = null; |
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.
If we throw an exception starting the daemon, the logStream
never gets turned into _logWriter
and will leave open the logfile, which makes retries fail.
Adds a new remote directory picker window used when creating a file sync to select the remote directory.
NVIDIA_Overlay_LplyNOug3n.mp4
TODOs:
Closes #27