From 4946978057f9c07672026cf38ced400a1bcbbb2b Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 28 Aug 2026 11:16:48 -0700 Subject: [PATCH] test(terminal): repoint the STA-5505 window-close scope pin at its new file The confirmNativeWindowClose block moved out of Terminal.tsx with the rest of the prompt; the source-text pin followed it, with an indent anchor so a nested copy cannot satisfy it. --- src/renderer/src/lib/shutdown-checkpoint-guard.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/lib/shutdown-checkpoint-guard.test.ts b/src/renderer/src/lib/shutdown-checkpoint-guard.test.ts index eb83d7f9cf2..8a44ce196cd 100644 --- a/src/renderer/src/lib/shutdown-checkpoint-guard.test.ts +++ b/src/renderer/src/lib/shutdown-checkpoint-guard.test.ts @@ -190,10 +190,13 @@ describe('createShutdownCheckpointGuard', () => { it('runs the quit checkpoint inside the window-close scope and surfaces a vetoed quit (STA-5505/#15352)', () => { const source = readFileSync( - join(process.cwd(), 'src/renderer/src/components/Terminal.tsx'), + join( + process.cwd(), + 'src/renderer/src/components/terminal/window-close-running-process-prompt.tsx' + ), 'utf8' ) - const closeStart = source.indexOf('const confirmNativeWindowClose = useCallback(() => {') + const closeStart = source.indexOf(' const confirmNativeWindowClose = useCallback(() => {') const closeEnd = source.indexOf('window.api.ui.confirmWindowClose()', closeStart) expect(closeStart).toBeGreaterThanOrEqual(0) expect(closeEnd).toBeGreaterThan(closeStart)