authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-27 18:02:09-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-27 18:08:18-08:00
log21c823ecdc63ebfae0226f174f639191a971cd85
tree623e0cd51ac562eb4251e9225b1721629454e107
parent80498f1709e05caa744716b740fdcaa884bef8e0

Guard delayed terminal exit callback

- Skip `onSessionExited` if exit handling was reset before timeout runs - Prevent stale async exit callbacks from firing in terminal drawer

1 files changed, 3 insertions(+), 0 deletions(-)

apps/web/src/components/ThreadTerminalDrawer.tsx+3
......@@ -349,6 +349,9 @@ function TerminalViewport({
349349 }
350350 hasHandledExitRef.current = true;
351351 window.setTimeout(() => {
352 if (!hasHandledExitRef.current) {
353 return;
354 }
352355 onSessionExitedRef.current();
353356 }, 0);
354357 }