UI polish: real About version, remove dead quick-help and TrendPlot remnants, fix crashes and handler leaks - #173
Conversation
- About dialog: read MinVer's AssemblyInformationalVersion (stripping +commitsha build metadata) instead of the frozen MAJOR.0.0.0 AssemblyVersion, with fallback to the old value - Remove dead context-sensitive quick help feature: delete QuickHelpDialog, drop IKeybindingActions.ShowQuickHelp and its MainWindow implementation, and fix the stale HelpDialog tip text - Remove TrendPlot remnants from PR #164: enum value, switch arms, test assertion, and doc comment mention - Program.cs: validate config path before Application.Init so the error is visible, and dispose MainWindow in a try/finally - ScopeView: skip X-axis labels that cannot fit instead of crashing with ArgumentException in tiny terminals - LogView: unsubscribe Logger.LogAdded in Dispose - MainWindow: store the Application.SizeChanging handler in a field and unsubscribe it in Dispose - NodeDetailsView: guard against stale async attribute responses overwriting a newer selection - Remove unwired MainWindow.OnClientDisconnected and rename the File menu item "Start Recording..." to "Toggle Recording" (wired to the toggle handler to match Ctrl+R) https://claude.ai/code/session_012Vopnd9vWkzELveHRgZhie
Code ReviewOverall: clean, well-scoped polish PR. The motivations are clear, the diff is focused, and it successfully avoids the areas touched by #167/#171. A few items worth noting: Issues1. The diff for 2. "Stop Recording" menu item is now redundant ( After renaming "Start Recording..." → "Toggle Recording", the menu still contains a separate "Stop Recording" item directly below it: new MenuItem("Toggle Recording", "", ToggleRecording, shortcutKey: Key.R.WithCtrl),
new MenuItem("Stop Recording", "", () => OnStopRecordingRequested()),With 3. Verify The stale-response guard in Minor4. Unnecessary null check in if (_logger != null)
{
_logger.LogAdded -= OnLogAdded;
}
What's Good
|
…enu item - Replace a literal NUL byte in HelpDialog's dedup key with the \0 escape sequence (same runtime string) so git stops treating the file as binary - the NUL predates this branch but blocked diff review - Drop the File-menu 'Stop Recording' item: 'Toggle Recording' already stops an active recording, leaving the second item with no distinct purpose https://claude.ai/code/session_012Vopnd9vWkzELveHRgZhie
Code ReviewThis is a well-scoped, focused polish pass. All changes address real bugs or remove dead code, and the PR description is thorough. Since this is already merged, the following is post-merge feedback for the team's awareness. Strengths
Minor Issues1. The diff shows 2.
3. Inconsistent null check in The 4. The menu now calls SummaryAll bug fixes are correct and the dead code removal is thorough. The two actionable follow-ups are the |
Summary
UI/CLI polish pass from the v1.0 follow-up review (
docs/V1-REVIEW-FOLLOWUP.md, items 14–15 + the UI lows). Deliberately avoids the MainWindow connect/load regions and the OpcUa files touched by #167/#171 so it merges cleanly alongside them.AssemblyInformationalVersionAttribute(full MinVer semver,+metadatastripped) instead of AssemblyVersion, which MinVer pins toMAJOR.0.0.0— v1.0.1 would have displayed "v1.0.0" forever.ShowQuickHelp, yet HelpDialog's tip text advertised it.QuickHelpDialog.csdeleted, the action removed fromIKeybindingActions/MainWindow, tip text fixed.KeybindingManagerswitch arms, the test assertion, and the stray doc-comment mention.Program.csconfig-not-found path: the check now runs beforeApplication.Init()— previously the error was written into the alternate screen (lost on shutdown) and the constructed MainWindow leaked.Disposeis now exception-safe via try/finally.Math.Clamp(min > max)in ~13-column terminals.LogViewunsubscribesLogger.LogAdded; MainWindow unsubscribes the staticApplication.SizeChanginghandler (now stored in a field) in Dispose.MainWindow.OnClientDisconnected; the File-menu recording item is now "Toggle Recording" and actually toggles (it previously said "Start Recording..." while Ctrl+R toggled).Test plan
dotnet build Opcilloscope.sln -c Release— 0 warnings, 0 errorsdotnet test -c Release— 613/613 passing (full suite incl. integration)Part of the v1 follow-up punch list (
docs/V1-REVIEW-FOLLOWUP.md, items 14–15 + lows).https://claude.ai/code/session_012Vopnd9vWkzELveHRgZhie
Generated by Claude Code