Skip to content

Commit 8eef7b8

Browse files
only21milclaude
andcommitted
fix(client): say when a pending request blocks Resume
Requests with no approval or question card left Resume hidden with no reason; the composer placeholder now names the blocker on web and mobile. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 1349ce1 commit 8eef7b8

6 files changed

Lines changed: 21 additions & 8 deletions

File tree

‎apps/mobile/src/features/threads/NewTaskDraftScreen.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,7 @@ export function NewTaskDraftScreen(props: {
983983
onRemoveDraftImage={flow.removeAttachment}
984984
onStopThread={() => {}}
985985
onResumeQueue={null}
986+
resumeBlocked={false}
986987
onSendMessage={handleStart}
987988
onReconnectEnvironment={() => onReconnectEnvironment(selectedProject.environmentId)}
988989
canSwitchThreadProvider

‎apps/mobile/src/features/threads/ThreadDetailScreen.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ export interface ThreadDetailScreenProps {
281281
readonly onStopThread: () => void;
282282
/** Present while the thread's queue is held. */
283283
readonly onResumeQueue: (() => Promise<void>) | null;
284+
readonly resumeBlocked: boolean;
284285
readonly onSendMessage: (
285286
followUp?: ActiveTurnComposerAction,
286287
beforeDispatch?: (
@@ -1693,7 +1694,9 @@ function ThreadDetailBody(props: ThreadDetailScreenProps) {
16931694
? props.activePendingApproval.supportsFeedback
16941695
? "Send feedback to decline this request"
16951696
: "Send a message to decline and redirect the agent"
1696-
: "Ask anything"
1697+
: props.resumeBlocked
1698+
? "A pending request blocks Resume. Send a message instead."
1699+
: "Ask anything"
16971700
}
16981701
contentMaxWidth={contentMaxWidth}
16991702
draftControls={props.draftMode?.controls}

‎apps/mobile/src/features/threads/ThreadRouteScreen.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,7 @@ function ThreadRouteContent(
11101110
serverConfig={serverConfig}
11111111
onStopThread={awaitingBootstrapTurn ? handleCancelWorktreeSetup : handleStopThread}
11121112
onResumeQueue={composer.canResume ? handleResumeQueue : null}
1113+
resumeBlocked={composer.resumeBlocked}
11131114
onSendMessage={composer.onSendMessage}
11141115
onReconnectEnvironment={handleReconnectEnvironment}
11151116
canSwitchThreadProvider={composer.canSwitchThreadProvider}

‎apps/mobile/src/state/use-thread-composer-state.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ export function useThreadComposerState() {
369369
const canResume = selectedThreadProjection
370370
? canResumeThread(selectedThreadProjection.projection, resumableRunId, queueHeld)
371371
: queueHeld;
372+
const resumeBlocked = resumableRunId !== null && !canResume;
372373

373374
const runlessWorkStartedAt = selectedThreadProjection
374375
? deriveRunlessWorkStartedAt(selectedThreadProjection.projection)
@@ -759,6 +760,7 @@ export function useThreadComposerState() {
759760
queueHeld,
760761
resumableRunId,
761762
canResume,
763+
resumeBlocked,
762764
queuedRunEdit,
763765
isSavingQueuedEdit,
764766
cancelQueuedRunEdit,

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,7 @@ export default function ChatView(props: ChatViewProps) {
821821
const canResume =
822822
serverProjection !== null &&
823823
canResumeThread(serverProjection, resumableRunId, hasHeldQueuedRuns);
824+
const resumeBlocked = resumableRunId !== null && !canResume;
824825
const parentSubagentThreadId =
825826
activeThread?.lineage.relationshipToParent === "subagent"
826827
? activeThread.lineage.parentThreadId
@@ -3609,6 +3610,7 @@ export default function ChatView(props: ChatViewProps) {
36093610
isResuming
36103611
}
36113612
canResume={canResume}
3613+
resumeBlocked={resumeBlocked}
36123614
isRevertingCheckpoint={isRevertingCheckpoint}
36133615
sendDisabledReason={
36143616
!canOperateThread

‎apps/web/src/components/chat/ChatComposer.tsx‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ export interface ChatComposerProps {
375375
canInterrupt: boolean;
376376
isSendBusy: boolean;
377377
canResume: boolean;
378+
resumeBlocked: boolean;
378379
isRevertingCheckpoint?: boolean;
379380
sendDisabledReason: string | null;
380381
isPreparingWorktree: boolean;
@@ -527,6 +528,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
527528
canInterrupt,
528529
isSendBusy,
529530
canResume,
531+
resumeBlocked,
530532
isRevertingCheckpoint = false,
531533
sendDisabledReason: externalSendDisabledReason,
532534
isPreparingWorktree,
@@ -3377,13 +3379,15 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
33773379
? isChoiceOnlyPendingQuestion
33783380
? "Choose an option above"
33793381
: "Type your own answer, or leave this blank to use the selected option"
3380-
: showPlanFollowUpPrompt && activeProposedPlan
3381-
? "Add feedback to refine the plan, or leave this blank to implement it"
3382-
: projectSelectionRequired
3383-
? "Choose a project above to start a thread"
3384-
: showProviderUnavailable
3385-
? "Enable a provider in Settings to send a message"
3386-
: DEFAULT_COMPOSER_PLACEHOLDER
3382+
: resumeBlocked
3383+
? "A pending request blocks Resume. Send a message instead."
3384+
: showPlanFollowUpPrompt && activeProposedPlan
3385+
? "Add feedback to refine the plan, or leave this blank to implement it"
3386+
: projectSelectionRequired
3387+
? "Choose a project above to start a thread"
3388+
: showProviderUnavailable
3389+
? "Enable a provider in Settings to send a message"
3390+
: DEFAULT_COMPOSER_PLACEHOLDER
33873391
}
33883392
disabled={
33893393
projectSelectionRequired ||

0 commit comments

Comments
 (0)