From 15f533b98417202bac9a334580dd5489aba1d0cc Mon Sep 17 00:00:00 2001 From: Ricardo Mancinas Date: Thu, 30 Jul 2026 16:37:48 -0700 Subject: [PATCH] fix(web): show the full commit hash in the build footer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The footer abbreviated to 7 characters, so the line read "v master · 19f0319". That line exists to be pasted into `git show` or compared against a registry tag, and an abbreviation makes both a manual step — while the full 40-char value was already baked into the image (build.yml passes `github.sha` whole, and /version returns it untouched). `shortSha` had no other caller, so it goes with it. The span gets `overflow-wrap: anywhere` and `min-width: 0`: hex offers no break opportunity, and the api/web mismatch branch renders two of these hashes side by side, which would otherwise push a phone into horizontal scroll. Measured at a simulated 360px with both hashes present — the span wraps, and documentElement.scrollWidth stays equal to clientWidth. Verified in the browser against the dev database: footer renders "v1.0.0 · db2bd54c0ffee1234567890abcdef0123456789a", hash length 40. Co-Authored-By: Claude Opus 5 --- apps/web/src/app/globals.css | 5 +++++ apps/web/src/components/AppShell.tsx | 12 ++++++++---- apps/web/src/lib/build-info.ts | 5 ----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.css index f7a75f9..210c39e 100644 --- a/apps/web/src/app/globals.css +++ b/apps/web/src/app/globals.css @@ -180,6 +180,11 @@ button { font-family: var(--font-mono); font-variant-numeric: tabular-nums; cursor: help; + /* Full 40-char commit hashes, and two of them when the tiers disagree. Hex + offers no break opportunity, so without this the line pushes the page into + horizontal scroll on a phone. */ + min-width: 0; + overflow-wrap: anywhere; } .shell-footer-warn { color: var(--negative); diff --git a/apps/web/src/components/AppShell.tsx b/apps/web/src/components/AppShell.tsx index 0c816c9..a1df301 100644 --- a/apps/web/src/components/AppShell.tsx +++ b/apps/web/src/components/AppShell.tsx @@ -4,7 +4,7 @@ import { useEffect, useRef, useState, type ReactNode } from "react"; import { usePathname, useRouter } from "next/navigation"; import Link from "next/link"; import { getApiVersion, logout, me, updateUiScale, type ServiceVersion } from "@/lib/api"; -import { shortSha, webBuildInfo } from "@/lib/build-info"; +import { webBuildInfo } from "@/lib/build-info"; import { AuthContext, can } from "@/lib/abilities"; import { ROLE_LABEL } from "@/lib/labels"; import { @@ -217,12 +217,16 @@ function BuildFooter() { return (