feat: show one bundled FTW version when packaged as the Home Assistant add-on - #701
Draft
HuggeK wants to merge 1 commit into
Draft
feat: show one bundled FTW version when packaged as the Home Assistant add-on#701HuggeK wants to merge 1 commit into
HuggeK wants to merge 1 commit into
Conversation
…t add-on When FTW_BUNDLE=home_assistant_addon is set by the bundle image, /api/components reports the packaging and Settings -> System shows the single bundled FTW version instead of the per-container Core/Optimizer breakdown with update and rollback buttons that Supervisor-owned installs cannot use. Co-authored-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
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.
What
When Core runs inside a single-image bundle that sets
FTW_BUNDLE=home_assistant_addon(the Home Assistant add-on), Settings → System now shows one bundled FTW version row instead of the per-container Core/Optimizer breakdown, and the Optimizer Update/Rollback buttons are not rendered there. Native installs are unchanged.go/internal/components/bundle.go: newBundletype +BundleFromEnv()readingFTW_BUNDLE/FTW_BUNDLE_VERSION./api/componentsincludes abundleobject when set; omitted for native installs.web/settings/tabs/system.js: new purebundleDisplay()helper picks the collapsed view; drivers row, optimizer fallback warning, and the component-action status line stay.Why
In the Home Assistant add-on, Core and the Optimizer ship in one image whose updates and rollback belong to Supervisor (
srcfl/home-assistant-addons, self-update disabled). A per-container version breakdown with update buttons misleads there: nothing updates independently, and the operator's real question is "which FTW version is this add-on running?"Behaviour details and safety notes
if (btn)guards already tolerate the buttons being absent from the DOM.bundle.version(the add-on version) is optional; the FTW version shown is Core's compiled-in version.FTW_BUNDLEkinds keep the native view, so nothing changes until a packaging opts in.Testing
go test ./internal/components/ ./internal/api/— new tests:TestBundleFromEnv*,TestComponentsReportsBundlePackaging,TestComponentsOmitsBundleForNativeInstalls(pre-existing failures ininternal/apion Windows — backup lifecycle + myUplink OAuth — fail identically on the untouched base).node --test web/settings/tabs/system.test.mjs— 6/6 pass, including three newbundleDisplaycases.node --test web/javascript-syntax.test.mjs— pass.gofmt/go vetclean for the touched packages (two pre-existing gofmt offsides inapi.go/api_components.goleft as-is to keep the diff small).Companion add-on change: HuggeK/home-assistant-addons sets
FTW_BUNDLE/FTW_BUNDLE_VERSIONin the add-on image; it is a no-op until an FTW release containing this PR is pinned there.🤖 Generated with Claude Code