Skip to content

Commit dd8c95f

Browse files
fix(client): keep the Resume fix to hiding the blocked action
Drop the new composer placeholder wording and trim the eligibility table to the cases that guard the server's pending-request rule. AI-assisted; verified with the tests and tools listed above.
1 parent 6b67387 commit dd8c95f

7 files changed

Lines changed: 10 additions & 41 deletions

File tree

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,6 @@ export function NewTaskDraftScreen(props: {
10231023
onRemoveDraftImage={flow.removeAttachment}
10241024
onStopThread={() => {}}
10251025
onResumeQueue={null}
1026-
resumeBlocked={false}
10271026
onSendMessage={handleStart}
10281027
offersSideChat={false}
10291028
onReconnectEnvironment={() => onReconnectEnvironment(selectedProject.environmentId)}

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ export interface ThreadDetailScreenProps {
299299
readonly onStopThread: () => void;
300300
/** Present while the thread's queue is held. */
301301
readonly onResumeQueue: (() => Promise<void>) | null;
302-
readonly resumeBlocked: boolean;
303302
readonly offersSideChat: boolean;
304303
readonly onSendMessage: (
305304
followUp?: ActiveTurnComposerAction,
@@ -1871,9 +1870,7 @@ function ThreadDetailBody(
18711870
? props.activePendingApproval.supportsFeedback
18721871
? "Send feedback to decline this request"
18731872
: "Send a message to decline and redirect the agent"
1874-
: props.resumeBlocked
1875-
? "A pending request blocks Resume. Send a message instead."
1876-
: "Ask anything"
1873+
: "Ask anything"
18771874
}
18781875
contentMaxWidth={contentMaxWidth}
18791876
draftControls={props.draftMode?.controls(draftViewportHeight)}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,6 @@ function ThreadRouteContent(
10721072
serverConfig={serverConfig}
10731073
onStopThread={awaitingBootstrapTurn ? handleCancelWorktreeSetup : handleStopThread}
10741074
onResumeQueue={composer.canResume ? handleResumeQueue : null}
1075-
resumeBlocked={composer.resumeBlocked}
10761075
onSendMessage={composer.onSendMessage}
10771076
offersSideChat={composer.sideChatUnavailableReason === null}
10781077
onReconnectEnvironment={handleReconnectEnvironment}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,6 @@ export function useThreadComposerState(input: {
405405
const canResume = selectedThreadProjection
406406
? canResumeThread(selectedThreadProjection.projection, resumableRunId, queueHeld)
407407
: queueHeld;
408-
const resumeBlocked = resumableRunId !== null && !canResume;
409408

410409
const runlessWorkStartedAt = selectedThreadProjection
411410
? deriveRunlessWorkStartedAt(selectedThreadProjection.projection)
@@ -925,7 +924,6 @@ export function useThreadComposerState(input: {
925924
queueHeld,
926925
resumableRunId,
927926
canResume,
928-
resumeBlocked,
929927
queuedRunEdit,
930928
isSavingQueuedEdit,
931929
cancelQueuedRunEdit,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,6 @@ export default function ChatView(props: ChatViewProps) {
844844
const canResume =
845845
serverProjection !== null &&
846846
canResumeThread(serverProjection, resumableRunId, hasHeldQueuedRuns);
847-
const resumeBlocked = resumableRunId !== null && !canResume;
848847
const parentSubagentThreadId =
849848
activeThread?.lineage.relationshipToParent === "subagent"
850849
? activeThread.lineage.parentThreadId
@@ -3633,7 +3632,6 @@ export default function ChatView(props: ChatViewProps) {
36333632
isResuming
36343633
}
36353634
canResume={canResume}
3636-
resumeBlocked={resumeBlocked}
36373635
isRevertingCheckpoint={isRevertingCheckpoint}
36383636
sendDisabledReason={
36393637
!canOperateThread

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

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ export interface ChatComposerProps {
373373
canInterrupt: boolean;
374374
isSendBusy: boolean;
375375
canResume: boolean;
376-
resumeBlocked: boolean;
377376
isRevertingCheckpoint?: boolean;
378377
sendDisabledReason: string | null;
379378
isPreparingWorktree: boolean;
@@ -521,7 +520,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
521520
canInterrupt,
522521
isSendBusy,
523522
canResume,
524-
resumeBlocked,
525523
isRevertingCheckpoint = false,
526524
sendDisabledReason: externalSendDisabledReason,
527525
isPreparingWorktree,
@@ -2296,7 +2294,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
22962294
composerContextRecords.size === 0 &&
22972295
!isComposerApprovalState &&
22982296
!activePendingProgress &&
2299-
!resumeBlocked &&
23002297
!projectSelectionRequired &&
23012298
!showProviderUnavailable
23022299
? promptSuggestion
@@ -3400,8 +3397,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
34003397
/>
34013398
) : showProviderUnavailable ? (
34023399
"Enable a provider in Settings"
3403-
) : resumeBlocked ? (
3404-
"A pending request blocks Resume. Send a message instead."
34053400
) : (
34063401
"Ask anything..."
34073402
)}
@@ -3567,13 +3562,11 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
35673562
: activePendingProgress.activeQuestion?.options.length === 0
35683563
? "Type your answer"
35693564
: "Type your own answer, or leave this blank to use the selected option"
3570-
: resumeBlocked
3571-
? "A pending request blocks Resume. Send a message instead."
3572-
: projectSelectionRequired
3573-
? "Choose a project above to start a thread"
3574-
: showProviderUnavailable
3575-
? "Enable a provider in Settings to send a message"
3576-
: (offeredPromptSuggestion ?? DEFAULT_COMPOSER_PLACEHOLDER)
3565+
: projectSelectionRequired
3566+
? "Choose a project above to start a thread"
3567+
: showProviderUnavailable
3568+
? "Enable a provider in Settings to send a message"
3569+
: (offeredPromptSuggestion ?? DEFAULT_COMPOSER_PLACEHOLDER)
35773570
}
35783571
placeholderSuffix={
35793572
offeredPromptSuggestion !== null ? (

‎packages/client-runtime/src/state/threadExecution.test.ts‎

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,13 @@ const now = DateTime.makeUnsafe("2026-07-28T10:00:00.000Z");
4444
function request(
4545
id: string,
4646
status: OrchestrationV2RuntimeRequest["status"],
47-
kind: OrchestrationV2RuntimeRequest["kind"] = "command",
4847
): OrchestrationV2RuntimeRequest {
4948
return {
5049
id: RuntimeRequestId.make(id),
5150
nodeId: NodeId.make(`node-${id}`),
5251
providerTurnId: null,
5352
nativeRequestRef: null,
54-
kind,
53+
kind: "command",
5554
status,
5655
responseCapability: { type: "not_resumable", reason: "Session ended." },
5756
createdAt: now,
@@ -399,26 +398,12 @@ describe("thread execution presentation", () => {
399398
held: false,
400399
expected: false,
401400
},
402-
...(["resolved", "cancelled", "expired"] as const).map((status) => ({
403-
name: `only a request now ${status}`,
404-
requests: [request("approval", status)],
405-
runId: "run-stopped",
406-
held: false,
407-
expected: true,
408-
})),
409-
{
410-
name: "a pending request no card shows",
411-
requests: [request("auth", "pending", "auth_refresh")],
412-
runId: "run-stopped",
413-
held: false,
414-
expected: false,
415-
},
416401
{
417-
name: "an older pending request among settled ones",
418-
requests: [request("older", "pending"), request("newer", "resolved")],
402+
name: "only a resolved request",
403+
requests: [request("approval", "resolved")],
419404
runId: "run-stopped",
420405
held: false,
421-
expected: false,
406+
expected: true,
422407
},
423408
{
424409
name: "a held queue behind a blocked continuation",

0 commit comments

Comments
 (0)