diff --git a/app/model/container.ts b/app/model/container.ts index f2b72619..0984a410 100644 --- a/app/model/container.ts +++ b/app/model/container.ts @@ -31,6 +31,7 @@ export interface ContainerResult { digest?: string; created?: string; link?: string; + labels?: Record; // Labels from the new image (for version display) } export interface ContainerUpdateKind { @@ -322,6 +323,20 @@ function addUpdateKindProperty(container: Container) { updateKind.localValue = container.image.tag.value; updateKind.remoteValue = container.result.tag; updateKind.semverDiff = semverDiffWud; + } else if ( + // Check for version labels in rolling release containers first + // where tags are identical but versions differ + container.result.labels && + (container.result.labels['io.hass.version'] || + container.result.labels['org.opencontainers.image.version'] || + container.result.labels['org.label-schema.version'] || + container.result.labels['version'] || + container.result.labels['build_version']) + ) { + // Force tag update kind to enable version formatting in frontend + updateKind.kind = 'tag'; + updateKind.localValue = container.image.tag.value; + updateKind.remoteValue = container.result.tag; } else if ( container.image.digest && container.image.digest.value !== container.result.digest diff --git a/ui/src/components/ContainerItem.ts b/ui/src/components/ContainerItem.ts index baa1a65c..2d673536 100644 --- a/ui/src/components/ContainerItem.ts +++ b/ui/src/components/ContainerItem.ts @@ -77,10 +77,21 @@ export default defineComponent({ ); } if (this.container.updateKind) { - newVersion = this.container.updateKind.remoteValue; - } - if (this.container.updateKind.kind === "digest") { - newVersion = (this as any).$filters.short(newVersion, 15); + if (this.container.updateKind.kind === "tag") { + // For tag updates, use version formatting + const version = extractVersionFromLabels(this.container.result?.labels); + if (version) { + // If we have version info, show tag with version + newVersion = `${this.container.updateKind.remoteValue} (${version})`; + } else { + // No version info, just show the tag + newVersion = this.container.updateKind.remoteValue; + } + } else if (this.container.updateKind.kind === "digest") { + newVersion = (this as any).$filters.short(this.container.updateKind.remoteValue, 15); + } else { + newVersion = this.container.updateKind.remoteValue; + } } return newVersion; },