Skip to content

Commit 37535e3

Browse files
authored
Merge branch 'main' into feat/cursor-usage
2 parents 4fbc8e0 + 82b8a93 commit 37535e3

4 files changed

Lines changed: 60 additions & 13 deletions

File tree

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

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -257,14 +257,16 @@ export function PendingUserInputCard(props: PendingUserInputCardProps) {
257257
<Text className="font-sans text-base leading-snug text-neutral-950 dark:text-neutral-50">
258258
{question.question}
259259
</Text>
260-
<View className="flex-row flex-wrap gap-2.5">
260+
<View className="gap-2">
261261
{question.options.map((option) => {
262262
const selected = isPendingUserInputOptionSelected(draft, option.label);
263+
const description =
264+
option.description !== option.label ? option.description : undefined;
263265
return (
264266
<Pressable
265267
key={option.label}
266268
className={cn(
267-
"rounded-full border px-3 py-2.5 ",
269+
"min-h-12 w-full rounded-2xl border px-3.5 py-3",
268270
selected
269271
? "border-blue-300/50 bg-blue-50 dark:border-blue-400/28 dark:bg-blue-400/14"
270272
: "border-neutral-200 bg-white dark:border-white/6 dark:bg-neutral-950/70",
@@ -277,16 +279,23 @@ export function PendingUserInputCard(props: PendingUserInputCardProps) {
277279
)
278280
}
279281
>
280-
<Text
281-
className={cn(
282-
"font-t3-bold text-sm",
283-
selected
284-
? "text-sky-700 dark:text-sky-300"
285-
: "text-neutral-600 dark:text-neutral-300",
286-
)}
287-
>
288-
{option.label}
289-
</Text>
282+
<View className="min-w-0 flex-1 gap-0.5">
283+
<Text
284+
className={cn(
285+
"font-t3-bold text-sm",
286+
selected
287+
? "text-sky-700 dark:text-sky-300"
288+
: "text-neutral-700 dark:text-neutral-200",
289+
)}
290+
>
291+
{option.label}
292+
</Text>
293+
{description ? (
294+
<Text className="font-sans text-sm leading-5 text-neutral-500 dark:text-neutral-400">
295+
{description}
296+
</Text>
297+
) : null}
298+
</View>
290299
</Pressable>
291300
);
292301
})}

‎apps/server/src/orchestration/ThreadBackgroundLiveness.test.ts‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@ import { describe, expect, it } from "vite-plus/test";
22
import * as ThreadBackgroundLiveness from "./ThreadBackgroundLiveness.ts";
33

44
describe("ThreadBackgroundLiveness", () => {
5+
it("does not let status-free progress restart an idle task", () => {
6+
const liveness = ThreadBackgroundLiveness.make();
7+
liveness.recordTaskLiveness({
8+
threadId: "thread",
9+
taskId: "task",
10+
taskType: undefined,
11+
status: undefined,
12+
kind: "started",
13+
});
14+
liveness.recordTaskLiveness({
15+
threadId: "thread",
16+
taskId: "task",
17+
taskType: undefined,
18+
status: "idle",
19+
kind: "updated",
20+
});
21+
liveness.recordTaskLiveness({
22+
threadId: "thread",
23+
taskId: "task",
24+
taskType: undefined,
25+
status: undefined,
26+
kind: "progress",
27+
});
28+
expect(liveness.getThreadBackgroundLiveness("thread")).toBeNull();
29+
});
30+
531
it("agents present as working; monitors as monitoring; agents win", () => {
632
const liveness = ThreadBackgroundLiveness.make();
733
const threadId = "t-live-1";

‎apps/server/src/orchestration/ThreadBackgroundLiveness.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,19 @@ export function make(): ThreadBackgroundLivenessService["Service"] {
130130
return;
131131
}
132132

133+
// Status-free progress is a description tick, not a restart. A delayed
134+
// progress event after idle must not put the task back in the live set
135+
// (#7128).
136+
if (input.kind === "progress" && input.status === undefined) {
137+
const existing = stateByThreadId.get(input.threadId);
138+
const stillLive =
139+
existing !== undefined &&
140+
(existing.agents.has(input.taskId) || existing.monitors.has(input.taskId));
141+
if (!stillLive) {
142+
return;
143+
}
144+
}
145+
133146
drop(input.threadId, input.taskId);
134147
const state = stateFor(input.threadId);
135148
const bucket =

‎apps/web/src/workspaceBasenameLookup.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,5 @@ describe("claimWorkspaceBasenameLookup", () => {
8888
it("stays valid while it is the only claim", () => {
8989
const only = claimWorkspaceBasenameLookup();
9090
expect(only()).toBe(true);
91-
expect(only()).toBe(true);
9291
});
9392
});

0 commit comments

Comments
 (0)