Summary card links to the detailed analysis tab
CI / test (push) Successful in 47s
CI / build (push) Successful in 3m41s
CI / deploy (push) Skipped

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-17 10:43:03 +00:00
co-authored by Claude Opus 5.5
parent 1e95459671
commit 0e01f88f31
4 changed files with 48 additions and 5 deletions
@@ -7,6 +7,7 @@ import type { Analysis } from "@/lib/types";
import { AnalysisLoading } from "./AnalysisLoading";
import { Rich } from "./Rich";
import { openTab } from "./Tabs";
const POLL_MS = 3000;
const MAX_POLLS = 60;
@@ -16,7 +17,16 @@ const MAX_POLLS = 60;
* saved; this asks for it (queueing it again if it failed) and polls until the
* worker has written it.
*/
export function ChartSummary({ chartId, initial }: { chartId: string; initial: Analysis | null }) {
export function ChartSummary({
chartId,
initial,
detailedDone = false,
}: {
chartId: string;
initial: Analysis | null;
/** The detailed analysis is ready: the link says so instead of offering it. */
detailedDone?: boolean;
}) {
const [summary, setSummary] = useState<Analysis | null>(initial);
const [gaveUp, setGaveUp] = useState(false);
const done = summary?.status === "done";
@@ -57,6 +67,17 @@ export function ChartSummary({ chartId, initial }: { chartId: string; initial: A
<p className="summary-text">
<Rich text={content.summary ?? ""} />
</p>
<a
href="#elemzes"
className="summary-more"
onClick={(e) => {
e.preventDefault();
openTab("elemzes");
}}
>
{detailedDone ? "Elolvasom a részletes elemzést" : "Kérj részletes elemzést: hat fejezet a képletedről"}
<span aria-hidden="true"> →</span>
</a>
</>
) : (
<>