refactor(jellyseerr): keep the server version out of the field UI; enforce it at login

The resolver field only needs to find the working URL — the Jellyseerr version requirement is irrelevant there and only polluted the UI.

- jellyseerrProbe: validate reachability + that it's a jellyseerr (no version gate, no version-too-low outcome).

- Drop the version-too-low reason from the whole resolver stack (types, resolve, hook, status text, i18n).

- Min version 2.0.0 stays enforced in JellyseerrApi.test() at login: now writes an error log + toast, and uses numeric isVersionBelow (fixes the "2.10.0" < "2.0.0" string-compare bug).
This commit is contained in:
Gauvain
2026-06-04 21:24:40 +02:00
parent ef27674010
commit 7fc74df0aa
9 changed files with 24 additions and 58 deletions

View File

@@ -11,7 +11,7 @@ export type ServerUrlResolverState =
| { status: "idle" }
| { status: "resolving" }
| { status: "ok"; resolvedUrl: string; meta?: Record<string, unknown> }
| { status: "error"; reason: ResolveFailureReason; version?: string };
| { status: "error"; reason: ResolveFailureReason };
/**
* Stateful wrapper around `resolveServerUrl` for screens.
@@ -46,11 +46,7 @@ export function useServerUrlResolver(
setState(
result.ok
? { status: "ok", resolvedUrl: result.url, meta: result.meta }
: {
status: "error",
reason: result.reason,
version: result.version,
},
: { status: "error", reason: result.reason },
);
}
return result;