Hide hosted dashboard update controls

This commit is contained in:
Shannon Sands 2026-06-16 11:24:14 +10:00 committed by Teknium
parent 55cb4103be
commit 0b6b29a30c
7 changed files with 242 additions and 82 deletions

View file

@ -74,19 +74,17 @@ export function SystemActionsProvider({
setActiveAction(action);
} else {
const resp = await api.updateHermes();
// In a Docker install the image is immutable, so `hermes update`
// can't apply — the endpoint returns 200 with a structured
// {ok:false, error:"docker_update_unsupported", message, update_command}
// envelope instead of spawning the action (see #34347 / #36263).
// Surface that guidance to the user rather than starting the poll,
// which would otherwise report a generic "failed (exit 1)".
if (!resp.ok && resp.error === "docker_update_unsupported") {
// Some installs cannot apply updates from inside the dashboard. The
// endpoint returns a structured {ok:false, message, update_command}
// envelope instead of spawning the action; surface that guidance
// rather than polling a synthetic failed action.
if (!resp.ok) {
const cmd = resp.update_command ? ` ${resp.update_command}` : "";
setToast({
type: "success",
message:
(resp.message ??
"Updates don't apply inside Docker — re-pull the image instead.") +
"Updates don't apply from this dashboard.") +
cmd,
});
return;