From 9fbb63fd8afcc039f5dcf98652820fea8659bf72 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 15 Oct 2026 19:33:57 +0700 Subject: [PATCH 1/5] fix(smv): tab navigation is passive; only explicit capture action opens viewer --- MainWindow.xaml.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 1aa9b24a6..5899fa107 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -859,7 +859,9 @@ private void MainTabs_SelectionChanged(object sender, SelectionChangedEventArgs } else if (MainTabs.SelectedIndex == EngineeringNavigationRoute.SmvWorkspaceIndex) { - ActivateSelectedSmvWorkspace(); + // Switching tabs must never start Npcap discovery or SV capture. + // The explicit Open SMV Capture command retains the fast workflow. + PrepareSelectedSmvWorkspace(); } UpdateNavigationVisuals(MainTabs.SelectedIndex, animate: true); From dd997cca97284fab3f2bb94a5a37c416dbe738ca Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 15 Oct 2026 19:34:00 +0700 Subject: [PATCH 2/5] fix(smv): tab navigation is passive; only explicit capture action opens viewer --- MainWindow.IedSmvQuickStart.cs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/MainWindow.IedSmvQuickStart.cs b/MainWindow.IedSmvQuickStart.cs index 55cbeda2b..44b491472 100644 --- a/MainWindow.IedSmvQuickStart.cs +++ b/MainWindow.IedSmvQuickStart.cs @@ -95,12 +95,39 @@ private void IedSmvQuickStart_Click(object sender, RoutedEventArgs e) OpenSmvWorkspaceForDevice(device); } + /// + /// Present an inert tab landing state. A selection change must not create + /// a viewer, enumerate Npcap adapters or begin a passive wire capture. + /// + private void PrepareSelectedSmvWorkspace() + { + if (SmvWorkspaceStatus is null) return; + if (SelectedDevice is not { } selected) + { + SmvWorkspaceStatus.Text = + "Select an IED in Device Explorer, then press Open SMV Capture."; + return; + } + + if (_activeSmvViewerWindow is { IsLoaded: true } viewer && + viewer.DeviceId.Equals(selected.DeviceId, StringComparison.OrdinalIgnoreCase)) + { + SmvWorkspaceStatus.Text = + $"SMV viewer is already open for {selected.Name}; snapshot retained."; + return; + } + + SmvWorkspaceStatus.Text = + $"Ready for {selected.Name} · press Open SMV Capture to inspect adapters and streams."; + } + private void ActivateSelectedSmvWorkspace() { if (SelectedDevice is { } device) OpenSmvWorkspaceForDevice(device); else if (SmvWorkspaceStatus is not null) - SmvWorkspaceStatus.Text = "Select an IED in Device Explorer, then open SMV capture."; + SmvWorkspaceStatus.Text = + "Select an IED in Device Explorer, then press Open SMV Capture."; } private void OpenSmvCapture_Click(object sender, RoutedEventArgs e) From 41a6549d2c091a2368f381e5a8f7dd9d33ab4388 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 15 Oct 2026 19:34:03 +0700 Subject: [PATCH 3/5] fix(smv): tab navigation is passive; only explicit capture action opens viewer --- .../M214OperatorNavigationRoutingTests.cs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/ARSAS.Tests/M214OperatorNavigationRoutingTests.cs b/tests/ARSAS.Tests/M214OperatorNavigationRoutingTests.cs index a385445fe..f11505995 100644 --- a/tests/ARSAS.Tests/M214OperatorNavigationRoutingTests.cs +++ b/tests/ARSAS.Tests/M214OperatorNavigationRoutingTests.cs @@ -76,6 +76,32 @@ public void SmvNav_ReusesExistingDeviceViewer_NotAnotherDecoderOrPoller() Assert.DoesNotContain("new MmsClientSession", source); } + [Fact] + public void SelectingSmvTab_DoesNotAutoOpenWindowOrStartNpcapCapture() + { + var main = File.ReadAllText(Find("MainWindow.xaml.cs")); + const string tabRoute = + "MainTabs.SelectedIndex == EngineeringNavigationRoute.SmvWorkspaceIndex"; + var index = main.IndexOf(tabRoute, StringComparison.Ordinal); + Assert.True(index >= 0); + var branch = main[index..Math.Min(main.Length, index + 380)]; + Assert.Contains("PrepareSelectedSmvWorkspace();", branch); + Assert.DoesNotContain("ActivateSelectedSmvWorkspace();", branch); + + var viewer = File.ReadAllText(Find("MainWindow.IedSmvQuickStart.cs")); + var prepareStart = viewer.IndexOf("private void PrepareSelectedSmvWorkspace()", + StringComparison.Ordinal); + var explicitStart = viewer.IndexOf("private void ActivateSelectedSmvWorkspace()", + prepareStart, StringComparison.Ordinal); + Assert.True(prepareStart > 0 && explicitStart > prepareStart); + var passive = viewer[prepareStart..explicitStart]; + Assert.DoesNotContain("OpenSmvWorkspaceForDevice", passive); + Assert.DoesNotContain("ListAdapters", passive); + Assert.DoesNotContain("new SmvViewerWindow", passive); + Assert.Contains("=> ActivateSelectedSmvWorkspace();", viewer); + Assert.Contains("window.EnableFastWorkflow(adapter, routeDetail);", viewer); + } + private static string Find(string path) { for (DirectoryInfo? d = new(AppContext.BaseDirectory); d != null; d = d.Parent) From c2f096f1d59c1e61e0a9319b5c706d333a7e3627 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 15 Oct 2026 19:38:30 +0700 Subject: [PATCH 4/5] fix(gui): use existing signal-waveform glyph for SMV instead of retired Live Monitor icon --- MainWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MainWindow.xaml b/MainWindow.xaml index 24bc6d710..881abf2fe 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -120,7 +120,7 @@