Conversation
- UpdateMode 默认值从 2 改为 0(避免未经用户同意自动更新) - IsVelopackInstalled 从属性改为方法,避免每次访问创建 UpdateManager - 移除 UpdateViewModel 中重复的 ResolveAndPersistRecommendedChannel 调用 - 检查更新前和失败时清除缓存,防止使用过期更新信息 - 复用 UpdateService 实例(通道未变时不重复创建) - CI Restore 步骤添加 -p:WindowsPackageType=None 与 Build 保持一致 Co-authored-by: WSXYT <102407247+WSXYT@users.noreply.github.com>
Co-authored-by: WSXYT <102407247+WSXYT@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issues from PR and enhance project best practices
fix: address PR #4 review findings — update safety, service lifecycle, CI consistency
Mar 2, 2026
- NavigateTo 现遍历 FooterMenuItems,修复设置页导航选中不同步 - ShowInfo 清除上次 ShowInfoWithAction 残留的 ActionButton - DebounceSave 释放旧 CancellationTokenSource 避免资源泄漏 - AutoStartHelper XML 转义用户名和路径防止注入 - DashboardViewModel.Dispose 添加 GC.SuppressFinalize Co-authored-by: WSXYT <102407247+WSXYT@users.noreply.github.com>
Co-authored-by: WSXYT <102407247+WSXYT@users.noreply.github.com>
Copilot
AI
changed the title
fix: address PR #4 review findings — update safety, service lifecycle, CI consistency
Fix bugs and harden codebase: navigation sync, InfoBar state, CTS leak, XML injection, Dispose pattern
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Full codebase audit fixing correctness bugs, a resource leak, a security issue, and Dispose pattern violations.
PR #4 review fixes
AppSettings.UpdateModedefault 2→0: Prevented silent auto-update+restart without user consentIsVelopackInstalled: Property→method to avoidUpdateManagerinstantiation on every accessResolveAndPersistRecommendedChannel: Single call site inApp.OnLaunched;UpdateViewModelreads persisted setting directlyUpdateViewModelcache hygiene: Clear_cachedUpdateon failure; reuseUpdateServicevia_lastCheckedPrereleasetracking-p:WindowsPackageType=Nonetodotnet restoreto matchdotnet build --no-restoreCodebase-wide audit fixes
MainWindow.NavigateToignoresFooterMenuItems: Settings (in footer) never got nav selection synced. Fix:MenuItems.Concat(FooterMenuItems)MainWindow.ShowInfoleaksActionButton: AfterShowInfoWithAction, subsequentShowInfocalls left the old button visible. Fix:GlobalInfoBar.ActionButton = nullAppSettings.DebounceSaveCTS leak + race: OldCancellationTokenSourcewas canceled but never disposed; concurrentSet<T>calls raced on_saveCts. Fix:Interlocked.Exchange+ DisposeAutoStartHelper.CreateTaskXML injection: Username/path interpolated raw into XML template. Fix:SecurityElement.Escape()on all dynamic valuesDashboardViewModel.Dispose: MissingGC.SuppressFinalize(this)🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.