Questions about an analysis or forecast, answered by the model that wrote it
CI / test (push) Successful in 1m5s
CI / build (push) Successful in 4m56s
CI / deploy (push) Skipped

- 3 questions in every package, +5 questions add-on (1 000 Ft); question units, refund on failure
- The answer sees the chart data, the analysis and earlier questions; at most 250 words
- Editable question prompt (Promptok → Kérdés-válasz); admins regenerate answers
- Package texts and FAQ updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-18 18:44:20 +00:00
co-authored by Claude Opus 5.5
parent 22292f533b
commit 182d71fe65
33 changed files with 1233 additions and 59 deletions
@@ -8,6 +8,7 @@ import type { Analysis } from "@/lib/types";
import { AI_SHORT } from "./AiNote";
import { AnalysisLoading } from "./AnalysisLoading";
import { AnalysisQuestions } from "./AnalysisQuestions";
import { PackageChooser } from "./PackageCards";
import { RegenerateButton } from "./RegenerateButton";
import { AnalysisView } from "./AnalysisView";
@@ -88,6 +89,7 @@ export function DetailedAnalysis({
isAdmin,
canPay,
note,
questionsLeft,
}: {
target: AnalysisTarget;
initial: Analysis | null;
@@ -97,6 +99,8 @@ export function DetailedAnalysis({
canPay: boolean;
/** Shown above a finished analysis (e.g. who is the first and the second person). */
note?: string;
/** Questions left; given where questions can be asked (natal analysis, forecast). */
questionsLeft?: number;
}) {
const [analysis, setAnalysis] = useState<Analysis | null>(initial);
const [step, setStep] = useState<Step>("offer");
@@ -146,9 +150,20 @@ export function DetailedAnalysis({
return (
<section className="analysis-card" aria-label={t.eyebrow}>
<span className="eyebrow">{t.eyebrow}</span>
{isAdmin && <RegenerateButton analysisId={analysis.id} onStarted={setAnalysis} />}
{isAdmin && (
<RegenerateButton<Analysis> url={`/admin/analyses/${analysis.id}/regenerate`} onStarted={setAnalysis} />
)}
{note && <p className="hint">{note}</p>}
<AnalysisView content={analysis.content} kind={target.kind} />
{questionsLeft !== undefined && target.kind !== "synastry" && (
<AnalysisQuestions
analysisId={analysis.id}
left={questionsLeft}
isAdmin={isAdmin}
canPay={canPay}
forecast={target.kind === "forecast"}
/>
)}
</section>
);
}