Repository navigation
fix(web): the version says who updates FTW when the host does - #1863
Merged
Merged
Conversation
In the Home Assistant app and Docker, Core has no self-updater and /api/version/check answers 503 "self-update disabled". The update badge took that as a reason to shut itself down: it hid itself, stopped answering open(), and the inline bridge removed the click from the version pill. The pill still looked like a button, so a click did nothing (#1784). The connection light and the optimizer warning, which live in the same badge, were hidden too. The badge now stops asking about versions but keeps working. Its marks still show, and open() shows a dialog with the running version and who updates it: Home Assistant for the app, the install method otherwise. It offers no update or check button there. Closes #1784 Co-Authored-By: Claude Opus 5.5 <[email protected]>
From review. Where the host updates FTW, the green light now says "Connected", not "Connected, nothing pending": the box cannot know what the host has waiting. Until /api/components says how FTW was installed, the dialog says only that FTW does not update itself here, so a Home Assistant user never sees the Docker hint. The Version button under More opens the same dialog; its subtitle now reads "Running version and updates". Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
miravoss26
reviewed
Nov 3, 2026
miravoss26
left a comment
Contributor
There was a problem hiding this comment.
Makes the version badge and the Version button useful when the host updates FTW (HA app, Docker): the dialog now says what runs and who updates it, and the header keeps the connection light and optimizer warning. Fixes #1784.
- Security: no new deps, no new network hosts. The dialog HTML interpolates
versionandbundle.versionthroughescapeHTML; the rest is static strings. Fine. - Correctness:
_hostManagedguards_refreshand_startUpdate, so no update call can fire on a host-managed install. Tests updated to match. - Nit: the 'Connected' dot says nothing about pending host updates. The comment already admits that, and I agree it's the honest wording.
Safe to merge from my read (CI green).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1784.
Problem
In the Home Assistant app (v0.154.2-beta.1), clicking the version does nothing. That is true of both the version pill in the header (in the menu at phone width) and the Version button under More. Both call
badge.open().Cause
The HA app runs Core without the launcher (
FTW_SELFUPDATE_ENABLED=0,FTW_BUNDLE=home_assistant_addon).Deps.SelfUpdatestays nil, so/api/version/checkanswers 503{"error":"self-update disabled"}.<ftw-update-badge>took that answer as a reason to shut itself down (_disable()):open()returned at once;index.htmlremoved the click from the version pill.The pill keeps its border, like the buttons beside it, so it still looks like a button. The same shutdown also hid the header's connection light and the optimizer warning, which live in that badge. Docker installs without the launcher had the same problem.
Fix
self-update disabled, the badge stops asking about versions but keeps running (_manageByHost(),_hostManaged).open()shows a short dialog: the running version from/api/components, thenUntil
/api/componentsanswers, it says only "FTW does not update itself here.", which is true of every install that lands here. It has only a Close button: no check, no update.index.htmlno longer removes the click. The More button's subtitle reads "Running version and updates" instead of "… and published releases". Theupdate-badge.jscache key moves tohost1.Settings › System already says Home Assistant manages updates. The dialog says the same thing where the user clicked.
Reproduce
masterand run it as the HA app'srun.shdoes:FTW_SELFUPDATE_ENABLED=0 FTW_BUNDLE=home_assistant_addon FTW_BUNDLE_VERSION=0.157.0-beta.1 ftw -config … -web web.Before: nothing happens.
/api/version/checkanswers 503,<ftw-update-badge>is hidden, and the header has no connection light.After: the dialog below opens, Close shuts it, and the green light is back.
Screenshots
Local Core in HA mode,
localhost, desktop and 375 px.after the click
The light theme was also checked; the dialog uses the same styles as the native version dialog.
Tests
web/update-dialog.test.mjs: with the HA bundle, the dialog names the version and Home Assistant, has no update or check button, sends no further/api/version/*request, and Close removes it. Without a bundle it gives the Docker wording. Before/api/componentsanswers, it names no host.web/header-status-marks.test.mjs: after the 503 the badge stays visible with the green light titled "Connected", shows the optimizer warning when a late/api/componentssays the optimizer is unhealthy, and shows the offline mark when the connection drops.index.htmlno longer removes the click.npm test: 896 of 896 pass.make verify("vet + test + build clean") on the first commit; the review commit changes only web files and their tests.Review
An independent review (Sonnet subagent) traced the native, Docker and boot-phase "starting" paths and found no regression. It also checked that a late
/api/componentsresponse cannot reopen a closed dialog. Taken from it, in the second commit:/api/componentsanswers;For Fredrik to confirm: #701 hid the whole badge when self-update is off. This PR shows the connection light and the optimizer warning again on HA and Docker installs, since a hidden "Connection lost" mark helps nobody. Say if you want that split out or reverted.
🤖 Generated with Claude Code