chore: version packages

Red tab alerts track the dialog, not the keyboard: typing no longer clears them, and a dialog answered in the terminal resolves itself on the next listing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-08-17 01:46:48 +02:00
parent f4ba4d2cb1
commit f60bf93c99
10 changed files with 92 additions and 11 deletions
+11 -2
View File
@@ -858,7 +858,9 @@ class CodemanApp {
* is on screen, and looking at one does not answer it.
*/
markIdleAlertSeen(sessionId) {
if (!this.pendingHooks.get(sessionId)?.has('idle_prompt')) return;
// `pendingHooks?` because _ackDelivery calls this from the input hot path,
// which partial app instances (the vm-loaded delivery tests) also drive.
if (!this.pendingHooks?.get(sessionId)?.has('idle_prompt')) return;
this.clearPendingHooks(sessionId, 'idle_prompt');
this.acknowledgeIdleApprovalOnView?.(sessionId);
}
@@ -2957,7 +2959,14 @@ class CodemanApp {
this._updateConnectionIndicator();
}
}
this.clearPendingHooks?.(sessionId);
// ⚠️ IDLE ONLY, and acknowledged server-side rather than cleared in memory.
// Delivering input answers "Claude is waiting for a prompt" by definition,
// so this is the same "I am on it" signal as opening the tab. It does NOT
// answer a permission/question dialog: those ignore any keystroke that is
// not one of their options, so the dialog is still up and still needs you.
// Clearing action alerts here hid a LIVE alert on this device alone (the
// other devices stayed red and a reload re-seeded it straight back).
this.markIdleAlertSeen?.(sessionId);
}
/** Server input-ACK frame ({t:'ia',seq}) over the WebSocket. */
+14 -2
View File
@@ -3,7 +3,9 @@
*
* The cross-session queue of prompts waiting on a human (see
* web/approval-inbox.ts, docs/approvals-inbox-plan.md):
* - `GET /api/approvals`: pending items, ownership-scoped in multi-user mode
* - `GET /api/approvals`: pending items, ownership-scoped in multi-user mode,
* with a pane-capture staleness sweep (a dialog answered in the terminal is
* resolved here rather than re-arming a tab alert on the next page load)
* - `POST /api/approvals/:id/answer`: answer in place by sending the
* corresponding keystrokes to the session (digit / Esc / idle-prompt text)
* - `POST /api/approvals/:id/dismiss`: drop the item without keystrokes
@@ -72,7 +74,17 @@ export function registerApprovalRoutes(app: FastifyInstance, ctx: SessionPort):
approvalInbox.resolveForSession(item.sessionId, 'session_ended');
return false;
}
return canAccessOwned(user, session.owner);
if (!canAccessOwned(user, session.owner)) return false;
// Staleness sweep, on the caller's own items only. Claude Code fires no
// "permission answered" hook, so a dialog answered IN the terminal leaves
// its item pending until `stop`, and this list is what re-arms tab alerts
// on every page load: a red "needs you" would come back for a dialog that
// is long gone. The pane is the truth, so ask it, using the SAME
// conservative rule the answer path uses (`verifyStillAnswerable`): only
// an item whose original frame parsed options can be resolved this way, so
// an unreadable capture keeps the alert rather than dropping it. Resolving
// here broadcasts `approval:resolved`, so the other devices clear too.
return approvalInbox.verifyStillAnswerable(item.id);
});
return { success: true, data: { approvals } };
});