auto-fix: preserve _setActivePaneIdleIfOwner permissive-fallback disjunct from PR #1753

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 <dso2ng@users.noreply.github.com>
This commit is contained in:
nesquena-hermes
2026-05-06 22:02:37 +00:00
parent 98a6f88ef7
commit fc5423f4aa
+1 -1
View File
@@ -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('');