From fc5423f4aa2ae8b87116573775c2d6f02f8db56b Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Wed, 6 May 2026 22:02:37 +0000 Subject: [PATCH] auto-fix: preserve _setActivePaneIdleIfOwner permissive-fallback disjunct from PR #1753 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #1753 (shipped v0.51.12) introduced the 3-way OR guard in done/error/cancel handlers: 'isActiveSession || !S.session || !INFLIGHT[S.session.session_id]'. The third disjunct ('no other inflight on the active pane') is the permissive fallback Opus stage-306 verified — it allows the active pane to idle when no other session is running, even when the completing stream is from a different session. PR #1761's centralizing helper _setActivePaneIdleIfOwner inadvertently dropped this disjunct, so a user viewing pane A (idle) while pane B completes in the background would not get pane A's composer state cleared. Restored: _setActivePaneIdleIfOwner now checks the same 3-way OR. Verified via: - node -c static/messages.js — clean - pytest tests/test_session_runtime_ownership_invariants.py tests/test_1694_terminal_cleanup_ownership.py — 9 passed Co-authored-by: dso2ng --- static/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/messages.js b/static/messages.js index 8756fb93..03698087 100644 --- a/static/messages.js +++ b/static/messages.js @@ -382,7 +382,7 @@ function attachLiveStream(activeSid, streamId, uploaded=[], options={}){ _clearActivePaneInflightIfOwner(); } function _setActivePaneIdleIfOwner(){ - if(_isActiveSession()||!S.session){ + if(_isActiveSession()||!S.session||!INFLIGHT[S.session.session_id]){ setBusy(false); setComposerStatus(''); if(typeof setStatus==='function') setStatus('');