[fix] dreamverse: recover steering after a blocked or failed prompt

When a steering prompt is refused by the enhancer (e.g. content-policy) or enhancement
fails for all providers, the backend enqueues nothing and won't re-emit prompt_sources_
blocked, leaving the UI stuck on the generating overlay. On prompt/fallback_used and
session/error in steering, return to the 'describe the next scene' state, drop the failed
scene from the history (steeringFailed), and surface a retry notice; clear the notice on
the next submit.
This commit is contained in:
alexzms
2026-07-15 23:20:22 +00:00
committed by Will Lin
parent 7b84041642
commit b6eafbea50
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -1513,7 +1513,7 @@ export default function Page() {
activeClipId: shouldUseArchivedPlaybackFallback() ? streamStore.get().activeClipId : "",
activePlaybackStartTime: shouldUseArchivedPlaybackFallback() ? streamStore.get().activePlaybackStartTime : 0,
});
sessionStore.patch({ livePromptDraft: "", waitingForSegmentPrompt: false });
sessionStore.patch({ livePromptDraft: "", waitingForSegmentPrompt: false, sessionNotice: "" });
}
function setLivePromptRewriteMode(enabled: boolean) {
+16
View File
@@ -99,7 +99,18 @@ export async function applyNormalizedSocketEvent(event: any, context: any): Prom
status: "ready_fallback",
source: payload.source || "user_raw",
text: payload.prompt,
// Steering: this prompt produced no segment — drop it from the scene list.
steeringFailed: true,
});
// Steering recovery: enhancement failed so the backend enqueued nothing AND won't
// re-emit prompt_sources_blocked (its drained flag is still set). Put the user back to
// "describe the next scene" ourselves so the generating overlay clears and they can retry.
if (!uiStore.get().simpleMode && sessionStore.get().manualContinuationMode) {
sessionStore.patch({
waitingForSegmentPrompt: true,
sessionNotice: "Couldn't continue from that prompt — try rephrasing the next scene.",
});
}
console.warn("[PromptEnhanceFallback] Prompt extension failed for this request.");
return;
@@ -486,6 +497,11 @@ export async function applyNormalizedSocketEvent(event: any, context: any): Prom
preservePlaybackOnClose: false,
promptExtensionError: "",
sessionNotice: errorMessage,
// Steering: a blocked/failed prompt produced no segment and the backend won't re-emit
// prompt_sources_blocked, so recover the "describe the next scene" state ourselves.
...(!uiStore.get().simpleMode && sessionStore.get().manualContinuationMode
? { waitingForSegmentPrompt: true }
: {}),
});
rewriteStore.patch({
rewritingSeedPrompts: false,