From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id CA6DD1FF0AF for ; Fri, 20 Nov 2026 10:52:48 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 66B64216CF; Fri, 20 Nov 2026 10:52:43 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v4 0/3] ui: prompt users for reload when web ui version changes Date: Fri, 20 Nov 2026 10:46:36 +0100 Message-ID: <20261120095235.1143525-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.121 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: O5QT756LWNNMTEAGX2ELDAEPPPSPBI3D X-Message-ID-Hash: O5QT756LWNNMTEAGX2ELDAEPPPSPBI3D X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On some updates (like recently with ceph), the UI has new or better information about backend states, but the user must reload the page to get the new version, which might not be obvious. To help users detect such outdated running UI versions, send the current one in the index and /nodes/{node}/version api call. The ui can then compare these and prompt the user to reload. changes from v3 (thanks very much @Thomas): * rebase on master * expose a single 'ui-version' string instead of per-package versions * provide it via /nodes/{node}/version instead of /cluster/resources * generate it with a shared helper for index and API, including the repoid * ui: poll the version every 2 minutes instead of on resource store load * ui: drop the message box, show a short notice with tooltip in the top bar * use 'UI' instead of 'GUI' in names and commit subjects changes from v2: * always use mtime to check if we should read the file again, this is cheap enough and more accurate i measured a stat call on the file with a simple loop of 1000000 calls, and it came out to ~3.5s on my machine, this would make one stat call cost abou 3us which is fine IMO. (though my benchmark methodology is probably a bit flawed...) changes from v1: * move the caching of the pwt version from the /cluster/resources API call into read_pwt_version, so all callers share it * add a 'force' parameter to read_pwt_version and use it for the index, so that the index always gets the current version, like before * don't focus any button by default in the reload message box, so an accidental key press neither reloads nor dismisses it * mention in the commit message that the prompt can lag behind one poll cycle * sort the 'use PVE::File' statement correctly Dominik Csapak (3): api: factor out read_pwt_version and pwt_base_dir api: provide UI versions via index and /nodes/{node}/version ui: workspace: show reload notice when UI packages were updated PVE/API2/Nodes.pm | 14 ++++++- PVE/API2Tools.pm | 38 ++++++++++++++++++ PVE/Service/pveproxy.pm | 9 +++-- www/index.html.tpl | 3 +- www/manager6/Workspace.js | 82 +++++++++++++++++++++++++++++++++------ 5 files changed, 130 insertions(+), 16 deletions(-) -- 2.47.3