From 2e2f4df8933101bc8b25ac7c90fdc113156cd63a Mon Sep 17 00:00:00 2001 From: Duncan Date: Wed, 2 Sep 2026 15:21:26 -0400 Subject: [PATCH] docs(agents): enumerate authoritative delivery-failure statuses in stale comments agentSessionTypes.ts deliveryFailed doc and LifecycleActivity.tsx PermissionDecisionButtons doc block still claimed every non-sent control_result increments the failure token / re-enables buttons. Update both to name the three authoritative statuses (no_active_turn, channel_closed, no_channel) and note that channel_full is transient and does not increment the token, matching the reducer and component comments fixed in 965980093. Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- .../ui/activityRenderClasses/LifecycleActivity.tsx | 9 ++++++--- desktop/src/features/agents/ui/agentSessionTypes.ts | 13 ++++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/desktop/src/features/agents/ui/activityRenderClasses/LifecycleActivity.tsx b/desktop/src/features/agents/ui/activityRenderClasses/LifecycleActivity.tsx index 1be598ee1e..629ad51a01 100644 --- a/desktop/src/features/agents/ui/activityRenderClasses/LifecycleActivity.tsx +++ b/desktop/src/features/agents/ui/activityRenderClasses/LifecycleActivity.tsx @@ -71,9 +71,12 @@ function defaultOptionLabel(kind: string): string { * Renders the agent's exact options as labeled buttons; a click sends the * `permission_decision` control event (fire-and-forget). * - * On send failure (relay reject or non-`sent` delivery status), buttons are - * re-enabled so the user can retry. The harness's 300 s fail-closed timeout - * is the backstop for permanently lost frames. + * On authoritative delivery failure (`no_active_turn`, `channel_closed`, + * `no_channel`), buttons are re-enabled so the user can retry. The transient + * `channel_full` status does NOT re-enable buttons — the retransmit + * orchestrator handles that status automatically and keeps resending. The + * harness's 300 s fail-closed timeout is the backstop for permanently lost + * frames. */ function PermissionDecisionButtons({ agentPubkey, diff --git a/desktop/src/features/agents/ui/agentSessionTypes.ts b/desktop/src/features/agents/ui/agentSessionTypes.ts index 78c97353b5..e8118b03a0 100644 --- a/desktop/src/features/agents/ui/agentSessionTypes.ts +++ b/desktop/src/features/agents/ui/agentSessionTypes.ts @@ -162,11 +162,14 @@ export type TranscriptItem = */ options?: Array<{ optionId: string; kind: string; label?: string }>; /** - * Monotonically increasing token incremented on every `control_result` - * with a non-`sent` delivery status. The `PermissionDecisionButtons` - * component keys its re-enable effect on this value, so a second failure - * after a retry (same boolean value would not re-trigger the effect) - * still re-enables the buttons. `undefined` when no failure has occurred. + * Monotonically increasing token incremented on every authoritative + * `control_result` delivery failure (`no_active_turn`, `channel_closed`, + * `no_channel`). The transient `channel_full` status does NOT increment + * this token — the retransmit orchestrator handles that status + * automatically. The `PermissionDecisionButtons` component keys its + * re-enable effect on this value, so a second failure after a retry + * (same boolean value would not re-trigger the effect) still re-enables + * the buttons. `undefined` when no failure has occurred. */ deliveryFailed?: number; } & TranscriptItemIdentity)