diff --git a/apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx b/apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx index 3f552c1f0c46c..dd979f3855cbc 100644 --- a/apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx +++ b/apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx @@ -891,21 +891,23 @@ function TaskForm({ }); }} /> - - option.selection.instanceId === draft.modelSelection?.instanceId && - option.selection.model === draft.modelSelection?.model, - )?.label ?? - draft.modelSelection?.model ?? - (modelOptions.length ? "Choose model" : "No models available") - } - onPress={() => navigation.navigate("SettingsScheduledTaskModel")} - disabled={saving || dictationPending || environmentUnavailable} - /> + {draft.threadId === null ? ( + + option.selection.instanceId === draft.modelSelection?.instanceId && + option.selection.model === draft.modelSelection?.model, + )?.label ?? + draft.modelSelection?.model ?? + (modelOptions.length ? "Choose model" : "No models available") + } + onPress={() => navigation.navigate("SettingsScheduledTaskModel")} + disabled={saving || dictationPending || environmentUnavailable} + /> + ) : null} diff --git a/apps/web/src/components/settings/ScheduledTasksSettings.browser.test.tsx b/apps/web/src/components/settings/ScheduledTasksSettings.browser.test.tsx index ca8192dd894e3..14f96b43ef850 100644 --- a/apps/web/src/components/settings/ScheduledTasksSettings.browser.test.tsx +++ b/apps/web/src/components/settings/ScheduledTasksSettings.browser.test.tsx @@ -215,4 +215,20 @@ describe("ScheduledTasksSettings", () => { await expect.element(dialog.getByRole("heading", { name: "New task" })).toBeInTheDocument(); await expect.element(name).toHaveValue("My draft"); }); + + it("offers the model only while the task is not bound to a thread", async () => { + setup(); + await using _screen = await render(); + const dialog = page.getByRole("dialog"); + const model = dialog.getByRole("button", { name: "Choose model" }); + await expect + .element(dialog.getByText("Each run continues this conversation", { exact: false })) + .toBeVisible(); + await expect.element(model).not.toBeInTheDocument(); + + await userEvent.click(dialog.getByRole("combobox", { name: "Destination" })); + await userEvent.click(page.getByRole("option", { name: "New thread each run" })); + + await expect.element(model).toBeEnabled(); + }); }); diff --git a/apps/web/src/components/settings/ScheduledTasksSettings.tsx b/apps/web/src/components/settings/ScheduledTasksSettings.tsx index fd4f7702d68ab..464d8536a51d7 100644 --- a/apps/web/src/components/settings/ScheduledTasksSettings.tsx +++ b/apps/web/src/components/settings/ScheduledTasksSettings.tsx @@ -1245,7 +1245,7 @@ function ScheduledTaskDestination({ : "The first run starts a thread with the workspace and model below. Later runs post there, each in a fresh session without earlier runs' context." : threadMode === "continue" ? "Each run continues this conversation, in its workspace and with its current model." - : "Each run starts a fresh session in this thread, without earlier runs' context."; + : "Each run starts a fresh session in this thread, with its current model and without earlier runs' context."; return ( {onThreadModeChange ? ( @@ -1766,24 +1766,26 @@ function ScheduledTaskEditorForm({ /> - -
- - setDraft((current) => ({ ...current, modelKey: `${instanceId}:${model}` })) - } - /> -
-
+ {draft.threadId === "" ? ( + +
+ + setDraft((current) => ({ ...current, modelKey: `${instanceId}:${model}` })) + } + /> +
+
+ ) : null}
{task?.schedule.type === "interval" && diff --git a/docs/user/project-settings.md b/docs/user/project-settings.md index e0377c11938a5..f65875dca4946 100644 --- a/docs/user/project-settings.md +++ b/docs/user/project-settings.md @@ -90,7 +90,8 @@ Under **Destination**, choose where runs go. **New thread each run** keeps every run separate. The two one-thread choices start a thread on the first run and post later runs there: one continues the same conversation, the other starts each run in a fresh session that doesn't see earlier runs, so the thread stays readable -without the agent's context growing. To move a one-thread task, pick another +without the agent's context growing. Once the thread exists, runs use its current +model, so the task no longer offers a model choice. To move a one-thread task, pick another thread in its project under **Destination**. Moving such a task to another project starts a new thread there on its next run.