fix(ui,i18n): E30 review round 3 — the stored language follows the screen, a fresh text starts collapsed, Retry waits again

This commit is contained in:
2026-10-01 10:43:59 +02:00
parent 08e62bbb16
commit 3563858fd1
14 changed files with 147 additions and 32 deletions
+13 -3
View File
@@ -160,12 +160,14 @@ export function PlexPersonView({
// S6); the answer says so (`enriching`) and the page asks again until it lands — for a while, not
// forever: BIO_WAIT_MS after the page opened (by the clock, not by the last answer — a failing ask
// leaves that where it was) a TMDB that is down stops being waited on, and a failing ask ends it at
// once (the next open tries again). The page is keyed on the person, so the wait starts per person.
// once (the next open tries again). The page is keyed on the person, so the wait starts per person;
// a Retry starts it over (`waitRound`), or a retry answered "still on its way" would show nothing.
const [waitOver, setWaitOver] = useState(false);
const [waitRound, setWaitRound] = useState(0);
useEffect(() => {
const timer = setTimeout(() => setWaitOver(true), BIO_WAIT_MS);
return () => clearTimeout(timer);
}, []);
}, [waitRound]);
const q = useQuery({
queryKey: personKey,
queryFn: () => api.plexPerson(name, lang),
@@ -336,7 +338,15 @@ export function PlexPersonView({
// person with no bio; the retry asks (and waits) again.
d.enriching &&
q.isError && (
<StateMessage tone="error" compact onRetry={() => q.refetch()}>
<StateMessage
tone="error"
compact
onRetry={() => {
setWaitOver(false);
setWaitRound((n) => n + 1);
void q.refetch();
}}
>
{t("plex.person.bioFailed")}
</StateMessage>
)