Public Access
Merge branch 'claude/distracted-ritchie-53fc70'
Bounds the renderer wait, so a WebView2 that never initialises reports itself instead of hanging Connect with the busy flag stuck. Conflict resolution, all of it in the App test suite, which main had changed under the branch when sleepy-chebyshev landed: - The workspace fixture keeps main's fake SSH factory and its FakeRenderer-aware page, and takes the branch's RendererTimeout on top. One second rather than the branch's 250 ms, because the timeout now also bounds FakeRenderer's own wait for the attach it just made. - FakeRenderer arrived on main after the branch was cut and still called the no-argument WaitForRendererAsync. Both sides merged cleanly and left the build broken; it now passes its own token. - ConnectingWithNoRenderer's remark claimed the suite never starts the workspace and never attaches a renderer. Both are false here, so it now says what is true of the test: it is the one connect test that attaches no renderer.
This commit is contained in:
@@ -604,13 +604,14 @@ internal sealed partial class VaultViewModel(
|
||||
/// <remarks>
|
||||
/// The renderer has to be attached before a session opens: the transport drops frames when nothing is
|
||||
/// connected, so a session opened earlier would lose its <c>SessionOpened</c> frame and then stream
|
||||
/// output at a terminal that was never created.
|
||||
/// output at a terminal that was never created. That wait is bounded and takes this command's token, so
|
||||
/// a renderer that never arrives ends as a message rather than as a window stuck on "Connecting…".
|
||||
/// </remarks>
|
||||
private async Task OpenSessionAsync(HostRowViewModel row, CancellationToken cancellationToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
await workspace.WaitForRendererAsync().ConfigureAwait(true);
|
||||
await workspace.WaitForRendererAsync(cancellationToken).ConfigureAwait(true);
|
||||
|
||||
var request = new SshConnectionRequest(
|
||||
row.Host.Hostname,
|
||||
@@ -630,6 +631,14 @@ internal sealed partial class VaultViewModel(
|
||||
// UI instead of the remote shell.
|
||||
SessionOpened?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
catch (TimeoutException)
|
||||
{
|
||||
// The renderer never attached, so nothing was connected. Reported here rather than left to
|
||||
// RunAsync's generic handler because TimeoutException says only "The operation has timed out",
|
||||
// and the one thing worth saying is where to look: a runtime this application does not install.
|
||||
Status = "The terminal did not start, so nothing was connected. The Microsoft Edge WebView2 "
|
||||
+ "runtime is probably missing or blocked; install it and try again.";
|
||||
}
|
||||
catch (SshHostKeyUnknownException exception)
|
||||
{
|
||||
// First contact. The user has to decide, and they need the fingerprint to do it.
|
||||
|
||||
Reference in New Issue
Block a user