GitNexus UI: Acceso Local vs Remoto (Backend URL Fix)
Section titled “GitNexus UI: Acceso Local vs Remoto (Backend URL Fix)”Problema
Section titled “Problema”Puedes abrir la UI en http://192.168.1.30:4747, pero aun así ver:
- Waiting for server to start
Mientras tanto el backend está bien:
GET /api/healthdevuelve{"status":"ok"}.
Notas:
GET /apidevolviendoCannot GET /apies normal./socket.io/no es la señal de salud relevante para el bootstrap.
Root Cause (localhost)
Section titled “Root Cause (localhost)”La UI de GitNexus toma el backend base URL desde:
localStorage['gitnexus-backend-url']
Si esa clave no existe, usa:
http://localhost:4747
Desde un PC remoto, localhost apunta al PC del usuario. Por eso la UI intenta http://localhost:4747/api/health y falla, aunque http://192.168.1.30:4747/api/health funcione.
Fix Recomendado
Section titled “Fix Recomendado”En el navegador remoto:
localStorage.setItem('gitnexus-backend-url', 'http://192.168.1.30:4747')location.reload()Validación
Section titled “Validación”DevTools → Network:
- Antes: request a
http://localhost:4747/api/health(fail) - Después: request a
http://192.168.1.30:4747/api/health(200 OK)
Workaround: SSH Tunnel
Section titled “Workaround: SSH Tunnel”Si necesitas mantener el default localhost:4747:
ssh -L 4747:127.0.0.1:4747 albert@192.168.1.30Abrir:
http://127.0.0.1:4747
Estado Servidor Esperado
Section titled “Estado Servidor Esperado”En el host AI-LAB:
npx gitnexus@latest serve --host 0.0.0.0 --port 4747ss -tlnp | grep 4747muestra0.0.0.0:4747/api/healthOK por127.0.0.1y por192.168.1.30
Límites
Section titled “Límites”- GitNexus es codebase structural truth.
- Prometheus sigue siendo runtime authority.
- Este fix es UI/cliente, no cambia el runtime.
Governance (.gitnexusignore)
Section titled “Governance (.gitnexusignore)”.gitnexusignorees parte de la disciplina: excluyeruntime/state/*y otros artefactos no versionables.- El objetivo es evitar indexar estado vivo o datos pesados que distorsionan el grafo.