Skip to content

Commit a715a67

Browse files
fix(mobile): offer Resume for a stopped or limited run with nothing queued
Match web: show Resume whenever the latest run can be continued, not only when the queue is held, and resume the queue only when runs are held. Label the button "Resume thread" like web and update the composer guide. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 2da282f commit a715a67

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
956956
) : showResumeAction ? (
957957
<ComposerActionButton
958958
size={usesLargeControls ? "large" : "regular"}
959-
accessibilityLabel="Resume queue"
959+
accessibilityLabel="Resume thread"
960960
icon="play"
961961
disabled={!props.canOperateThread || resumingQueue}
962962
onPress={() => void handleResumeQueue()}
@@ -1159,7 +1159,7 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
11591159
) : showResumeAction && voicePresentation.showsSend ? (
11601160
<ComposerActionButton
11611161
size={usesLargeControls ? "large" : "regular"}
1162-
accessibilityLabel="Resume queue"
1162+
accessibilityLabel="Resume thread"
11631163
icon="play"
11641164
disabled={!props.canOperateThread || resumingQueue}
11651165
onPress={() => void handleResumeQueue()}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ function ThreadRouteContent(
727727
dispatchMode: "start",
728728
},
729729
});
730-
if (failed(continued)) return;
730+
if (failed(continued) || !composer.queueHeld) return;
731731
}
732732
failed(
733733
await resumeThreadQueue({
@@ -1119,7 +1119,9 @@ function ThreadRouteContent(
11191119
onRemoveDraftImage={composer.onRemoveDraftImage}
11201120
serverConfig={serverConfig}
11211121
onStopThread={awaitingBootstrapTurn ? handleCancelWorktreeSetup : handleStopThread}
1122-
onResumeQueue={composer.queueHeld ? handleResumeQueue : null}
1122+
onResumeQueue={
1123+
composer.queueHeld || composer.resumableRunId !== null ? handleResumeQueue : null
1124+
}
11231125
onSendMessage={composer.onSendMessage}
11241126
onReconnectEnvironment={handleReconnectEnvironment}
11251127
canSwitchThreadProvider={composer.canSwitchThreadProvider}

‎docs/user/composer.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ images. **Send now** sends a message right away, into the running turn if there
211211
also edit or remove it.
212212

213213
If you stop the agent or the server restarts, queued messages keep their order and are held.
214-
Press **Resume** in an empty composer on web and desktop, or **Resume queue** on mobile, to
215-
continue. Sending a new message also resumes the queue, unless it steers a turn that is already
214+
Press **Resume** in an empty composer to continue. Sending a new message also resumes the queue, unless it steers a turn that is already
216215
running. You can edit or remove held messages without starting them.
217216

218217
The pencil on a queued message opens it in the composer for editing. The original message

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ describe("thread execution presentation", () => {
8282
lastError: "Plan limit reached",
8383
lastErrorClass: "usage_limit",
8484
});
85+
expect(deriveResumableRunId(projection, deriveThreadRuntime(projection))).toBe(failed.id);
8586
expect(
8687
deriveThreadRuntime({
8788
...projection,

0 commit comments

Comments
 (0)