feat(git): Hinweis im Account-Panel, Startlog, Fehlersuche und Betriebs-Compose (#30)
CI / App (npm ci + Build, ESLint, Stylelint, Jest) (pull_request) Canceled after 0s
CI / Storage (mongo) (pull_request) Canceled after 0s
CI / Storage (postgres) (pull_request) Canceled after 0s

- Panel zeigt bei 503/G10 und 403/G07 einen Hinweis statt sich auszublenden; ohne Login unsichtbar
- Startlog: Info-Zeile bei aktivem Backend (kid, Allowlist), ohne Secrets
- docs/git: Abschnitt Fehlersuche / nachträglich aktivieren
- docs/deploy: compose.yaml-Vorlage für das veröffentlichte Image, Verlinkung aus README/FORK/auth/storage
- Dev-Compose reicht HB_ASSET_* durch

Refs #30

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
dev-bot BotandClaude Sonnet 5.5 committed 2026-11-26 11:04:24 +00:00
1 parent 3b83125771
commit f96dec267b
17 files changed
+439 -181

No files matched your search

+14 -3
View File
@@ -1,13 +1,15 @@
import './git.less';
import React, { useEffect, useState } from 'react';
import { gitApi } from './gitApi.js';
import { classifyListError } from './panelState.js';
// Verbindungen verwalten (ADR 0003 §7): anlegen, testen, löschen, Brews aus dem Repo importieren.
// Das Token-Feld ist reines Eingabefeld und wird nie vorbefüllt; der Server gibt den Token nie zurück.
const EMPTY = { label: '', repoUrl: '', authUsername: 'git', token: '' };
const GitConnectionsPanel = ()=>{
const [state, setState] = useState('loading'); // loading | off | ready
const [state, setState] = useState('loading'); // loading | hidden | notice | ready
const [notice, setNotice] = useState('');
const [conns, setConns] = useState([]);
const [form, setForm] = useState(EMPTY);
const [msg, setMsg] = useState({}); // pro Verbindung: { ok, text }
@@ -15,10 +17,19 @@ const GitConnectionsPanel = ()=>{
const [files, setFiles] = useState({}); // pro Verbindung: { branch, files }
const reload = ()=>gitApi.listConnections().then((list)=>{ setConns(list); setState('ready'); })
.catch((err)=>{ if([403, 503].includes(err.status)) setState('off'); else { setFormError(err.message); setState('ready'); } });
.catch((err)=>{
const { state: next, notice: text } = classifyListError(err);
if(next === 'error') { setFormError(err.message); setState('ready'); } else { setNotice(text ?? ''); setState(next); }
});
useEffect(()=>{ reload(); }, []);
if(state !== 'ready') return null; // Git-Backend deaktiviert oder kein OIDC-Konto
if(state === 'notice') return (
<div className='dataGroup gitConnections'>
<h3>Git-Verbindungen <i className='fab fa-git-alt'></i></h3>
<p className='notice'>{notice}</p>
</div>
);
if(state !== 'ready') return null; // lädt oder nicht angemeldet
const set = (id, ok, text)=>setMsg((m)=>({ ...m, [id]: { ok, text } }));