diff --git a/ui/src/e2e/about.e2e.test.ts b/ui/src/e2e/about.e2e.test.ts index 9e9bae51212b..616d8d42cccf 100644 --- a/ui/src/e2e/about.e2e.test.ts +++ b/ui/src/e2e/about.e2e.test.ts @@ -71,6 +71,19 @@ describeControlUiE2e("Control UI About mocked Gateway E2E", () => { await expect.poll(() => commit.textContent()).toBe(COMMIT.slice(0, 12)); await expect.poll(() => commit.getAttribute("title")).toBe(COMMIT); + const [versionLabelBox, versionValueBox, commitBox, commitAgeBox] = await Promise.all([ + strip.locator(":scope > dt").first().boundingBox(), + items.first().boundingBox(), + commit.boundingBox(), + items.nth(1).locator(".about-commit__age").boundingBox(), + ]); + expect(versionLabelBox).not.toBeNull(); + expect(versionValueBox).not.toBeNull(); + expect(commitBox).not.toBeNull(); + expect(commitAgeBox).not.toBeNull(); + expect(versionValueBox!.x - (versionLabelBox!.x + versionLabelBox!.width)).toBeLessThan(32); + expect(commitAgeBox!.x - (commitBox!.x + commitBox!.width)).toBeLessThan(12); + const built = items.nth(2).locator("time"); await expect.poll(() => built.textContent()).toBe("Jul 10, 2026"); await expect.poll(() => built.getAttribute("datetime")).toBe(BUILT_AT); diff --git a/ui/src/pages/about/view.test.ts b/ui/src/pages/about/view.test.ts index c18ab8c9ed78..eb45d8f32147 100644 --- a/ui/src/pages/about/view.test.ts +++ b/ui/src/pages/about/view.test.ts @@ -87,6 +87,7 @@ describe("renderAbout", () => { const values = facts?.querySelectorAll("dd"); expect(facts?.getAttribute("role")).toBe("group"); expect(facts?.getAttribute("aria-label")).toBe("Control UI build details"); + expect(facts?.classList.contains("about-build-grid")).toBe(true); expect(values).toHaveLength(4); expect(values?.[0]?.textContent).toContain("2026.7.10"); expect(values?.[1]?.querySelector("code")?.textContent).toBe(COMMIT.slice(0, 12)); @@ -101,6 +102,7 @@ describe("renderAbout", () => { new Date(COMMIT_AT), ), ); + expect(commitAge?.nextElementSibling?.tagName.toLowerCase()).toBe("openclaw-tooltip"); expect(values?.[2]?.textContent).toContain("feature/build-chip*"); diff --git a/ui/src/pages/about/view.ts b/ui/src/pages/about/view.ts index eaca641e2582..c3c69f7efba3 100644 --- a/ui/src/pages/about/view.ts +++ b/ui/src/pages/about/view.ts @@ -133,6 +133,7 @@ function renderCommit(props: AboutProps) { return html` ${commit.slice(0, SHORT_COMMIT_LENGTH)} + ${renderCommitAge(props.buildInfo.commitAt)} - ${renderCommitAge(props.buildInfo.commitAt)} ${copyStatus(props.copyState)} @@ -198,7 +198,11 @@ function renderHero(props: AboutProps) { export function renderAbout(props: AboutProps) { const buildDate = formatControlUiBuildDate(props.buildInfo.builtAt, i18n.getLocale()); const buildFacts = html` -
+
${t("aboutPage.version")}
${props.buildInfo.version diff --git a/ui/src/styles/about.css b/ui/src/styles/about.css index 623f1dd631be..86bf0cd1757c 100644 --- a/ui/src/styles/about.css +++ b/ui/src/styles/about.css @@ -219,7 +219,13 @@ } } -/* Commit hash + copy button cluster inside the build facts grid. */ +/* About labels are short, so the shared 120px settings label track leaves an + oversized gutter here. Keep the values close while preserving room to wrap. */ +.about-build-grid { + grid-template-columns: max-content minmax(0, 1fr); +} + +/* Commit hash, age, and copy button cluster inside the build facts grid. */ .about-commit { display: inline-flex; align-items: center;