| … | … | @@ -16,6 +17,7 @@ export function isTerminalCloseConfirmPending(): boolean { | |
| 16 | 17 | export async function confirmTerminalClose( | |
| 17 | 18 | labels: readonly [string, ...string[]], | |
| 18 | 19 | ): Promise<boolean> { | |
| 20 | + | if (!getClientSettings().confirmTerminalClose) return true; | |
🟡 Medium lib/terminalCloseConfirm.ts:20
Immediately after reload, a persisted confirmTerminalClose: false is treated as true, so the first close action opens the destructive confirmation dialog despite the user's saved opt-out. getClientSettings() returns schema defaults until asynchronous settings hydration completes; await hydration, with an intentional fallback policy, before reading this preference.
No longer relevant as of f29ad8636c45e7cb331f47db2a242a40803b0a28
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
Fixed in f29ad8636c. Terminal close now waits for client settings hydration before reading the preference, with pending state covering the hydration wait. If saved settings cannot be loaded, it retains the destructive confirmation. Added regression tests for delayed hydration of a saved opt-out and storage failure; 25 focused tests, web typecheck, and scoped lint pass.