The best way to control Claude Code, Codex and more from any computer or phone
feat(scheduled-tasks): tasks link to their thread (#31764)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Nov 5, 2026 at 20:07 UTC
4a087861d0764654c0e9f450f40015aea03d50a7
2 files changed
+40
-1
apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx
+14
@@ -18,7 +18,9 @@ import {
18
MAX_WEBHOOK_DELIVERY_AGE_MINUTES,
19
MAX_WEBHOOK_FILTERS,
20
resolveEnvironmentMachineKind,
21
+ scheduledTaskThreadMode,
22
} from "@t3tools/contracts";
23
+import { useSelectWorkspaceDetail } from "../layout/workspace/useSelectWorkspaceDetail";
24
import type { MenuAction } from "@react-native-menu/menu";
25
import { DateTimePicker } from "@expo/ui/community/datetime-picker";
26
import {
@@ -1412,6 +1414,7 @@ function EnvironmentTasks({
1414
label: "scheduled task delete",
1415
reportFailure: false,
1416
});
1417
+ const selectDetail = useSelectWorkspaceDetail();
1418
const failure = (title: string, result: AtomCommandResult<unknown, unknown>) => {
1419
if (result._tag === "Failure" && !isAtomCommandInterrupted(result)) {
1420
Dialog.alert(title, String(squashAtomCommandFailure(result)));
@@ -1493,6 +1496,9 @@ function EnvironmentTasks({
1496
<Menu
1497
actions={[
1498
{ id: "edit", title: "Edit" },
1499
+ ...(task.threadId !== null && scheduledTaskThreadMode(task) !== "new_thread"
1500
+ ? [{ id: "thread", title: "Open thread" }]
1501
+ : []),
1502
{
1503
id: "toggle",
1504
title: task.enabled ? "Pause" : "Resume",
@@ -1511,6 +1517,14 @@ function EnvironmentTasks({
1517
const action = nativeEvent.event;
1518
if (action === "edit") {
1519
onEdit(task);
1520
+ } else if (action === "thread" && task.threadId !== null) {
1521
+ selectDetail({
1522
+ name: "Thread",
1523
+ params: {
1524
+ environmentId: String(environmentId),
1525
+ threadId: String(task.threadId),
1526
+ },
1527
+ });
1528
} else if (action === "delete") {
1529
Dialog.alert("Delete task?", task.title, [
1530
{ text: "Cancel", style: "cancel" },
apps/web/src/components/settings/ScheduledTasksSettings.tsx
+26
-1
@@ -39,6 +39,7 @@ import {
39
MIN_SCHEDULED_TASK_INTERVAL_MS,
40
ProviderInstanceId,
41
resolveEnvironmentMachineKind,
42
+ scheduledTaskThreadMode,
43
} from "@t3tools/contracts";
44
import {
45
isAtomCommandInterrupted,
@@ -60,7 +61,8 @@ import {
61
useEnvironmentHttpBaseUrl,
62
type EnvironmentPresentation,
63
} from "../../state/environments";
63
-import { useProjects, useThreadShell } from "../../state/entities";
64
+import { useProjects, useQuietThreadShell, useThreadShell } from "../../state/entities";
65
+import { buildThreadRouteParams } from "../../threadRoutes";
66
import { scopeThreadRef } from "@t3tools/client-runtime/environment";
67
import { environmentAtomList, environmentIdsKey } from "../../state/environmentAtomList";
68
import { formatEnvironmentQueryError, useEnvironmentQuery } from "../../state/query";
@@ -787,6 +789,9 @@ function ScheduledTaskRow({
789
{task.lastRunStatus !== "never" ? (
790
<Badge variant={statusVariant(task.lastRunStatus)}>{task.lastRunStatus}</Badge>
791
) : null}
792
+ {task.threadId !== null && scheduledTaskThreadMode(task) !== "new_thread" ? (
793
+ <ScheduledTaskThreadLink environmentId={environmentId} threadId={task.threadId} />
794
+ ) : null}
795
{task.lastRunError ? <span className="text-destructive">{task.lastRunError}</span> : null}
796
</div>
797
}
@@ -847,6 +852,26 @@ function ScheduledTaskRow({
852
);
853
}
854
855
+function ScheduledTaskThreadLink({
856
+ environmentId,
857
+ threadId,
858
+}: {
859
+ readonly environmentId: EnvironmentId;
860
+ readonly threadId: ThreadId;
861
+}) {
862
+ const ref = scopeThreadRef(environmentId, threadId);
863
+ const title = useQuietThreadShell(ref)?.title.trim();
864
+ return (
865
+ <Link
866
+ to="/$environmentId/$threadId"
867
+ params={buildThreadRouteParams(ref)}
868
+ className="max-w-64 truncate underline underline-offset-2 hover:text-foreground"
869
+ >
870
+ {title || "Open thread"}
871
+ </Link>
872
+ );
873
+}
874
+
875
function WebhookDeliveriesDialog({
876
environmentId,
877
task,