Error log, retry notice, a waiting counter that keeps counting
CI / test (push) Successful in 1m8s
CI / build (push) Successful in 5m13s
CI / deploy (push) Skipped

- generation_errors: every failed attempt (model, attempt, outcome, duration); admin
  Hibanapló page and GET /v1/admin/errors; kept 90 days
- The waiting page counts from when the text was asked for (requested_at), not from
  the page load, so a reload no longer restarts it
- It says when an attempt failed and is retried, and when a failed text's unit was
  given back; admins see the error

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 21:47:37 +00:00
co-authored by Claude Opus 5.5
parent cf2fb9d454
commit 02e4e225f0
22 changed files with 569 additions and 25 deletions
@@ -11,6 +11,7 @@ import { AnalysisLoading } from "./AnalysisLoading";
import { AnalysisQuestions } from "./AnalysisQuestions";
import { PackageChooser } from "./PackageCards";
import { RegenerateButton } from "./RegenerateButton";
import { RetryNotice } from "./RetryNotice";
import { AnalysisView } from "./AnalysisView";
const POLL_MS = 5000;
@@ -172,7 +173,15 @@ export function DetailedAnalysis({
return (
<section className="analysis-card" aria-label={t.eyebrow} aria-busy="true">
<span className="eyebrow">{t.eyebrow}</span>
<AnalysisLoading title={t.loadingTitle} text={t.loading} />
<AnalysisLoading title={t.loadingTitle} text={t.loading} since={analysis?.requested_at ?? analysis?.created_at} />
{analysis && (
<RetryNotice
status={analysis.status}
error={analysis.error}
nextAttemptAt={analysis.next_attempt_at}
isAdmin={isAdmin}
/>
)}
</section>
);
}
@@ -186,9 +195,15 @@ export function DetailedAnalysis({
<p className="muted">{t.about}</p>
<p className="ai-line">{AI_SHORT}</p>
{analysis?.status === "failed" && (
<p className="msg msg-error" role="alert">
Az előző kérés nem sikerült{isAdmin ? "" : ", az elemzést visszaadtuk a keretedbe"}. Próbáld újra.
</p>
<div className="msg msg-error" role="alert">
<p style={{ margin: 0 }}>
Az elemzés többszöri próbálkozás után sem készült el.
{isAdmin || analysis.credits_charged === 0
? " Próbáld újra."
: " A felhasznált egységet visszaadtuk, így ingyen újra kérheted."}
</p>
{isAdmin && analysis.error && <p className="hint">Hiba: {analysis.error}</p>}
</div>
)}
{error && (
<p className="msg msg-error" role="alert">