Skip to content

feat: removed external dependencies (VPN, mutagen) connection management #111

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ibetitsmike
Copy link
Contributor

Closes: #68

@ibetitsmike ibetitsmike requested a review from deansheather May 28, 2025 15:14
@@ -189,7 +189,7 @@ private void SyncSessionStateChanged(object? sender, SyncSessionControllerStateM
UpdateSyncSessionState(syncSessionState);
}

private void MaybeSetUnavailableMessage(RpcModel rpcModel, CredentialModel credentialModel)
private void MaybeSetUnavailableMessage(RpcModel rpcModel, CredentialModel credentialModel, SyncSessionControllerStateModel? syncSessionState = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should just update the couple of places we call it to always include the sync model, otherwise if we get an RPC update after a sync update we will potentially unset UnavailableMessage

Comment on lines +3 to +10
using Coder.Desktop.App.Views.Pages;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System;
using System.Diagnostics;
using System.Threading.Tasks;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you use any of these new imports? It doesn't seem like you're using any new types (except maybe System.Exception) in the code

Comment on lines +33 to +35
<TextBlock TextWrapping="Wrap" Foreground="Red" Visibility="{x:Bind ViewModel.ReconnectFailed, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
<Bold>Reconnect failed</Bold>
</TextBlock>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just do TextWeight instead? See TrayWindowMainPage.xaml and look at the Workspaces header (I think)

Comment on lines +2 to +4
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be unnecessary


syncSessionCts.Dispose();
}, CancellationToken.None);
_ = Task.Delay(5000).ContinueWith((_) =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add a comment explaining why we do this. I think the explanation of "it seems to be a race" is good enough for now

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.

App hanging when losing connection to system service
2 participants