fix: batch of review findings — dead install button, history pollution, TUI completion interference, ssh split session kill, scrollback live apply, zmodem second transfer, sftp shell quoting, replay buffer leak, release guards

This commit is contained in:
Bill committed 2026-09-14 02:20:40 +08:00
1 parent e6fc021903
commit 6c100542c5
11 files changed
+130 -19

No files matched your search

+7 -3
View File
@@ -21,7 +21,9 @@ const DEFAULT_SYSTEM: SystemSettings = {
launchAtLogin: false,
preventSleep: false,
globalShowHide: '',
closeAction: 'ask',
// Must match DEFAULT_SETTINGS.system in @shared/settings — an "ask" here made
// a fresh install prompt on close while the docs and UI promised tray.
closeAction: 'tray',
autoCheckUpdate: true
}
@@ -43,9 +45,11 @@ function isHighlightRule(value: unknown): value is HighlightRule {
}
function sanitizeRules(value: unknown): HighlightRule[] {
// An explicit empty array is a valid choice ("no highlighting"); only
// malformed data falls back to the built-in rules. Returning the defaults for
// [] made deleting the last rule look like it silently failed.
if (!Array.isArray(value)) return DEFAULT_HIGHLIGHT_RULES
const rules = value.filter(isHighlightRule)
return rules.length > 0 ? rules : DEFAULT_HIGHLIGHT_RULES
return value.filter(isHighlightRule)
}
function deepMerge(raw: unknown): { settings: AppSettings; errors: string[] } {