feat(quick-260914-ku1): Versionsstempel — GET /health/version aus APP_*, VersionResponse, app-version.ts und Abzeichen v<Version> · <Kanal> in der Seitenleiste

- packages/shared: VersionResponse { name, version, channel, commit, buildTime }
- apps/api: health/app-version.ts (getAppVersion mit ||-Vorgaben dev/dev, formatAppVersionLine),
  HealthController.getVersion delegiert (bleibt @Public, T-KU1-03), main.ts protokolliert
  "Tessera API <version> (<channel>) <commit>" beim Start; neuer Spec mit 6 Tests
- apps/web: lib/app-version.ts (NEXT_PUBLIC_APP_* mit vollem Literalnamen, loadApiVersion
  memoisiert und still bei Fehler), AppVersionBadge unten in der Seitenleiste (auch mobil,
  nicht eingeklappt), sidebar.channel.{beta,live,dev} in de/en; 5 + 4 + 1 neue Tests
- Suiten: API 65 Dateien / 1060 Tests, Web 40 / 243, tsc in shared/api/web Exit 0

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018N9CD3ebPKm1b32bPpBknY
This commit is contained in:
2026-09-14 15:32:50 +02:00
parent 1cd4212df0
commit cdb571c509
13 changed files with 471 additions and 8 deletions
@@ -0,0 +1,37 @@
'use client';
import { useEffect, useState } from 'react';
import { useTranslations } from 'next-intl';
import { type ApiVersionInfo, appVersion, loadApiVersion } from '@/lib/app-version';
/**
* Versionszeile unten in der Seitenleiste: `<Version> · <Kanal>`, z. B.
* `v1.0.0 · Beta` oder lokal `dev · Entwicklung` (quick-260914-ku1).
* Der Tooltip nennt den Web-Commit und, sobald geladen, die API-Version
* samt Kanal. "Commit" und "API" sind in beiden Sprachen gleich.
*/
export function AppVersionBadge() {
const t = useTranslations('sidebar');
const [api, setApi] = useState<ApiVersionInfo | null>(null);
useEffect(() => {
let active = true;
loadApiVersion().then((info) => {
if (active) setApi(info);
});
return () => {
active = false;
};
}, []);
const parts: string[] = [];
if (appVersion.commit) parts.push(`Commit ${appVersion.commit}`);
if (api) parts.push(`API ${api.version} (${api.channel})`);
const title = parts.length > 0 ? parts.join(' · ') : undefined;
return (
<span data-testid="app-version" className="block truncate text-xs text-muted-foreground" title={title}>
{appVersion.version} · {t(`channel.${appVersion.channel}`)}
</span>
);
}