fix(web): show the full commit hash in the build footer
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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 (
|
||||
<footer className="shell-footer">
|
||||
<span>Jorge Cuadros & Asociados</span>
|
||||
{/* The FULL 40-char commit, not an abbreviation: this line exists to be
|
||||
pasted into `git show` or compared against a registry tag, and a
|
||||
7-char prefix makes both a manual step. It is what GIT_SHA already
|
||||
carries — build.yml bakes in `github.sha` whole. */}
|
||||
<span
|
||||
className="shell-footer-build"
|
||||
title={`web ${web.version} (${shortSha(web.gitSha)}) — ${web.buildDate}`}
|
||||
title={`web ${web.version} (${web.gitSha}) — ${web.buildDate}`}
|
||||
>
|
||||
v{web.version} · {shortSha(web.gitSha)}
|
||||
{mismatch && api ? ` · API ${shortSha(api.gitSha)}` : ""}
|
||||
v{web.version} · {web.gitSha}
|
||||
{mismatch && api ? ` · API ${api.gitSha}` : ""}
|
||||
</span>
|
||||
{mismatch && (
|
||||
<span className="shell-footer-warn" role="status">
|
||||
|
||||
Reference in New Issue
Block a user