feat(version): versão em runtime via /api/version (Passos 1/3/4)

- buildInfo.ts: hook useAppVersion() consome GET /api/version (fonte única = backend),
  com fallback ao carimbo do bundle; deixa de depender do APP_VERSION manual.
- Versão exibida em Configurações ("Sobre o sistema") + telas públicas (Login/WaitingInvite);
  removida do rodapé do Sidebar.
- compose.prod/deploy-prod.sh: injetam APP_VERSION (=tag) e APP_ENV=PROD em runtime,
  desacoplando a versão semântica do build (commit/build seguem da imagem).
- constants.ts marcado legado + bump V1.0.15 (transitório até o Passo 5; evita colisão de tag).
- DEPLOY-PRODUCAO.md reescrito com status /🧪/🎯 + nota de fase transitória.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
VPS 4 Builder
2026-06-17 05:19:27 +02:00
parent 6e81718725
commit a991f1fe2c
9 changed files with 187 additions and 164 deletions
-10
View File
@@ -7,7 +7,6 @@ import {
import { ToothIcon } from './ToothIcon.tsx';
import { HybridBackend } from '../services/backend.ts';
import { getActivePlugins } from '../views/plugins/pluginRegistry.ts';
import { BUILD_INFO } from '../buildInfo.ts';
interface SidebarProps {
activeTab: string;
@@ -284,15 +283,6 @@ export const Sidebar: React.FC<SidebarProps> = ({ activeTab, setActiveTab }) =>
<LogOut size={16} />
SAIR DO SISTEMA
</button>
<div
className="px-4 pt-1 text-[8px] leading-tight text-gray-300 font-mono select-text"
title={`Build: ${BUILD_INFO.build || 'n/a'}`}
>
<span className="font-bold text-gray-400">{BUILD_INFO.version}</span>
{' · '}{BUILD_INFO.commit}
{' · '}<span className={BUILD_INFO.environment === 'PRODUÇÃO' || BUILD_INFO.environment === 'PROD' ? 'text-emerald-400' : 'text-amber-400'}>{BUILD_INFO.environment}</span>
</div>
</div>
</div>
);