Skip to content
TypeScript

fix(mobile): a dev server left running no longer shows the waiting bolt (#15194)

Jake Leventhala0bf1eee48d1
diff --git a/apps/mobile/src/features/threads/ThreadDetailScreen.tsx b/apps/mobile/src/features/threads/ThreadDetailScreen.tsx
index 623ae734053..8b9e061f39a 100644
--- a/apps/mobile/src/features/threads/ThreadDetailScreen.tsx
+++ b/apps/mobile/src/features/threads/ThreadDetailScreen.tsx
@@ -474,11 +474,12 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
}
if (pendingBackgroundWork !== null && contentPresentationKind === "ready") {
return {
- kind: "waiting",
+ kind: "background",
label: pendingBackgroundWork.title,
accessibilityLabel: `${pendingBackgroundWork.title}: ${pendingBackgroundWork.items
.map((item) => item.label)
.join(", ")}`,
+ waiting: pendingBackgroundWork.waiting,
};
}
return null;
diff --git a/apps/mobile/src/features/threads/floating-working-control.tsx b/apps/mobile/src/features/threads/floating-working-control.tsx
index 3538949c9d2..95ea8ca5534 100644
--- a/apps/mobile/src/features/threads/floating-working-control.tsx
+++ b/apps/mobile/src/features/threads/floating-working-control.tsx
@@ -385,16 +385,18 @@ function FloatingStatusLabel(props: {
</StatusLabelRow>
);
}
- if (props.status.kind === "waiting") {
+ if (props.status.kind === "background") {
return (
<StatusLabelRow
- key="waiting"
+ key="background"
accessibilityLabel={props.status.accessibilityLabel}
className="gap-2"
onLayout={props.onLayout}
>
+ {/* A dev server can run for hours after the agent is done, so only work
+ that will wake the agent gets the bolt. */}
<SymbolView
- name={{ ios: "bolt", android: "bolt" }}
+ name={props.status.waiting ? { ios: "bolt", android: "bolt" } : "terminal"}
size={13}
tintColorClassName="foreground"
type="monochrome"
diff --git a/apps/mobile/src/features/threads/floating-working-status.ts b/apps/mobile/src/features/threads/floating-working-status.ts
index 428add7bf3e..8d682cad842 100644
--- a/apps/mobile/src/features/threads/floating-working-status.ts
+++ b/apps/mobile/src/features/threads/floating-working-status.ts
@@ -9,8 +9,14 @@ export type FloatingWorkingStatus =
| { readonly kind: "working"; readonly startedAt: string }
| { readonly kind: "syncing"; readonly label: string }
| { readonly kind: "compacting" }
- // The turn settled while background work it started still runs.
- | { readonly kind: "waiting"; readonly label: string; readonly accessibilityLabel: string }
+ // The turn settled while background work it started still runs. `waiting`
+ // is false when only commands remain, such as a dev server: the agent is done.
+ | {
+ readonly kind: "background";
+ readonly label: string;
+ readonly accessibilityLabel: string;
+ readonly waiting: boolean;
+ }
// A task whose thread the server has not created yet: the worktree may
// still be checking out, so there is no turn to time.
| { readonly kind: "preparing"; readonly label: string }