+
+ {dynamicStatus(props.journey.nextAction)}
+ {generationFailed && }
+ {(props.controller.error || props.externalError) && {props.controller.error || props.externalError}
}
+
+ );
+ }
const action = props.journey.nextAction;
const heading = actionHeading(action);
const asksQuestion = action.kind === "ask_baseline_evidence" || action.kind === "ask_adaptive_evidence";
diff --git a/frontend/src/hooks/use-birth-time-automatic-journey-effects.ts b/frontend/src/hooks/use-birth-time-automatic-journey-effects.ts
new file mode 100644
index 00000000..5766fb9b
--- /dev/null
+++ b/frontend/src/hooks/use-birth-time-automatic-journey-effects.ts
@@ -0,0 +1,125 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import { fallbackQuestionCopy } from "@/lib/birth-time-guide-agent";
+import {
+ generateDynamicBirthTimeQuestion,
+ pollBirthTimeScoring,
+ requestBirthTimeGuidePrompt,
+} from "@/lib/birth-time-journey-client";
+import type { JourneyClientResponse } from "@/lib/birth-time-journey-client";
+import {
+ createIdentityRequestCache,
+ publishCurrentJourney,
+ scheduleCancellableStart,
+} from "@/lib/birth-time-guided-effect-coordinator";
+import { runBirthTimeScoringPoll, scoringPollDelay } from "@/lib/birth-time-guided-polling";
+
+type AutomaticEffectsInput = {
+ readonly journey: JourneyClientResponse | null;
+ readonly latest: { current: JourneyClientResponse | null };
+ readonly preview: boolean;
+ readonly pollRun: number;
+ readonly generationRun: number;
+ readonly onJourney: (journey: JourneyClientResponse) => void;
+ readonly setError: (message: string) => void;
+};
+
+const guideRequests = createIdentityRequestCache