Skip to content

Commit 766a98b

Browse files
fix(queue): preserve save validation after main merge
1 parent 7de0ad1 commit 766a98b

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎apps/mobile/src/state/thread-task-permissions.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ vi.mock("../lib/attachmentUpload", () => ({ prepareTurnAttachments: vi.fn() }));
7474
vi.mock("../lib/uuid", () => ({ uuidv4: () => "uuid" }));
7575
vi.mock("./queued-run-edit", () => ({
7676
useQueuedRunEdit: () => null,
77+
useQueuedRunEditSaving: () => false,
7778
getQueuedRunEdit: () => null,
7879
useSavedQueuedEditDrafts: () => [],
7980
useQueuedEditRecovery: () => null,

‎apps/server/src/orchestration-v2/Orchestrator.ts‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9394,11 +9394,13 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
93949394
cause: "A guest's message cannot be edited. Cancel it instead.",
93959395
});
93969396
}
9397-
yield* ensureGoalCommandSupported(
9398-
command,
9399-
{ text: command.text, attachments: command.attachments ?? queuedMessage.attachments },
9400-
queuedRun.providerInstanceId,
9401-
);
9397+
if (command.type === "queued-run.edit") {
9398+
yield* ensureGoalCommandSupported(
9399+
command,
9400+
{ text: command.text, attachments: command.attachments ?? queuedMessage.attachments },
9401+
queuedRun.providerInstanceId,
9402+
);
9403+
}
94029404
const queuedTurnItem = projection.turnItems.find(
94039405
(candidate) => candidate.type === "user_message" && candidate.messageId === queuedMessage.id,
94049406
);

‎apps/web/src/components/chat/useQueuedRunEdit.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ export function useQueuedRunEdit(input: {
389389
clearEditDraft(editing.runId);
390390
focusComposerSoon();
391391
});
392+
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- keeps the edit projection watch and recovery toast in sync with server ownership after navigation
392393
useEffect(() => {
393394
if (editing === null || activeThreadId !== editing.threadId || isSaving) return;
394395
watchQueuedEdit(routeThreadRef, threadDraftTarget, editing);

0 commit comments

Comments
 (0)